diff --git a/Speech/metadata/V2/CloudSpeech.php b/Speech/metadata/V2/CloudSpeech.php
index feaf1a5b8bc4..a37c0b0865c3 100644
Binary files a/Speech/metadata/V2/CloudSpeech.php and b/Speech/metadata/V2/CloudSpeech.php differ
diff --git a/Speech/src/V2/ExplicitDecodingConfig.php b/Speech/src/V2/ExplicitDecodingConfig.php
index 972bfc8268e5..8dac474a40c7 100644
--- a/Speech/src/V2/ExplicitDecodingConfig.php
+++ b/Speech/src/V2/ExplicitDecodingConfig.php
@@ -22,27 +22,23 @@ class ExplicitDecodingConfig extends \Google\Protobuf\Internal\Message
*/
private $encoding = 0;
/**
- * Sample rate in Hertz of the audio data sent for recognition. Valid
- * values are: 8000-48000. 16000 is optimal. For best results, set the
+ * Optional. Sample rate in Hertz of the audio data sent for recognition.
+ * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
* sampling rate of the audio source to 16000 Hz. If that's not possible, use
* the native sample rate of the audio source (instead of re-sampling).
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Note that this field is marked as OPTIONAL for backward compatibility
+ * reasons. It is (and has always been) effectively REQUIRED.
*
- * Generated from protobuf field int32 sample_rate_hertz = 2;
+ * Generated from protobuf field int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
*/
private $sample_rate_hertz = 0;
/**
- * Number of channels present in the audio data sent for recognition.
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Optional. Number of channels present in the audio data sent for
+ * recognition. Note that this field is marked as OPTIONAL for backward
+ * compatibility reasons. It is (and has always been) effectively REQUIRED.
* The maximum allowed value is 8.
*
- * Generated from protobuf field int32 audio_channel_count = 3;
+ * Generated from protobuf field int32 audio_channel_count = 3 [(.google.api.field_behavior) = OPTIONAL];
*/
private $audio_channel_count = 0;
@@ -55,20 +51,16 @@ class ExplicitDecodingConfig extends \Google\Protobuf\Internal\Message
* @type int $encoding
* Required. Encoding of the audio data sent for recognition.
* @type int $sample_rate_hertz
- * Sample rate in Hertz of the audio data sent for recognition. Valid
- * values are: 8000-48000. 16000 is optimal. For best results, set the
+ * Optional. Sample rate in Hertz of the audio data sent for recognition.
+ * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
* sampling rate of the audio source to 16000 Hz. If that's not possible, use
* the native sample rate of the audio source (instead of re-sampling).
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Note that this field is marked as OPTIONAL for backward compatibility
+ * reasons. It is (and has always been) effectively REQUIRED.
* @type int $audio_channel_count
- * Number of channels present in the audio data sent for recognition.
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Optional. Number of channels present in the audio data sent for
+ * recognition. Note that this field is marked as OPTIONAL for backward
+ * compatibility reasons. It is (and has always been) effectively REQUIRED.
* The maximum allowed value is 8.
* }
*/
@@ -104,16 +96,14 @@ public function setEncoding($var)
}
/**
- * Sample rate in Hertz of the audio data sent for recognition. Valid
- * values are: 8000-48000. 16000 is optimal. For best results, set the
+ * Optional. Sample rate in Hertz of the audio data sent for recognition.
+ * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
* sampling rate of the audio source to 16000 Hz. If that's not possible, use
* the native sample rate of the audio source (instead of re-sampling).
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Note that this field is marked as OPTIONAL for backward compatibility
+ * reasons. It is (and has always been) effectively REQUIRED.
*
- * Generated from protobuf field int32 sample_rate_hertz = 2;
+ * Generated from protobuf field int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
* @return int
*/
public function getSampleRateHertz()
@@ -122,16 +112,14 @@ public function getSampleRateHertz()
}
/**
- * Sample rate in Hertz of the audio data sent for recognition. Valid
- * values are: 8000-48000. 16000 is optimal. For best results, set the
+ * Optional. Sample rate in Hertz of the audio data sent for recognition.
+ * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
* sampling rate of the audio source to 16000 Hz. If that's not possible, use
* the native sample rate of the audio source (instead of re-sampling).
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Note that this field is marked as OPTIONAL for backward compatibility
+ * reasons. It is (and has always been) effectively REQUIRED.
*
- * Generated from protobuf field int32 sample_rate_hertz = 2;
+ * Generated from protobuf field int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
* @param int $var
* @return $this
*/
@@ -144,14 +132,12 @@ public function setSampleRateHertz($var)
}
/**
- * Number of channels present in the audio data sent for recognition.
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Optional. Number of channels present in the audio data sent for
+ * recognition. Note that this field is marked as OPTIONAL for backward
+ * compatibility reasons. It is (and has always been) effectively REQUIRED.
* The maximum allowed value is 8.
*
- * Generated from protobuf field int32 audio_channel_count = 3;
+ * Generated from protobuf field int32 audio_channel_count = 3 [(.google.api.field_behavior) = OPTIONAL];
* @return int
*/
public function getAudioChannelCount()
@@ -160,14 +146,12 @@ public function getAudioChannelCount()
}
/**
- * Number of channels present in the audio data sent for recognition.
- * Supported for the following encodings:
- * * LINEAR16: Headerless 16-bit signed little-endian PCM samples.
- * * MULAW: Headerless 8-bit companded mulaw samples.
- * * ALAW: Headerless 8-bit companded alaw samples.
+ * Optional. Number of channels present in the audio data sent for
+ * recognition. Note that this field is marked as OPTIONAL for backward
+ * compatibility reasons. It is (and has always been) effectively REQUIRED.
* The maximum allowed value is 8.
*
- * Generated from protobuf field int32 audio_channel_count = 3;
+ * Generated from protobuf field int32 audio_channel_count = 3 [(.google.api.field_behavior) = OPTIONAL];
* @param int $var
* @return $this
*/
diff --git a/Speech/src/V2/ExplicitDecodingConfig/AudioEncoding.php b/Speech/src/V2/ExplicitDecodingConfig/AudioEncoding.php
index f2e449525006..d4d99cfe4b9b 100644
--- a/Speech/src/V2/ExplicitDecodingConfig/AudioEncoding.php
+++ b/Speech/src/V2/ExplicitDecodingConfig/AudioEncoding.php
@@ -37,12 +37,75 @@ class AudioEncoding
* Generated from protobuf enum ALAW = 3;
*/
const ALAW = 3;
+ /**
+ * AMR frames with an rfc4867.5 header.
+ *
+ * Generated from protobuf enum AMR = 4;
+ */
+ const AMR = 4;
+ /**
+ * AMR-WB frames with an rfc4867.5 header.
+ *
+ * Generated from protobuf enum AMR_WB = 5;
+ */
+ const AMR_WB = 5;
+ /**
+ * FLAC frames in the "native FLAC" container format.
+ *
+ * Generated from protobuf enum FLAC = 6;
+ */
+ const FLAC = 6;
+ /**
+ * MPEG audio frames with optional (ignored) ID3 metadata.
+ *
+ * Generated from protobuf enum MP3 = 7;
+ */
+ const MP3 = 7;
+ /**
+ * Opus audio frames in an Ogg container.
+ *
+ * Generated from protobuf enum OGG_OPUS = 8;
+ */
+ const OGG_OPUS = 8;
+ /**
+ * Opus audio frames in a WebM container.
+ *
+ * Generated from protobuf enum WEBM_OPUS = 9;
+ */
+ const WEBM_OPUS = 9;
+ /**
+ * AAC audio frames in an MP4 container.
+ *
+ * Generated from protobuf enum MP4_AAC = 10;
+ */
+ const MP4_AAC = 10;
+ /**
+ * AAC audio frames in an M4A container.
+ *
+ * Generated from protobuf enum M4A_AAC = 11;
+ */
+ const M4A_AAC = 11;
+ /**
+ * AAC audio frames in an MOV container.
+ *
+ * Generated from protobuf enum MOV_AAC = 12;
+ */
+ const MOV_AAC = 12;
private static $valueToName = [
self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED',
self::LINEAR16 => 'LINEAR16',
self::MULAW => 'MULAW',
self::ALAW => 'ALAW',
+ self::AMR => 'AMR',
+ self::AMR_WB => 'AMR_WB',
+ self::FLAC => 'FLAC',
+ self::MP3 => 'MP3',
+ self::OGG_OPUS => 'OGG_OPUS',
+ self::WEBM_OPUS => 'WEBM_OPUS',
+ self::MP4_AAC => 'MP4_AAC',
+ self::M4A_AAC => 'M4A_AAC',
+ self::MOV_AAC => 'MOV_AAC',
];
public static function name($value)
diff --git a/Speech/src/V2/OutputFormatConfig.php b/Speech/src/V2/OutputFormatConfig.php
index 2b2934e90a7c..15b88dad418d 100644
--- a/Speech/src/V2/OutputFormatConfig.php
+++ b/Speech/src/V2/OutputFormatConfig.php
@@ -17,22 +17,22 @@ class OutputFormatConfig extends \Google\Protobuf\Internal\Message
{
/**
* Configuration for the native output format. If this field is set or if no
- * other output format field is set then transcripts will be written to the
+ * other output format field is set, then transcripts will be written to the
* sink in the native format.
*
* Generated from protobuf field .google.cloud.speech.v2.NativeOutputFileFormatConfig native = 1;
*/
private $native = null;
/**
- * Configuration for the vtt output format. If this field is set then
- * transcripts will be written to the sink in the vtt format.
+ * Configuration for the VTT output format. If this field is set, then
+ * transcripts will be written to the sink in the VTT format.
*
* Generated from protobuf field .google.cloud.speech.v2.VttOutputFileFormatConfig vtt = 2;
*/
private $vtt = null;
/**
- * Configuration for the srt output format. If this field is set then
- * transcripts will be written to the sink in the srt format.
+ * Configuration for the SRT output format. If this field is set, then
+ * transcripts will be written to the sink in the SRT format.
*
* Generated from protobuf field .google.cloud.speech.v2.SrtOutputFileFormatConfig srt = 3;
*/
@@ -46,14 +46,14 @@ class OutputFormatConfig extends \Google\Protobuf\Internal\Message
*
* @type \Google\Cloud\Speech\V2\NativeOutputFileFormatConfig $native
* Configuration for the native output format. If this field is set or if no
- * other output format field is set then transcripts will be written to the
+ * other output format field is set, then transcripts will be written to the
* sink in the native format.
* @type \Google\Cloud\Speech\V2\VttOutputFileFormatConfig $vtt
- * Configuration for the vtt output format. If this field is set then
- * transcripts will be written to the sink in the vtt format.
+ * Configuration for the VTT output format. If this field is set, then
+ * transcripts will be written to the sink in the VTT format.
* @type \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig $srt
- * Configuration for the srt output format. If this field is set then
- * transcripts will be written to the sink in the srt format.
+ * Configuration for the SRT output format. If this field is set, then
+ * transcripts will be written to the sink in the SRT format.
* }
*/
public function __construct($data = NULL) {
@@ -63,7 +63,7 @@ public function __construct($data = NULL) {
/**
* Configuration for the native output format. If this field is set or if no
- * other output format field is set then transcripts will be written to the
+ * other output format field is set, then transcripts will be written to the
* sink in the native format.
*
* Generated from protobuf field .google.cloud.speech.v2.NativeOutputFileFormatConfig native = 1;
@@ -86,7 +86,7 @@ public function clearNative()
/**
* Configuration for the native output format. If this field is set or if no
- * other output format field is set then transcripts will be written to the
+ * other output format field is set, then transcripts will be written to the
* sink in the native format.
*
* Generated from protobuf field .google.cloud.speech.v2.NativeOutputFileFormatConfig native = 1;
@@ -102,8 +102,8 @@ public function setNative($var)
}
/**
- * Configuration for the vtt output format. If this field is set then
- * transcripts will be written to the sink in the vtt format.
+ * Configuration for the VTT output format. If this field is set, then
+ * transcripts will be written to the sink in the VTT format.
*
* Generated from protobuf field .google.cloud.speech.v2.VttOutputFileFormatConfig vtt = 2;
* @return \Google\Cloud\Speech\V2\VttOutputFileFormatConfig|null
@@ -124,8 +124,8 @@ public function clearVtt()
}
/**
- * Configuration for the vtt output format. If this field is set then
- * transcripts will be written to the sink in the vtt format.
+ * Configuration for the VTT output format. If this field is set, then
+ * transcripts will be written to the sink in the VTT format.
*
* Generated from protobuf field .google.cloud.speech.v2.VttOutputFileFormatConfig vtt = 2;
* @param \Google\Cloud\Speech\V2\VttOutputFileFormatConfig $var
@@ -140,8 +140,8 @@ public function setVtt($var)
}
/**
- * Configuration for the srt output format. If this field is set then
- * transcripts will be written to the sink in the srt format.
+ * Configuration for the SRT output format. If this field is set, then
+ * transcripts will be written to the sink in the SRT format.
*
* Generated from protobuf field .google.cloud.speech.v2.SrtOutputFileFormatConfig srt = 3;
* @return \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig|null
@@ -162,8 +162,8 @@ public function clearSrt()
}
/**
- * Configuration for the srt output format. If this field is set then
- * transcripts will be written to the sink in the srt format.
+ * Configuration for the SRT output format. If this field is set, then
+ * transcripts will be written to the sink in the SRT format.
*
* Generated from protobuf field .google.cloud.speech.v2.SrtOutputFileFormatConfig srt = 3;
* @param \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig $var
diff --git a/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/CloudSpeech.php b/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/CloudSpeech.php
deleted file mode 100644
index 667c6bb29f89..000000000000
Binary files a/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/CloudSpeech.php and /dev/null differ
diff --git a/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/CloudSpeechAdaptation.php b/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/CloudSpeechAdaptation.php
deleted file mode 100644
index c0fe59708267..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/CloudSpeechAdaptation.php
+++ /dev/null
@@ -1,91 +0,0 @@
-internalAddGeneratedFile(
- '
-§
-4google/cloud/speech/v1/cloud_speech_adaptation.protogoogle.cloud.speech.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto%google/cloud/speech/v1/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"©
-CreatePhraseSetRequest7
-parent ( B\'àAúA!speech.googleapis.com/PhraseSet
-
phrase_set_id ( BàA:
-
-phrase_set (2!.google.cloud.speech.v1.PhraseSetBàA"…
-UpdatePhraseSetRequest:
-
-phrase_set (2!.google.cloud.speech.v1.PhraseSetBàA/
-update_mask (2.google.protobuf.FieldMask"L
-GetPhraseSetRequest5
-name ( B\'àAúA!
-speech.googleapis.com/PhraseSet"v
-ListPhraseSetRequest7
-parent ( B\'àAúA!speech.googleapis.com/PhraseSet
- page_size (
-
-page_token ( "h
-ListPhraseSetResponse6
-phrase_sets (2!.google.cloud.speech.v1.PhraseSet
-next_page_token ( "O
-DeletePhraseSetRequest5
-name ( B\'àAúA!
-speech.googleapis.com/PhraseSet"³
-CreateCustomClassRequest9
-parent ( B)àAúA#!speech.googleapis.com/CustomClass
-custom_class_id ( BàA>
-custom_class (2#.google.cloud.speech.v1.CustomClassBàA"‹
-UpdateCustomClassRequest>
-custom_class (2#.google.cloud.speech.v1.CustomClassBàA/
-update_mask (2.google.protobuf.FieldMask"P
-GetCustomClassRequest7
-name ( B)àAúA#
-!speech.googleapis.com/CustomClass"|
-ListCustomClassesRequest9
-parent ( B)àAúA#!speech.googleapis.com/CustomClass
- page_size (
-
-page_token ( "q
-ListCustomClassesResponse;
-custom_classes (2#.google.cloud.speech.v1.CustomClass
-next_page_token ( "S
-DeleteCustomClassRequest7
-name ( B)àAúA#
-!speech.googleapis.com/CustomClass2Ž
-
-AdaptationÁ
-CreatePhraseSet..google.cloud.speech.v1.CreatePhraseSetRequest!.google.cloud.speech.v1.PhraseSet"[ÚAparent,phrase_set,phrase_set_id‚Óä“3"./v1/{parent=projects/*/locations/*}/phraseSets:*
-GetPhraseSet+.google.cloud.speech.v1.GetPhraseSetRequest!.google.cloud.speech.v1.PhraseSet"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/phraseSets/*}
-
ListPhraseSet,.google.cloud.speech.v1.ListPhraseSetRequest-.google.cloud.speech.v1.ListPhraseSetResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/phraseSetsÌ
-UpdatePhraseSet..google.cloud.speech.v1.UpdatePhraseSetRequest!.google.cloud.speech.v1.PhraseSet"fÚAphrase_set,update_mask‚Óä“G29/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:
-phrase_set˜
-DeletePhraseSet..google.cloud.speech.v1.DeletePhraseSetRequest.google.protobuf.Empty"=ÚAname‚Óä“0*./v1/{name=projects/*/locations/*/phraseSets/*}Î
-CreateCustomClass0.google.cloud.speech.v1.CreateCustomClassRequest#.google.cloud.speech.v1.CustomClass"bÚA#parent,custom_class,custom_class_id‚Óä“6"1/v1/{parent=projects/*/locations/*}/customClasses:*¦
-GetCustomClass-.google.cloud.speech.v1.GetCustomClassRequest#.google.cloud.speech.v1.CustomClass"@ÚAname‚Óä“31/v1/{name=projects/*/locations/*/customClasses/*}¼
-ListCustomClasses0.google.cloud.speech.v1.ListCustomClassesRequest1.google.cloud.speech.v1.ListCustomClassesResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*}/customClassesÛ
-UpdateCustomClass0.google.cloud.speech.v1.UpdateCustomClassRequest#.google.cloud.speech.v1.CustomClass"oÚAcustom_class,update_mask‚Óä“N2>/v1/{custom_class.name=projects/*/locations/*/customClasses/*}:custom_classŸ
-DeleteCustomClass0.google.cloud.speech.v1.DeleteCustomClassRequest.google.protobuf.Empty"@ÚAname‚Óä“3*1/v1/{name=projects/*/locations/*/customClasses/*}IÊAspeech.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBr
-com.google.cloud.speech.v1BSpeechAdaptationProtoPZ2cloud.google.com/go/speech/apiv1/speechpb;speechpbø¢GCSbproto3'
- , true);
-
- static::$is_initialized = true;
- }
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/Resource.php b/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/Resource.php
deleted file mode 100644
index 676a5e649ede..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/GPBMetadata/Google/Cloud/Speech/V1/Resource.php
+++ /dev/null
@@ -1,57 +0,0 @@
-internalAddGeneratedFile(
- '
-“
-%google/cloud/speech/v1/resource.protogoogle.cloud.speech.v1"ü
-CustomClass
-name (
-custom_class_id ( <
-items (2-.google.cloud.speech.v1.CustomClass.ClassItem
- ClassItem
-value ( :lêAi
-!speech.googleapis.com/CustomClassDprojects/{project}/locations/{location}/customClasses/{custom_class}"ò
- PhraseSet
-name ( 9
-phrases (2(.google.cloud.speech.v1.PhraseSet.Phrase
-boost (&
-Phrase
-value (
-boost (:eêAb
-speech.googleapis.com/PhraseSet?projects/{project}/locations/{location}/phraseSets/{phrase_set}"½
-SpeechAdaptation6
-phrase_sets (2!.google.cloud.speech.v1.PhraseSetC
-phrase_set_references ( B$úA!
-speech.googleapis.com/PhraseSet;
-custom_classes (2#.google.cloud.speech.v1.CustomClassJ
-abnf_grammar (24.google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar#
-ABNFGrammar
-abnf_strings ( "£
-TranscriptNormalizationF
-entries (25.google.cloud.speech.v1.TranscriptNormalization.Entry@
-Entry
-search (
-replace (
-case_sensitive (Bp
-com.google.cloud.speech.v1BSpeechResourceProtoPZ2cloud.google.com/go/speech/apiv1/speechpb;speechpbø¢GCSbproto3'
- , true);
-
- static::$is_initialized = true;
- }
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CreateCustomClassRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CreateCustomClassRequest.php
deleted file mode 100644
index 53d4e019346a..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CreateCustomClassRequest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-google.cloud.speech.v1.CreateCustomClassRequest
- */
-class CreateCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string custom_class_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class_id = '';
- /**
- * Required. The custom class to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1.CustomClass custom_class = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type string $custom_class_id
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @type \Google\Cloud\Speech\V1\CustomClass $custom_class
- * Required. The custom class to create.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string custom_class_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getCustomClassId()
- {
- return $this->custom_class_id;
- }
-
- /**
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string custom_class_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setCustomClassId($var)
- {
- GPBUtil::checkString($var, True);
- $this->custom_class_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The custom class to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1.CustomClass custom_class = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\CustomClass|null
- */
- public function getCustomClass()
- {
- return $this->custom_class;
- }
-
- public function hasCustomClass()
- {
- return isset($this->custom_class);
- }
-
- public function clearCustomClass()
- {
- unset($this->custom_class);
- }
-
- /**
- * Required. The custom class to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1.CustomClass custom_class = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\CustomClass $var
- * @return $this
- */
- public function setCustomClass($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\CustomClass::class);
- $this->custom_class = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CreatePhraseSetRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CreatePhraseSetRequest.php
deleted file mode 100644
index 0fe95d4d3740..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CreatePhraseSetRequest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-google.cloud.speech.v1.CreatePhraseSetRequest
- */
-class CreatePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string phrase_set_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set_id = '';
- /**
- * Required. The phrase set to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1.PhraseSet phrase_set = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type string $phrase_set_id
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @type \Google\Cloud\Speech\V1\PhraseSet $phrase_set
- * Required. The phrase set to create.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string phrase_set_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getPhraseSetId()
- {
- return $this->phrase_set_id;
- }
-
- /**
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string phrase_set_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setPhraseSetId($var)
- {
- GPBUtil::checkString($var, True);
- $this->phrase_set_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The phrase set to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1.PhraseSet phrase_set = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\PhraseSet|null
- */
- public function getPhraseSet()
- {
- return $this->phrase_set;
- }
-
- public function hasPhraseSet()
- {
- return isset($this->phrase_set);
- }
-
- public function clearPhraseSet()
- {
- unset($this->phrase_set);
- }
-
- /**
- * Required. The phrase set to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1.PhraseSet phrase_set = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\PhraseSet $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\PhraseSet::class);
- $this->phrase_set = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CustomClass.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CustomClass.php
deleted file mode 100644
index 2b3dd86805fd..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CustomClass.php
+++ /dev/null
@@ -1,141 +0,0 @@
-google.cloud.speech.v1.CustomClass
- */
-class CustomClass extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resource name of the custom class.
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- *
- * Generated from protobuf field string custom_class_id = 2;
- */
- protected $custom_class_id = '';
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
- */
- private $items;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The resource name of the custom class.
- * @type string $custom_class_id
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- * @type array<\Google\Cloud\Speech\V1\CustomClass\ClassItem>|\Google\Protobuf\Internal\RepeatedField $items
- * A collection of class items.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resource name of the custom class.
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The resource name of the custom class.
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- *
- * Generated from protobuf field string custom_class_id = 2;
- * @return string
- */
- public function getCustomClassId()
- {
- return $this->custom_class_id;
- }
-
- /**
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- *
- * Generated from protobuf field string custom_class_id = 2;
- * @param string $var
- * @return $this
- */
- public function setCustomClassId($var)
- {
- GPBUtil::checkString($var, True);
- $this->custom_class_id = $var;
-
- return $this;
- }
-
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getItems()
- {
- return $this->items;
- }
-
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass.ClassItem items = 3;
- * @param array<\Google\Cloud\Speech\V1\CustomClass\ClassItem>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setItems($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\CustomClass\ClassItem::class);
- $this->items = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CustomClass/ClassItem.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CustomClass/ClassItem.php
deleted file mode 100644
index 6e1e3f2dd5ea..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/CustomClass/ClassItem.php
+++ /dev/null
@@ -1,70 +0,0 @@
-google.cloud.speech.v1.CustomClass.ClassItem
- */
-class ClassItem extends \Google\Protobuf\Internal\Message
-{
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- */
- protected $value = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $value
- * The class item's value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ClassItem::class, \Google\Cloud\Speech\V1\CustomClass_ClassItem::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/DeleteCustomClassRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/DeleteCustomClassRequest.php
deleted file mode 100644
index b464dc61a5db..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/DeleteCustomClassRequest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-google.cloud.speech.v1.DeleteCustomClassRequest
- */
-class DeleteCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/DeletePhraseSetRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/DeletePhraseSetRequest.php
deleted file mode 100644
index d0a4d6cd4800..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/DeletePhraseSetRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.speech.v1.DeletePhraseSetRequest
- */
-class DeletePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/GetCustomClassRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/GetCustomClassRequest.php
deleted file mode 100644
index faa207bba207..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/GetCustomClassRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.speech.v1.GetCustomClassRequest
- */
-class GetCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/GetPhraseSetRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/GetPhraseSetRequest.php
deleted file mode 100644
index 24e4a3826103..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/GetPhraseSetRequest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-google.cloud.speech.v1.GetPhraseSetRequest
- */
-class GetPhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListCustomClassesRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListCustomClassesRequest.php
deleted file mode 100644
index 74db0944080f..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListCustomClassesRequest.php
+++ /dev/null
@@ -1,183 +0,0 @@
-google.cloud.speech.v1.ListCustomClassesRequest
- */
-class ListCustomClassesRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type int $page_size
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- * @type string $page_token
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListCustomClassesResponse.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListCustomClassesResponse.php
deleted file mode 100644
index 396abd7d2e8d..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListCustomClassesResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.cloud.speech.v1.ListCustomClassesResponse
- */
-class ListCustomClassesResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The custom classes.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass custom_classes = 1;
- */
- private $custom_classes;
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
- * The custom classes.
- * @type string $next_page_token
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The custom classes.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass custom_classes = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getCustomClasses()
- {
- return $this->custom_classes;
- }
-
- /**
- * The custom classes.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass custom_classes = 1;
- * @param array<\Google\Cloud\Speech\V1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setCustomClasses($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\CustomClass::class);
- $this->custom_classes = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListPhraseSetRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListPhraseSetRequest.php
deleted file mode 100644
index 3b9e95fe6e2e..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListPhraseSetRequest.php
+++ /dev/null
@@ -1,183 +0,0 @@
-google.cloud.speech.v1.ListPhraseSetRequest
- */
-class ListPhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type int $page_size
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- * @type string $page_token
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListPhraseSetResponse.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListPhraseSetResponse.php
deleted file mode 100644
index ac23f482bdbe..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/ListPhraseSetResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.cloud.speech.v1.ListPhraseSetResponse
- */
-class ListPhraseSetResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The phrase set.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
- */
- private $phrase_sets;
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
- * The phrase set.
- * @type string $next_page_token
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The phrase set.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSets()
- {
- return $this->phrase_sets;
- }
-
- /**
- * The phrase set.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
- * @param array<\Google\Cloud\Speech\V1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSets($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\PhraseSet::class);
- $this->phrase_sets = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeMetadata.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeMetadata.php
deleted file mode 100644
index ce5ccd530060..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeMetadata.php
+++ /dev/null
@@ -1,199 +0,0 @@
-google.cloud.speech.v1.LongRunningRecognizeMetadata
- */
-class LongRunningRecognizeMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- */
- protected $progress_percent = 0;
- /**
- * Time when the request was received.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 2;
- */
- protected $start_time = null;
- /**
- * Time of the most recent processing update.
- *
- * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 3;
- */
- protected $last_update_time = null;
- /**
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- *
- * Generated from protobuf field string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $progress_percent
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- * @type \Google\Protobuf\Timestamp $start_time
- * Time when the request was received.
- * @type \Google\Protobuf\Timestamp $last_update_time
- * Time of the most recent processing update.
- * @type string $uri
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- * @return int
- */
- public function getProgressPercent()
- {
- return $this->progress_percent;
- }
-
- /**
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- * @param int $var
- * @return $this
- */
- public function setProgressPercent($var)
- {
- GPBUtil::checkInt32($var);
- $this->progress_percent = $var;
-
- return $this;
- }
-
- /**
- * Time when the request was received.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 2;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Time when the request was received.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 2;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Time of the most recent processing update.
- *
- * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 3;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getLastUpdateTime()
- {
- return $this->last_update_time;
- }
-
- public function hasLastUpdateTime()
- {
- return isset($this->last_update_time);
- }
-
- public function clearLastUpdateTime()
- {
- unset($this->last_update_time);
- }
-
- /**
- * Time of the most recent processing update.
- *
- * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 3;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setLastUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->last_update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- *
- * Generated from protobuf field string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUri()
- {
- return $this->uri;
- }
-
- /**
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- *
- * Generated from protobuf field string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeRequest.php
deleted file mode 100644
index e7b7744b9c7f..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeRequest.php
+++ /dev/null
@@ -1,170 +0,0 @@
-google.cloud.speech.v1.LongRunningRecognizeRequest
- */
-class LongRunningRecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $audio = null;
- /**
- * Optional. Specifies an optional destination for the recognition results.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptOutputConfig output_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $output_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1\RecognitionConfig $config
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @type \Google\Cloud\Speech\V1\RecognitionAudio $audio
- * Required. The audio data to be recognized.
- * @type \Google\Cloud\Speech\V1\TranscriptOutputConfig $output_config
- * Optional. Specifies an optional destination for the recognition results.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\RecognitionAudio|null
- */
- public function getAudio()
- {
- return $this->audio;
- }
-
- public function hasAudio()
- {
- return isset($this->audio);
- }
-
- public function clearAudio()
- {
- unset($this->audio);
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\RecognitionAudio $var
- * @return $this
- */
- public function setAudio($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionAudio::class);
- $this->audio = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specifies an optional destination for the recognition results.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptOutputConfig output_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Speech\V1\TranscriptOutputConfig|null
- */
- public function getOutputConfig()
- {
- return $this->output_config;
- }
-
- public function hasOutputConfig()
- {
- return isset($this->output_config);
- }
-
- public function clearOutputConfig()
- {
- unset($this->output_config);
- }
-
- /**
- * Optional. Specifies an optional destination for the recognition results.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptOutputConfig output_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Speech\V1\TranscriptOutputConfig $var
- * @return $this
- */
- public function setOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\TranscriptOutputConfig::class);
- $this->output_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeResponse.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeResponse.php
deleted file mode 100644
index cb8868a3216e..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/LongRunningRecognizeResponse.php
+++ /dev/null
@@ -1,289 +0,0 @@
-google.cloud.speech.v1.LongRunningRecognizeResponse
- */
-class LongRunningRecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
- */
- private $results;
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- */
- protected $total_billed_time = null;
- /**
- * Original output config if present in the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
- */
- protected $output_config = null;
- /**
- * If the transcript output fails this field contains the relevant error.
- *
- * Generated from protobuf field .google.rpc.Status output_error = 7;
- */
- protected $output_error = null;
- /**
- * Provides information on speech adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;
- */
- protected $speech_adaptation_info = null;
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 9;
- */
- protected $request_id = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- * @type \Google\Protobuf\Duration $total_billed_time
- * When available, billed audio seconds for the corresponding request.
- * @type \Google\Cloud\Speech\V1\TranscriptOutputConfig $output_config
- * Original output config if present in the request.
- * @type \Google\Rpc\Status $output_error
- * If the transcript output fails this field contains the relevant error.
- * @type \Google\Cloud\Speech\V1\SpeechAdaptationInfo $speech_adaptation_info
- * Provides information on speech adaptation behavior in response
- * @type int|string $request_id
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
- * @param array<\Google\Cloud\Speech\V1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledTime()
- {
- return $this->total_billed_time;
- }
-
- public function hasTotalBilledTime()
- {
- return isset($this->total_billed_time);
- }
-
- public function clearTotalBilledTime()
- {
- unset($this->total_billed_time);
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_time = $var;
-
- return $this;
- }
-
- /**
- * Original output config if present in the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
- * @return \Google\Cloud\Speech\V1\TranscriptOutputConfig|null
- */
- public function getOutputConfig()
- {
- return $this->output_config;
- }
-
- public function hasOutputConfig()
- {
- return isset($this->output_config);
- }
-
- public function clearOutputConfig()
- {
- unset($this->output_config);
- }
-
- /**
- * Original output config if present in the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptOutputConfig output_config = 6;
- * @param \Google\Cloud\Speech\V1\TranscriptOutputConfig $var
- * @return $this
- */
- public function setOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\TranscriptOutputConfig::class);
- $this->output_config = $var;
-
- return $this;
- }
-
- /**
- * If the transcript output fails this field contains the relevant error.
- *
- * Generated from protobuf field .google.rpc.Status output_error = 7;
- * @return \Google\Rpc\Status|null
- */
- public function getOutputError()
- {
- return $this->output_error;
- }
-
- public function hasOutputError()
- {
- return isset($this->output_error);
- }
-
- public function clearOutputError()
- {
- unset($this->output_error);
- }
-
- /**
- * If the transcript output fails this field contains the relevant error.
- *
- * Generated from protobuf field .google.rpc.Status output_error = 7;
- * @param \Google\Rpc\Status $var
- * @return $this
- */
- public function setOutputError($var)
- {
- GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
- $this->output_error = $var;
-
- return $this;
- }
-
- /**
- * Provides information on speech adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;
- * @return \Google\Cloud\Speech\V1\SpeechAdaptationInfo|null
- */
- public function getSpeechAdaptationInfo()
- {
- return $this->speech_adaptation_info;
- }
-
- public function hasSpeechAdaptationInfo()
- {
- return isset($this->speech_adaptation_info);
- }
-
- public function clearSpeechAdaptationInfo()
- {
- unset($this->speech_adaptation_info);
- }
-
- /**
- * Provides information on speech adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 8;
- * @param \Google\Cloud\Speech\V1\SpeechAdaptationInfo $var
- * @return $this
- */
- public function setSpeechAdaptationInfo($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptationInfo::class);
- $this->speech_adaptation_info = $var;
-
- return $this;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 9;
- * @return int|string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 9;
- * @param int|string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkInt64($var);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/PhraseSet.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/PhraseSet.php
deleted file mode 100644
index e96a5da1cacb..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/PhraseSet.php
+++ /dev/null
@@ -1,168 +0,0 @@
-google.cloud.speech.v1.PhraseSet
- */
-class PhraseSet extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resource name of the phrase set.
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
- */
- private $phrases;
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The resource name of the phrase set.
- * @type array<\Google\Cloud\Speech\V1\PhraseSet\Phrase>|\Google\Protobuf\Internal\RepeatedField $phrases
- * A list of word and phrases.
- * @type float $boost
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resource name of the phrase set.
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The resource name of the phrase set.
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhrases()
- {
- return $this->phrases;
- }
-
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet.Phrase phrases = 2;
- * @param array<\Google\Cloud\Speech\V1\PhraseSet\Phrase>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhrases($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\PhraseSet\Phrase::class);
- $this->phrases = $arr;
-
- return $this;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/PhraseSet/Phrase.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/PhraseSet/Phrase.php
deleted file mode 100644
index 64240f5fe189..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/PhraseSet/Phrase.php
+++ /dev/null
@@ -1,158 +0,0 @@
-google.cloud.speech.v1.PhraseSet.Phrase
- */
-class Phrase extends \Google\Protobuf\Internal\Message
-{
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- */
- protected $value = '';
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 2;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $value
- * The phrase itself.
- * @type float $boost
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 2;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 2;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Phrase::class, \Google\Cloud\Speech\V1\PhraseSet_Phrase::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionAudio.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionAudio.php
deleted file mode 100644
index f1ae5d0336b2..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionAudio.php
+++ /dev/null
@@ -1,138 +0,0 @@
-google.cloud.speech.v1.RecognitionAudio
- */
-class RecognitionAudio extends \Google\Protobuf\Internal\Message
-{
- protected $audio_source;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $content
- * The audio data bytes encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation, whereas JSON representations use base64.
- * @type string $uri
- * URI that points to a file that contains audio data bytes as specified in
- * `RecognitionConfig`. The file must not be compressed (for example, gzip).
- * Currently, only Google Cloud Storage URIs are
- * supported, which must be specified in the following format:
- * `gs://bucket_name/object_name` (other URI formats return
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
- * For more information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The audio data bytes encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation, whereas JSON representations use base64.
- *
- * Generated from protobuf field bytes content = 1;
- * @return string
- */
- public function getContent()
- {
- return $this->readOneof(1);
- }
-
- public function hasContent()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * The audio data bytes encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation, whereas JSON representations use base64.
- *
- * Generated from protobuf field bytes content = 1;
- * @param string $var
- * @return $this
- */
- public function setContent($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * URI that points to a file that contains audio data bytes as specified in
- * `RecognitionConfig`. The file must not be compressed (for example, gzip).
- * Currently, only Google Cloud Storage URIs are
- * supported, which must be specified in the following format:
- * `gs://bucket_name/object_name` (other URI formats return
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
- * For more information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * Generated from protobuf field string uri = 2;
- * @return string
- */
- public function getUri()
- {
- return $this->readOneof(2);
- }
-
- public function hasUri()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * URI that points to a file that contains audio data bytes as specified in
- * `RecognitionConfig`. The file must not be compressed (for example, gzip).
- * Currently, only Google Cloud Storage URIs are
- * supported, which must be specified in the following format:
- * `gs://bucket_name/object_name` (other URI formats return
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
- * For more information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * Generated from protobuf field string uri = 2;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getAudioSource()
- {
- return $this->whichOneof("audio_source");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionConfig.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionConfig.php
deleted file mode 100644
index 0db6abca0535..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionConfig.php
+++ /dev/null
@@ -1,1400 +0,0 @@
-google.cloud.speech.v1.RecognitionConfig
- */
-class RecognitionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig.AudioEncoding encoding = 1;
- */
- protected $encoding = 0;
- /**
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2;
- */
- protected $sample_rate_hertz = 0;
- /**
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- *
- * Generated from protobuf field int32 audio_channel_count = 7;
- */
- protected $audio_channel_count = 0;
- /**
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- *
- * Generated from protobuf field bool enable_separate_recognition_per_channel = 12;
- */
- protected $enable_separate_recognition_per_channel = false;
- /**
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- *
- * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $language_code = '';
- /**
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- *
- * Generated from protobuf field repeated string alternative_language_codes = 18;
- */
- private $alternative_language_codes;
- /**
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 4;
- */
- protected $max_alternatives = 0;
- /**
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 5;
- */
- protected $profanity_filter = false;
- /**
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
- */
- protected $adaptation = null;
- /**
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptNormalization transcript_normalization = 24 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $transcript_normalization = null;
- /**
- * Array of [SpeechContext][google.cloud.speech.v1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechContext speech_contexts = 6;
- */
- private $speech_contexts;
- /**
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 8;
- */
- protected $enable_word_time_offsets = false;
- /**
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 15;
- */
- protected $enable_word_confidence = false;
- /**
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 11;
- */
- protected $enable_automatic_punctuation = false;
- /**
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- */
- protected $enable_spoken_punctuation = null;
- /**
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- */
- protected $enable_spoken_emojis = null;
- /**
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeakerDiarizationConfig diarization_config = 19;
- */
- protected $diarization_config = null;
- /**
- * Metadata regarding this request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata metadata = 9;
- */
- protected $metadata = null;
- /**
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- *
- * Generated from protobuf field string model = 13;
- */
- protected $model = '';
- /**
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- *
- * Generated from protobuf field bool use_enhanced = 14;
- */
- protected $use_enhanced = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $encoding
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- * @type int $sample_rate_hertz
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- * @type int $audio_channel_count
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- * @type bool $enable_separate_recognition_per_channel
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- * @type string $language_code
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- * @type array|\Google\Protobuf\Internal\RepeatedField $alternative_language_codes
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- * @type int $max_alternatives
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- * @type bool $profanity_filter
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- * @type \Google\Cloud\Speech\V1\SpeechAdaptation $adaptation
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- * @type \Google\Cloud\Speech\V1\TranscriptNormalization $transcript_normalization
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- * @type array<\Google\Cloud\Speech\V1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $speech_contexts
- * Array of [SpeechContext][google.cloud.speech.v1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- * @type bool $enable_word_time_offsets
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- * @type bool $enable_word_confidence
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- * @type bool $enable_automatic_punctuation
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- * @type \Google\Protobuf\BoolValue $enable_spoken_punctuation
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- * @type \Google\Protobuf\BoolValue $enable_spoken_emojis
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- * @type \Google\Cloud\Speech\V1\SpeakerDiarizationConfig $diarization_config
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- * @type \Google\Cloud\Speech\V1\RecognitionMetadata $metadata
- * Metadata regarding this request.
- * @type string $model
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- * @type bool $use_enhanced
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig.AudioEncoding encoding = 1;
- * @return int
- */
- public function getEncoding()
- {
- return $this->encoding;
- }
-
- /**
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig.AudioEncoding encoding = 1;
- * @param int $var
- * @return $this
- */
- public function setEncoding($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding::class);
- $this->encoding = $var;
-
- return $this;
- }
-
- /**
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2;
- * @return int
- */
- public function getSampleRateHertz()
- {
- return $this->sample_rate_hertz;
- }
-
- /**
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2;
- * @param int $var
- * @return $this
- */
- public function setSampleRateHertz($var)
- {
- GPBUtil::checkInt32($var);
- $this->sample_rate_hertz = $var;
-
- return $this;
- }
-
- /**
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- *
- * Generated from protobuf field int32 audio_channel_count = 7;
- * @return int
- */
- public function getAudioChannelCount()
- {
- return $this->audio_channel_count;
- }
-
- /**
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- *
- * Generated from protobuf field int32 audio_channel_count = 7;
- * @param int $var
- * @return $this
- */
- public function setAudioChannelCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->audio_channel_count = $var;
-
- return $this;
- }
-
- /**
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- *
- * Generated from protobuf field bool enable_separate_recognition_per_channel = 12;
- * @return bool
- */
- public function getEnableSeparateRecognitionPerChannel()
- {
- return $this->enable_separate_recognition_per_channel;
- }
-
- /**
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- *
- * Generated from protobuf field bool enable_separate_recognition_per_channel = 12;
- * @param bool $var
- * @return $this
- */
- public function setEnableSeparateRecognitionPerChannel($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_separate_recognition_per_channel = $var;
-
- return $this;
- }
-
- /**
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- *
- * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- *
- * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
- /**
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- *
- * Generated from protobuf field repeated string alternative_language_codes = 18;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternativeLanguageCodes()
- {
- return $this->alternative_language_codes;
- }
-
- /**
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- *
- * Generated from protobuf field repeated string alternative_language_codes = 18;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternativeLanguageCodes($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->alternative_language_codes = $arr;
-
- return $this;
- }
-
- /**
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 4;
- * @return int
- */
- public function getMaxAlternatives()
- {
- return $this->max_alternatives;
- }
-
- /**
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 4;
- * @param int $var
- * @return $this
- */
- public function setMaxAlternatives($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_alternatives = $var;
-
- return $this;
- }
-
- /**
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 5;
- * @return bool
- */
- public function getProfanityFilter()
- {
- return $this->profanity_filter;
- }
-
- /**
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 5;
- * @param bool $var
- * @return $this
- */
- public function setProfanityFilter($var)
- {
- GPBUtil::checkBool($var);
- $this->profanity_filter = $var;
-
- return $this;
- }
-
- /**
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
- * @return \Google\Cloud\Speech\V1\SpeechAdaptation|null
- */
- public function getAdaptation()
- {
- return $this->adaptation;
- }
-
- public function hasAdaptation()
- {
- return isset($this->adaptation);
- }
-
- public function clearAdaptation()
- {
- unset($this->adaptation);
- }
-
- /**
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptation adaptation = 20;
- * @param \Google\Cloud\Speech\V1\SpeechAdaptation $var
- * @return $this
- */
- public function setAdaptation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptation::class);
- $this->adaptation = $var;
-
- return $this;
- }
-
- /**
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptNormalization transcript_normalization = 24 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Speech\V1\TranscriptNormalization|null
- */
- public function getTranscriptNormalization()
- {
- return $this->transcript_normalization;
- }
-
- public function hasTranscriptNormalization()
- {
- return isset($this->transcript_normalization);
- }
-
- public function clearTranscriptNormalization()
- {
- unset($this->transcript_normalization);
- }
-
- /**
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v1.TranscriptNormalization transcript_normalization = 24 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Speech\V1\TranscriptNormalization $var
- * @return $this
- */
- public function setTranscriptNormalization($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\TranscriptNormalization::class);
- $this->transcript_normalization = $var;
-
- return $this;
- }
-
- /**
- * Array of [SpeechContext][google.cloud.speech.v1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechContext speech_contexts = 6;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSpeechContexts()
- {
- return $this->speech_contexts;
- }
-
- /**
- * Array of [SpeechContext][google.cloud.speech.v1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechContext speech_contexts = 6;
- * @param array<\Google\Cloud\Speech\V1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSpeechContexts($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechContext::class);
- $this->speech_contexts = $arr;
-
- return $this;
- }
-
- /**
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 8;
- * @return bool
- */
- public function getEnableWordTimeOffsets()
- {
- return $this->enable_word_time_offsets;
- }
-
- /**
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 8;
- * @param bool $var
- * @return $this
- */
- public function setEnableWordTimeOffsets($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_word_time_offsets = $var;
-
- return $this;
- }
-
- /**
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 15;
- * @return bool
- */
- public function getEnableWordConfidence()
- {
- return $this->enable_word_confidence;
- }
-
- /**
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 15;
- * @param bool $var
- * @return $this
- */
- public function setEnableWordConfidence($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_word_confidence = $var;
-
- return $this;
- }
-
- /**
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 11;
- * @return bool
- */
- public function getEnableAutomaticPunctuation()
- {
- return $this->enable_automatic_punctuation;
- }
-
- /**
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 11;
- * @param bool $var
- * @return $this
- */
- public function setEnableAutomaticPunctuation($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_automatic_punctuation = $var;
-
- return $this;
- }
-
- /**
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @return \Google\Protobuf\BoolValue|null
- */
- public function getEnableSpokenPunctuation()
- {
- return $this->enable_spoken_punctuation;
- }
-
- public function hasEnableSpokenPunctuation()
- {
- return isset($this->enable_spoken_punctuation);
- }
-
- public function clearEnableSpokenPunctuation()
- {
- unset($this->enable_spoken_punctuation);
- }
-
- /**
- * Returns the unboxed value from getEnableSpokenPunctuation()
-
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @return bool|null
- */
- public function getEnableSpokenPunctuationUnwrapped()
- {
- return $this->readWrapperValue("enable_spoken_punctuation");
- }
-
- /**
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @param \Google\Protobuf\BoolValue $var
- * @return $this
- */
- public function setEnableSpokenPunctuation($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
- $this->enable_spoken_punctuation = $var;
-
- return $this;
- }
-
- /**
- * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
-
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @param bool|null $var
- * @return $this
- */
- public function setEnableSpokenPunctuationUnwrapped($var)
- {
- $this->writeWrapperValue("enable_spoken_punctuation", $var);
- return $this;}
-
- /**
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @return \Google\Protobuf\BoolValue|null
- */
- public function getEnableSpokenEmojis()
- {
- return $this->enable_spoken_emojis;
- }
-
- public function hasEnableSpokenEmojis()
- {
- return isset($this->enable_spoken_emojis);
- }
-
- public function clearEnableSpokenEmojis()
- {
- unset($this->enable_spoken_emojis);
- }
-
- /**
- * Returns the unboxed value from getEnableSpokenEmojis()
-
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @return bool|null
- */
- public function getEnableSpokenEmojisUnwrapped()
- {
- return $this->readWrapperValue("enable_spoken_emojis");
- }
-
- /**
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @param \Google\Protobuf\BoolValue $var
- * @return $this
- */
- public function setEnableSpokenEmojis($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
- $this->enable_spoken_emojis = $var;
-
- return $this;
- }
-
- /**
- * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
-
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @param bool|null $var
- * @return $this
- */
- public function setEnableSpokenEmojisUnwrapped($var)
- {
- $this->writeWrapperValue("enable_spoken_emojis", $var);
- return $this;}
-
- /**
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeakerDiarizationConfig diarization_config = 19;
- * @return \Google\Cloud\Speech\V1\SpeakerDiarizationConfig|null
- */
- public function getDiarizationConfig()
- {
- return $this->diarization_config;
- }
-
- public function hasDiarizationConfig()
- {
- return isset($this->diarization_config);
- }
-
- public function clearDiarizationConfig()
- {
- unset($this->diarization_config);
- }
-
- /**
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeakerDiarizationConfig diarization_config = 19;
- * @param \Google\Cloud\Speech\V1\SpeakerDiarizationConfig $var
- * @return $this
- */
- public function setDiarizationConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeakerDiarizationConfig::class);
- $this->diarization_config = $var;
-
- return $this;
- }
-
- /**
- * Metadata regarding this request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata metadata = 9;
- * @return \Google\Cloud\Speech\V1\RecognitionMetadata|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata regarding this request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata metadata = 9;
- * @param \Google\Cloud\Speech\V1\RecognitionMetadata $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionMetadata::class);
- $this->metadata = $var;
-
- return $this;
- }
-
- /**
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- *
- * Generated from protobuf field string model = 13;
- * @return string
- */
- public function getModel()
- {
- return $this->model;
- }
-
- /**
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- *
- * Generated from protobuf field string model = 13;
- * @param string $var
- * @return $this
- */
- public function setModel($var)
- {
- GPBUtil::checkString($var, True);
- $this->model = $var;
-
- return $this;
- }
-
- /**
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- *
- * Generated from protobuf field bool use_enhanced = 14;
- * @return bool
- */
- public function getUseEnhanced()
- {
- return $this->use_enhanced;
- }
-
- /**
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- *
- * Generated from protobuf field bool use_enhanced = 14;
- * @param bool $var
- * @return $this
- */
- public function setUseEnhanced($var)
- {
- GPBUtil::checkBool($var);
- $this->use_enhanced = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionConfig/AudioEncoding.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionConfig/AudioEncoding.php
deleted file mode 100644
index 50fd5b44c03b..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionConfig/AudioEncoding.php
+++ /dev/null
@@ -1,157 +0,0 @@
-google.cloud.speech.v1.RecognitionConfig.AudioEncoding
- */
-class AudioEncoding
-{
- /**
- * Not specified.
- *
- * Generated from protobuf enum ENCODING_UNSPECIFIED = 0;
- */
- const ENCODING_UNSPECIFIED = 0;
- /**
- * Uncompressed 16-bit signed little-endian samples (Linear PCM).
- *
- * Generated from protobuf enum LINEAR16 = 1;
- */
- const LINEAR16 = 1;
- /**
- * `FLAC` (Free Lossless Audio
- * Codec) is the recommended encoding because it is
- * lossless--therefore recognition is not compromised--and
- * requires only about half the bandwidth of `LINEAR16`. `FLAC` stream
- * encoding supports 16-bit and 24-bit samples, however, not all fields in
- * `STREAMINFO` are supported.
- *
- * Generated from protobuf enum FLAC = 2;
- */
- const FLAC = 2;
- /**
- * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
- *
- * Generated from protobuf enum MULAW = 3;
- */
- const MULAW = 3;
- /**
- * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
- *
- * Generated from protobuf enum AMR = 4;
- */
- const AMR = 4;
- /**
- * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
- *
- * Generated from protobuf enum AMR_WB = 5;
- */
- const AMR_WB = 5;
- /**
- * Opus encoded audio frames in Ogg container
- * ([OggOpus](https://wiki.xiph.org/OggOpus)).
- * `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.
- *
- * Generated from protobuf enum OGG_OPUS = 6;
- */
- const OGG_OPUS = 6;
- /**
- * Although the use of lossy encodings is not recommended, if a very low
- * bitrate encoding is required, `OGG_OPUS` is highly preferred over
- * Speex encoding. The [Speex](https://speex.org/) encoding supported by
- * Cloud Speech API has a header byte in each block, as in MIME type
- * `audio/x-speex-with-header-byte`.
- * It is a variant of the RTP Speex encoding defined in
- * [RFC 5574](https://tools.ietf.org/html/rfc5574).
- * The stream is a sequence of blocks, one block per RTP packet. Each block
- * starts with a byte containing the length of the block, in bytes, followed
- * by one or more frames of Speex data, padded to an integral number of
- * bytes (octets) as specified in RFC 5574. In other words, each RTP header
- * is replaced with a single byte containing the block length. Only Speex
- * wideband is supported. `sample_rate_hertz` must be 16000.
- *
- * Generated from protobuf enum SPEEX_WITH_HEADER_BYTE = 7;
- */
- const SPEEX_WITH_HEADER_BYTE = 7;
- /**
- * MP3 audio. MP3 encoding is a Beta feature and only available in
- * v1p1beta1. Support all standard MP3 bitrates (which range from 32-320
- * kbps). When using this encoding, `sample_rate_hertz` has to match the
- * sample rate of the file being used.
- *
- * Generated from protobuf enum MP3 = 8;
- */
- const MP3 = 8;
- /**
- * Opus encoded audio frames in WebM container
- * ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
- * one of 8000, 12000, 16000, 24000, or 48000.
- *
- * Generated from protobuf enum WEBM_OPUS = 9;
- */
- const WEBM_OPUS = 9;
-
- private static $valueToName = [
- self::ENCODING_UNSPECIFIED => 'ENCODING_UNSPECIFIED',
- self::LINEAR16 => 'LINEAR16',
- self::FLAC => 'FLAC',
- self::MULAW => 'MULAW',
- self::AMR => 'AMR',
- self::AMR_WB => 'AMR_WB',
- self::OGG_OPUS => 'OGG_OPUS',
- self::SPEEX_WITH_HEADER_BYTE => 'SPEEX_WITH_HEADER_BYTE',
- self::MP3 => 'MP3',
- self::WEBM_OPUS => 'WEBM_OPUS',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AudioEncoding::class, \Google\Cloud\Speech\V1\RecognitionConfig_AudioEncoding::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata.php
deleted file mode 100644
index ca38e225d179..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata.php
+++ /dev/null
@@ -1,342 +0,0 @@
-google.cloud.speech.v1.RecognitionMetadata
- */
-class RecognitionMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * The use case most closely describing the audio content to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.InteractionType interaction_type = 1;
- */
- protected $interaction_type = 0;
- /**
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- *
- * Generated from protobuf field uint32 industry_naics_code_of_audio = 3;
- */
- protected $industry_naics_code_of_audio = 0;
- /**
- * The audio type that most closely describes the audio being recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;
- */
- protected $microphone_distance = 0;
- /**
- * The original media the speech was recorded on.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType original_media_type = 5;
- */
- protected $original_media_type = 0;
- /**
- * The type of device the speech was recorded with.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;
- */
- protected $recording_device_type = 0;
- /**
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- *
- * Generated from protobuf field string recording_device_name = 7;
- */
- protected $recording_device_name = '';
- /**
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- *
- * Generated from protobuf field string original_mime_type = 8;
- */
- protected $original_mime_type = '';
- /**
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- *
- * Generated from protobuf field string audio_topic = 10;
- */
- protected $audio_topic = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $interaction_type
- * The use case most closely describing the audio content to be recognized.
- * @type int $industry_naics_code_of_audio
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- * @type int $microphone_distance
- * The audio type that most closely describes the audio being recognized.
- * @type int $original_media_type
- * The original media the speech was recorded on.
- * @type int $recording_device_type
- * The type of device the speech was recorded with.
- * @type string $recording_device_name
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- * @type string $original_mime_type
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- * @type string $audio_topic
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The use case most closely describing the audio content to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.InteractionType interaction_type = 1;
- * @return int
- */
- public function getInteractionType()
- {
- return $this->interaction_type;
- }
-
- /**
- * The use case most closely describing the audio content to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.InteractionType interaction_type = 1;
- * @param int $var
- * @return $this
- */
- public function setInteractionType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1\RecognitionMetadata\InteractionType::class);
- $this->interaction_type = $var;
-
- return $this;
- }
-
- /**
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- *
- * Generated from protobuf field uint32 industry_naics_code_of_audio = 3;
- * @return int
- */
- public function getIndustryNaicsCodeOfAudio()
- {
- return $this->industry_naics_code_of_audio;
- }
-
- /**
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- *
- * Generated from protobuf field uint32 industry_naics_code_of_audio = 3;
- * @param int $var
- * @return $this
- */
- public function setIndustryNaicsCodeOfAudio($var)
- {
- GPBUtil::checkUint32($var);
- $this->industry_naics_code_of_audio = $var;
-
- return $this;
- }
-
- /**
- * The audio type that most closely describes the audio being recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;
- * @return int
- */
- public function getMicrophoneDistance()
- {
- return $this->microphone_distance;
- }
-
- /**
- * The audio type that most closely describes the audio being recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;
- * @param int $var
- * @return $this
- */
- public function setMicrophoneDistance($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1\RecognitionMetadata\MicrophoneDistance::class);
- $this->microphone_distance = $var;
-
- return $this;
- }
-
- /**
- * The original media the speech was recorded on.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType original_media_type = 5;
- * @return int
- */
- public function getOriginalMediaType()
- {
- return $this->original_media_type;
- }
-
- /**
- * The original media the speech was recorded on.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType original_media_type = 5;
- * @param int $var
- * @return $this
- */
- public function setOriginalMediaType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1\RecognitionMetadata\OriginalMediaType::class);
- $this->original_media_type = $var;
-
- return $this;
- }
-
- /**
- * The type of device the speech was recorded with.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;
- * @return int
- */
- public function getRecordingDeviceType()
- {
- return $this->recording_device_type;
- }
-
- /**
- * The type of device the speech was recorded with.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;
- * @param int $var
- * @return $this
- */
- public function setRecordingDeviceType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1\RecognitionMetadata\RecordingDeviceType::class);
- $this->recording_device_type = $var;
-
- return $this;
- }
-
- /**
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- *
- * Generated from protobuf field string recording_device_name = 7;
- * @return string
- */
- public function getRecordingDeviceName()
- {
- return $this->recording_device_name;
- }
-
- /**
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- *
- * Generated from protobuf field string recording_device_name = 7;
- * @param string $var
- * @return $this
- */
- public function setRecordingDeviceName($var)
- {
- GPBUtil::checkString($var, True);
- $this->recording_device_name = $var;
-
- return $this;
- }
-
- /**
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- *
- * Generated from protobuf field string original_mime_type = 8;
- * @return string
- */
- public function getOriginalMimeType()
- {
- return $this->original_mime_type;
- }
-
- /**
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- *
- * Generated from protobuf field string original_mime_type = 8;
- * @param string $var
- * @return $this
- */
- public function setOriginalMimeType($var)
- {
- GPBUtil::checkString($var, True);
- $this->original_mime_type = $var;
-
- return $this;
- }
-
- /**
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- *
- * Generated from protobuf field string audio_topic = 10;
- * @return string
- */
- public function getAudioTopic()
- {
- return $this->audio_topic;
- }
-
- /**
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- *
- * Generated from protobuf field string audio_topic = 10;
- * @param string $var
- * @return $this
- */
- public function setAudioTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->audio_topic = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/InteractionType.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/InteractionType.php
deleted file mode 100644
index 8fa2616b04d0..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/InteractionType.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.speech.v1.RecognitionMetadata.InteractionType
- */
-class InteractionType
-{
- /**
- * Use case is either unknown or is something other than one of the other
- * values below.
- *
- * Generated from protobuf enum INTERACTION_TYPE_UNSPECIFIED = 0;
- */
- const INTERACTION_TYPE_UNSPECIFIED = 0;
- /**
- * Multiple people in a conversation or discussion. For example in a
- * meeting with two or more people actively participating. Typically
- * all the primary people speaking would be in the same room (if not,
- * see PHONE_CALL)
- *
- * Generated from protobuf enum DISCUSSION = 1;
- */
- const DISCUSSION = 1;
- /**
- * One or more persons lecturing or presenting to others, mostly
- * uninterrupted.
- *
- * Generated from protobuf enum PRESENTATION = 2;
- */
- const PRESENTATION = 2;
- /**
- * A phone-call or video-conference in which two or more people, who are
- * not in the same room, are actively participating.
- *
- * Generated from protobuf enum PHONE_CALL = 3;
- */
- const PHONE_CALL = 3;
- /**
- * A recorded message intended for another person to listen to.
- *
- * Generated from protobuf enum VOICEMAIL = 4;
- */
- const VOICEMAIL = 4;
- /**
- * Professionally produced audio (eg. TV Show, Podcast).
- *
- * Generated from protobuf enum PROFESSIONALLY_PRODUCED = 5;
- */
- const PROFESSIONALLY_PRODUCED = 5;
- /**
- * Transcribe spoken questions and queries into text.
- *
- * Generated from protobuf enum VOICE_SEARCH = 6;
- */
- const VOICE_SEARCH = 6;
- /**
- * Transcribe voice commands, such as for controlling a device.
- *
- * Generated from protobuf enum VOICE_COMMAND = 7;
- */
- const VOICE_COMMAND = 7;
- /**
- * Transcribe speech to text to create a written document, such as a
- * text-message, email or report.
- *
- * Generated from protobuf enum DICTATION = 8;
- */
- const DICTATION = 8;
-
- private static $valueToName = [
- self::INTERACTION_TYPE_UNSPECIFIED => 'INTERACTION_TYPE_UNSPECIFIED',
- self::DISCUSSION => 'DISCUSSION',
- self::PRESENTATION => 'PRESENTATION',
- self::PHONE_CALL => 'PHONE_CALL',
- self::VOICEMAIL => 'VOICEMAIL',
- self::PROFESSIONALLY_PRODUCED => 'PROFESSIONALLY_PRODUCED',
- self::VOICE_SEARCH => 'VOICE_SEARCH',
- self::VOICE_COMMAND => 'VOICE_COMMAND',
- self::DICTATION => 'DICTATION',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(InteractionType::class, \Google\Cloud\Speech\V1\RecognitionMetadata_InteractionType::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/MicrophoneDistance.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/MicrophoneDistance.php
deleted file mode 100644
index f37bb04a735e..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/MicrophoneDistance.php
+++ /dev/null
@@ -1,73 +0,0 @@
-google.cloud.speech.v1.RecognitionMetadata.MicrophoneDistance
- */
-class MicrophoneDistance
-{
- /**
- * Audio type is not known.
- *
- * Generated from protobuf enum MICROPHONE_DISTANCE_UNSPECIFIED = 0;
- */
- const MICROPHONE_DISTANCE_UNSPECIFIED = 0;
- /**
- * The audio was captured from a closely placed microphone. Eg. phone,
- * dictaphone, or handheld microphone. Generally if there speaker is within
- * 1 meter of the microphone.
- *
- * Generated from protobuf enum NEARFIELD = 1;
- */
- const NEARFIELD = 1;
- /**
- * The speaker if within 3 meters of the microphone.
- *
- * Generated from protobuf enum MIDFIELD = 2;
- */
- const MIDFIELD = 2;
- /**
- * The speaker is more than 3 meters away from the microphone.
- *
- * Generated from protobuf enum FARFIELD = 3;
- */
- const FARFIELD = 3;
-
- private static $valueToName = [
- self::MICROPHONE_DISTANCE_UNSPECIFIED => 'MICROPHONE_DISTANCE_UNSPECIFIED',
- self::NEARFIELD => 'NEARFIELD',
- self::MIDFIELD => 'MIDFIELD',
- self::FARFIELD => 'FARFIELD',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(MicrophoneDistance::class, \Google\Cloud\Speech\V1\RecognitionMetadata_MicrophoneDistance::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/OriginalMediaType.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/OriginalMediaType.php
deleted file mode 100644
index 60fb799f1a6f..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/OriginalMediaType.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.cloud.speech.v1.RecognitionMetadata.OriginalMediaType
- */
-class OriginalMediaType
-{
- /**
- * Unknown original media type.
- *
- * Generated from protobuf enum ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0;
- */
- const ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0;
- /**
- * The speech data is an audio recording.
- *
- * Generated from protobuf enum AUDIO = 1;
- */
- const AUDIO = 1;
- /**
- * The speech data originally recorded on a video.
- *
- * Generated from protobuf enum VIDEO = 2;
- */
- const VIDEO = 2;
-
- private static $valueToName = [
- self::ORIGINAL_MEDIA_TYPE_UNSPECIFIED => 'ORIGINAL_MEDIA_TYPE_UNSPECIFIED',
- self::AUDIO => 'AUDIO',
- self::VIDEO => 'VIDEO',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(OriginalMediaType::class, \Google\Cloud\Speech\V1\RecognitionMetadata_OriginalMediaType::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/RecordingDeviceType.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/RecordingDeviceType.php
deleted file mode 100644
index f4959f25d704..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognitionMetadata/RecordingDeviceType.php
+++ /dev/null
@@ -1,92 +0,0 @@
-google.cloud.speech.v1.RecognitionMetadata.RecordingDeviceType
- */
-class RecordingDeviceType
-{
- /**
- * The recording device is unknown.
- *
- * Generated from protobuf enum RECORDING_DEVICE_TYPE_UNSPECIFIED = 0;
- */
- const RECORDING_DEVICE_TYPE_UNSPECIFIED = 0;
- /**
- * Speech was recorded on a smartphone.
- *
- * Generated from protobuf enum SMARTPHONE = 1;
- */
- const SMARTPHONE = 1;
- /**
- * Speech was recorded using a personal computer or tablet.
- *
- * Generated from protobuf enum PC = 2;
- */
- const PC = 2;
- /**
- * Speech was recorded over a phone line.
- *
- * Generated from protobuf enum PHONE_LINE = 3;
- */
- const PHONE_LINE = 3;
- /**
- * Speech was recorded in a vehicle.
- *
- * Generated from protobuf enum VEHICLE = 4;
- */
- const VEHICLE = 4;
- /**
- * Speech was recorded outdoors.
- *
- * Generated from protobuf enum OTHER_OUTDOOR_DEVICE = 5;
- */
- const OTHER_OUTDOOR_DEVICE = 5;
- /**
- * Speech was recorded indoors.
- *
- * Generated from protobuf enum OTHER_INDOOR_DEVICE = 6;
- */
- const OTHER_INDOOR_DEVICE = 6;
-
- private static $valueToName = [
- self::RECORDING_DEVICE_TYPE_UNSPECIFIED => 'RECORDING_DEVICE_TYPE_UNSPECIFIED',
- self::SMARTPHONE => 'SMARTPHONE',
- self::PC => 'PC',
- self::PHONE_LINE => 'PHONE_LINE',
- self::VEHICLE => 'VEHICLE',
- self::OTHER_OUTDOOR_DEVICE => 'OTHER_OUTDOOR_DEVICE',
- self::OTHER_INDOOR_DEVICE => 'OTHER_INDOOR_DEVICE',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(RecordingDeviceType::class, \Google\Cloud\Speech\V1\RecognitionMetadata_RecordingDeviceType::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognizeRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognizeRequest.php
deleted file mode 100644
index 1b7b363b9147..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognizeRequest.php
+++ /dev/null
@@ -1,125 +0,0 @@
-google.cloud.speech.v1.RecognizeRequest
- */
-class RecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $audio = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1\RecognitionConfig $config
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @type \Google\Cloud\Speech\V1\RecognitionAudio $audio
- * Required. The audio data to be recognized.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\RecognitionAudio|null
- */
- public function getAudio()
- {
- return $this->audio;
- }
-
- public function hasAudio()
- {
- return isset($this->audio);
- }
-
- public function clearAudio()
- {
- unset($this->audio);
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\RecognitionAudio $var
- * @return $this
- */
- public function setAudio($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionAudio::class);
- $this->audio = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognizeResponse.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognizeResponse.php
deleted file mode 100644
index ef44cd3b401c..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/RecognizeResponse.php
+++ /dev/null
@@ -1,199 +0,0 @@
-google.cloud.speech.v1.RecognizeResponse
- */
-class RecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
- */
- private $results;
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- */
- protected $total_billed_time = null;
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
- */
- protected $speech_adaptation_info = null;
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 8;
- */
- protected $request_id = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- * @type \Google\Protobuf\Duration $total_billed_time
- * When available, billed audio seconds for the corresponding request.
- * @type \Google\Cloud\Speech\V1\SpeechAdaptationInfo $speech_adaptation_info
- * Provides information on adaptation behavior in response
- * @type int|string $request_id
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionResult results = 2;
- * @param array<\Google\Cloud\Speech\V1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledTime()
- {
- return $this->total_billed_time;
- }
-
- public function hasTotalBilledTime()
- {
- return isset($this->total_billed_time);
- }
-
- public function clearTotalBilledTime()
- {
- unset($this->total_billed_time);
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_time = $var;
-
- return $this;
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
- * @return \Google\Cloud\Speech\V1\SpeechAdaptationInfo|null
- */
- public function getSpeechAdaptationInfo()
- {
- return $this->speech_adaptation_info;
- }
-
- public function hasSpeechAdaptationInfo()
- {
- return isset($this->speech_adaptation_info);
- }
-
- public function clearSpeechAdaptationInfo()
- {
- unset($this->speech_adaptation_info);
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 7;
- * @param \Google\Cloud\Speech\V1\SpeechAdaptationInfo $var
- * @return $this
- */
- public function setSpeechAdaptationInfo($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptationInfo::class);
- $this->speech_adaptation_info = $var;
-
- return $this;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 8;
- * @return int|string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 8;
- * @param int|string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkInt64($var);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeakerDiarizationConfig.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeakerDiarizationConfig.php
deleted file mode 100644
index 50067b5634e1..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeakerDiarizationConfig.php
+++ /dev/null
@@ -1,198 +0,0 @@
-google.cloud.speech.v1.SpeakerDiarizationConfig
- */
-class SpeakerDiarizationConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_label
- * provided in the WordInfo.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 1;
- */
- protected $enable_speaker_diarization = false;
- /**
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- *
- * Generated from protobuf field int32 min_speaker_count = 2;
- */
- protected $min_speaker_count = 0;
- /**
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- *
- * Generated from protobuf field int32 max_speaker_count = 3;
- */
- protected $max_speaker_count = 0;
- /**
- * Output only. Unused.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @deprecated
- */
- protected $speaker_tag = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $enable_speaker_diarization
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_label
- * provided in the WordInfo.
- * @type int $min_speaker_count
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- * @type int $max_speaker_count
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- * @type int $speaker_tag
- * Output only. Unused.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_label
- * provided in the WordInfo.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 1;
- * @return bool
- */
- public function getEnableSpeakerDiarization()
- {
- return $this->enable_speaker_diarization;
- }
-
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_label
- * provided in the WordInfo.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 1;
- * @param bool $var
- * @return $this
- */
- public function setEnableSpeakerDiarization($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_speaker_diarization = $var;
-
- return $this;
- }
-
- /**
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- *
- * Generated from protobuf field int32 min_speaker_count = 2;
- * @return int
- */
- public function getMinSpeakerCount()
- {
- return $this->min_speaker_count;
- }
-
- /**
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- *
- * Generated from protobuf field int32 min_speaker_count = 2;
- * @param int $var
- * @return $this
- */
- public function setMinSpeakerCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->min_speaker_count = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- *
- * Generated from protobuf field int32 max_speaker_count = 3;
- * @return int
- */
- public function getMaxSpeakerCount()
- {
- return $this->max_speaker_count;
- }
-
- /**
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- *
- * Generated from protobuf field int32 max_speaker_count = 3;
- * @param int $var
- * @return $this
- */
- public function setMaxSpeakerCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_speaker_count = $var;
-
- return $this;
- }
-
- /**
- * Output only. Unused.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- * @deprecated
- */
- public function getSpeakerTag()
- {
- @trigger_error('speaker_tag is deprecated.', E_USER_DEPRECATED);
- return $this->speaker_tag;
- }
-
- /**
- * Output only. Unused.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- * @deprecated
- */
- public function setSpeakerTag($var)
- {
- @trigger_error('speaker_tag is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkInt32($var);
- $this->speaker_tag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptation.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptation.php
deleted file mode 100644
index 6f273a11a4b7..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptation.php
+++ /dev/null
@@ -1,207 +0,0 @@
-google.cloud.speech.v1.SpeechAdaptation
- */
-class SpeechAdaptation extends \Google\Protobuf\Internal\Message
-{
- /**
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
- */
- private $phrase_sets;
- /**
- * A collection of phrase set resource names to use.
- *
- * Generated from protobuf field repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {
- */
- private $phrase_set_references;
- /**
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
- */
- private $custom_classes;
- /**
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;
- */
- protected $abnf_grammar = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_set_references
- * A collection of phrase set resource names to use.
- * @type array<\Google\Cloud\Speech\V1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- * @type \Google\Cloud\Speech\V1\SpeechAdaptation\ABNFGrammar $abnf_grammar
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSets()
- {
- return $this->phrase_sets;
- }
-
- /**
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.PhraseSet phrase_sets = 1;
- * @param array<\Google\Cloud\Speech\V1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSets($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\PhraseSet::class);
- $this->phrase_sets = $arr;
-
- return $this;
- }
-
- /**
- * A collection of phrase set resource names to use.
- *
- * Generated from protobuf field repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSetReferences()
- {
- return $this->phrase_set_references;
- }
-
- /**
- * A collection of phrase set resource names to use.
- *
- * Generated from protobuf field repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSetReferences($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->phrase_set_references = $arr;
-
- return $this;
- }
-
- /**
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getCustomClasses()
- {
- return $this->custom_classes;
- }
-
- /**
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.CustomClass custom_classes = 3;
- * @param array<\Google\Cloud\Speech\V1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setCustomClasses($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\CustomClass::class);
- $this->custom_classes = $arr;
-
- return $this;
- }
-
- /**
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;
- * @return \Google\Cloud\Speech\V1\SpeechAdaptation\ABNFGrammar|null
- */
- public function getAbnfGrammar()
- {
- return $this->abnf_grammar;
- }
-
- public function hasAbnfGrammar()
- {
- return isset($this->abnf_grammar);
- }
-
- public function clearAbnfGrammar()
- {
- unset($this->abnf_grammar);
- }
-
- /**
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;
- * @param \Google\Cloud\Speech\V1\SpeechAdaptation\ABNFGrammar $var
- * @return $this
- */
- public function setAbnfGrammar($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptation\ABNFGrammar::class);
- $this->abnf_grammar = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptation/ABNFGrammar.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptation/ABNFGrammar.php
deleted file mode 100644
index e5ff973e0157..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptation/ABNFGrammar.php
+++ /dev/null
@@ -1,72 +0,0 @@
-google.cloud.speech.v1.SpeechAdaptation.ABNFGrammar
- */
-class ABNFGrammar extends \Google\Protobuf\Internal\Message
-{
- /**
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- *
- * Generated from protobuf field repeated string abnf_strings = 1;
- */
- private $abnf_strings;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $abnf_strings
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- *
- * Generated from protobuf field repeated string abnf_strings = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAbnfStrings()
- {
- return $this->abnf_strings;
- }
-
- /**
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- *
- * Generated from protobuf field repeated string abnf_strings = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAbnfStrings($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->abnf_strings = $arr;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ABNFGrammar::class, \Google\Cloud\Speech\V1\SpeechAdaptation_ABNFGrammar::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptationInfo.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptationInfo.php
deleted file mode 100644
index 8a6304f4922e..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechAdaptationInfo.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.cloud.speech.v1.SpeechAdaptationInfo
- */
-class SpeechAdaptationInfo extends \Google\Protobuf\Internal\Message
-{
- /**
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- *
- * Generated from protobuf field bool adaptation_timeout = 1;
- */
- protected $adaptation_timeout = false;
- /**
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- *
- * Generated from protobuf field string timeout_message = 4;
- */
- protected $timeout_message = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $adaptation_timeout
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- * @type string $timeout_message
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- *
- * Generated from protobuf field bool adaptation_timeout = 1;
- * @return bool
- */
- public function getAdaptationTimeout()
- {
- return $this->adaptation_timeout;
- }
-
- /**
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- *
- * Generated from protobuf field bool adaptation_timeout = 1;
- * @param bool $var
- * @return $this
- */
- public function setAdaptationTimeout($var)
- {
- GPBUtil::checkBool($var);
- $this->adaptation_timeout = $var;
-
- return $this;
- }
-
- /**
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- *
- * Generated from protobuf field string timeout_message = 4;
- * @return string
- */
- public function getTimeoutMessage()
- {
- return $this->timeout_message;
- }
-
- /**
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- *
- * Generated from protobuf field string timeout_message = 4;
- * @param string $var
- * @return $this
- */
- public function setTimeoutMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->timeout_message = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechContext.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechContext.php
deleted file mode 100644
index dabb9bed8423..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechContext.php
+++ /dev/null
@@ -1,170 +0,0 @@
-google.cloud.speech.v1.SpeechContext
- */
-class SpeechContext extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- *
- * Generated from protobuf field repeated string phrases = 1;
- */
- private $phrases;
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- *
- * Generated from protobuf field float boost = 4;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $phrases
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- * @type float $boost
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- *
- * Generated from protobuf field repeated string phrases = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhrases()
- {
- return $this->phrases;
- }
-
- /**
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- *
- * Generated from protobuf field repeated string phrases = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhrases($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->phrases = $arr;
-
- return $this;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- *
- * Generated from protobuf field float boost = 4;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- *
- * Generated from protobuf field float boost = 4;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechRecognitionAlternative.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechRecognitionAlternative.php
deleted file mode 100644
index be6de0c71407..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechRecognitionAlternative.php
+++ /dev/null
@@ -1,179 +0,0 @@
-google.cloud.speech.v1.SpeechRecognitionAlternative
- */
-class SpeechRecognitionAlternative extends \Google\Protobuf\Internal\Message
-{
- /**
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- *
- * Generated from protobuf field string transcript = 1;
- */
- protected $transcript = '';
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- */
- protected $confidence = 0.0;
- /**
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.WordInfo words = 3;
- */
- private $words;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $transcript
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- * @type float $confidence
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- * @type array<\Google\Cloud\Speech\V1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- *
- * Generated from protobuf field string transcript = 1;
- * @return string
- */
- public function getTranscript()
- {
- return $this->transcript;
- }
-
- /**
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- *
- * Generated from protobuf field string transcript = 1;
- * @param string $var
- * @return $this
- */
- public function setTranscript($var)
- {
- GPBUtil::checkString($var, True);
- $this->transcript = $var;
-
- return $this;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- * @return float
- */
- public function getConfidence()
- {
- return $this->confidence;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- * @param float $var
- * @return $this
- */
- public function setConfidence($var)
- {
- GPBUtil::checkFloat($var);
- $this->confidence = $var;
-
- return $this;
- }
-
- /**
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.WordInfo words = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getWords()
- {
- return $this->words;
- }
-
- /**
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.WordInfo words = 3;
- * @param array<\Google\Cloud\Speech\V1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setWords($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\WordInfo::class);
- $this->words = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechRecognitionResult.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechRecognitionResult.php
deleted file mode 100644
index 33b5a7cb9a09..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/SpeechRecognitionResult.php
+++ /dev/null
@@ -1,211 +0,0 @@
-google.cloud.speech.v1.SpeechRecognitionResult
- */
-class SpeechRecognitionResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;
- */
- private $alternatives;
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- */
- protected $channel_tag = 0;
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- */
- protected $result_end_time = null;
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $language_code = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- * @type int $channel_tag
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- * @type \Google\Protobuf\Duration $result_end_time
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- * @type string $language_code
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;
- * @param array<\Google\Cloud\Speech\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternatives($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechRecognitionAlternative::class);
- $this->alternatives = $arr;
-
- return $this;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- * @return int
- */
- public function getChannelTag()
- {
- return $this->channel_tag;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- * @param int $var
- * @return $this
- */
- public function setChannelTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->channel_tag = $var;
-
- return $this;
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @return \Google\Protobuf\Duration|null
- */
- public function getResultEndTime()
- {
- return $this->result_end_time;
- }
-
- public function hasResultEndTime()
- {
- return isset($this->result_end_time);
- }
-
- public function clearResultEndTime()
- {
- unset($this->result_end_time);
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setResultEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->result_end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionConfig.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionConfig.php
deleted file mode 100644
index 87c36a95331f..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionConfig.php
+++ /dev/null
@@ -1,320 +0,0 @@
-google.cloud.speech.v1.StreamingRecognitionConfig
- */
-class StreamingRecognitionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- *
- * Generated from protobuf field bool single_utterance = 2;
- */
- protected $single_utterance = false;
- /**
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- *
- * Generated from protobuf field bool interim_results = 3;
- */
- protected $interim_results = false;
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 5;
- */
- protected $enable_voice_activity_events = false;
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout voice_activity_timeout = 6;
- */
- protected $voice_activity_timeout = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1\RecognitionConfig $config
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @type bool $single_utterance
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- * @type bool $interim_results
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- * @type bool $enable_voice_activity_events
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- * @type \Google\Cloud\Speech\V1\StreamingRecognitionConfig\VoiceActivityTimeout $voice_activity_timeout
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- *
- * Generated from protobuf field bool single_utterance = 2;
- * @return bool
- */
- public function getSingleUtterance()
- {
- return $this->single_utterance;
- }
-
- /**
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- *
- * Generated from protobuf field bool single_utterance = 2;
- * @param bool $var
- * @return $this
- */
- public function setSingleUtterance($var)
- {
- GPBUtil::checkBool($var);
- $this->single_utterance = $var;
-
- return $this;
- }
-
- /**
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- *
- * Generated from protobuf field bool interim_results = 3;
- * @return bool
- */
- public function getInterimResults()
- {
- return $this->interim_results;
- }
-
- /**
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- *
- * Generated from protobuf field bool interim_results = 3;
- * @param bool $var
- * @return $this
- */
- public function setInterimResults($var)
- {
- GPBUtil::checkBool($var);
- $this->interim_results = $var;
-
- return $this;
- }
-
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 5;
- * @return bool
- */
- public function getEnableVoiceActivityEvents()
- {
- return $this->enable_voice_activity_events;
- }
-
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 5;
- * @param bool $var
- * @return $this
- */
- public function setEnableVoiceActivityEvents($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_voice_activity_events = $var;
-
- return $this;
- }
-
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout voice_activity_timeout = 6;
- * @return \Google\Cloud\Speech\V1\StreamingRecognitionConfig\VoiceActivityTimeout|null
- */
- public function getVoiceActivityTimeout()
- {
- return $this->voice_activity_timeout;
- }
-
- public function hasVoiceActivityTimeout()
- {
- return isset($this->voice_activity_timeout);
- }
-
- public function clearVoiceActivityTimeout()
- {
- unset($this->voice_activity_timeout);
- }
-
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout voice_activity_timeout = 6;
- * @param \Google\Cloud\Speech\V1\StreamingRecognitionConfig\VoiceActivityTimeout $var
- * @return $this
- */
- public function setVoiceActivityTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\StreamingRecognitionConfig\VoiceActivityTimeout::class);
- $this->voice_activity_timeout = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionConfig/VoiceActivityTimeout.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionConfig/VoiceActivityTimeout.php
deleted file mode 100644
index 6eb658a8154a..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionConfig/VoiceActivityTimeout.php
+++ /dev/null
@@ -1,124 +0,0 @@
-google.cloud.speech.v1.StreamingRecognitionConfig.VoiceActivityTimeout
- */
-class VoiceActivityTimeout extends \Google\Protobuf\Internal\Message
-{
- /**
- * Duration to timeout the stream if no speech begins.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- */
- protected $speech_start_timeout = null;
- /**
- * Duration to timeout the stream after speech ends.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- */
- protected $speech_end_timeout = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $speech_start_timeout
- * Duration to timeout the stream if no speech begins.
- * @type \Google\Protobuf\Duration $speech_end_timeout
- * Duration to timeout the stream after speech ends.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Duration to timeout the stream if no speech begins.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechStartTimeout()
- {
- return $this->speech_start_timeout;
- }
-
- public function hasSpeechStartTimeout()
- {
- return isset($this->speech_start_timeout);
- }
-
- public function clearSpeechStartTimeout()
- {
- unset($this->speech_start_timeout);
- }
-
- /**
- * Duration to timeout the stream if no speech begins.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechStartTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_start_timeout = $var;
-
- return $this;
- }
-
- /**
- * Duration to timeout the stream after speech ends.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechEndTimeout()
- {
- return $this->speech_end_timeout;
- }
-
- public function hasSpeechEndTimeout()
- {
- return isset($this->speech_end_timeout);
- }
-
- public function clearSpeechEndTimeout()
- {
- unset($this->speech_end_timeout);
- }
-
- /**
- * Duration to timeout the stream after speech ends.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechEndTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_end_timeout = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(VoiceActivityTimeout::class, \Google\Cloud\Speech\V1\StreamingRecognitionConfig_VoiceActivityTimeout::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionResult.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionResult.php
deleted file mode 100644
index 6c6e361f4576..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognitionResult.php
+++ /dev/null
@@ -1,312 +0,0 @@
-google.cloud.speech.v1.StreamingRecognitionResult
- */
-class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;
- */
- private $alternatives;
- /**
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- */
- protected $is_final = false;
- /**
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- */
- protected $stability = 0.0;
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- */
- protected $result_end_time = null;
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- */
- protected $channel_tag = 0;
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $language_code = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- * @type bool $is_final
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- * @type float $stability
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- * @type \Google\Protobuf\Duration $result_end_time
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- * @type int $channel_tag
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- * @type string $language_code
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.SpeechRecognitionAlternative alternatives = 1;
- * @param array<\Google\Cloud\Speech\V1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternatives($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\SpeechRecognitionAlternative::class);
- $this->alternatives = $arr;
-
- return $this;
- }
-
- /**
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- * @return bool
- */
- public function getIsFinal()
- {
- return $this->is_final;
- }
-
- /**
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- * @param bool $var
- * @return $this
- */
- public function setIsFinal($var)
- {
- GPBUtil::checkBool($var);
- $this->is_final = $var;
-
- return $this;
- }
-
- /**
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- * @return float
- */
- public function getStability()
- {
- return $this->stability;
- }
-
- /**
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- * @param float $var
- * @return $this
- */
- public function setStability($var)
- {
- GPBUtil::checkFloat($var);
- $this->stability = $var;
-
- return $this;
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @return \Google\Protobuf\Duration|null
- */
- public function getResultEndTime()
- {
- return $this->result_end_time;
- }
-
- public function hasResultEndTime()
- {
- return isset($this->result_end_time);
- }
-
- public function clearResultEndTime()
- {
- unset($this->result_end_time);
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setResultEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->result_end_time = $var;
-
- return $this;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- * @return int
- */
- public function getChannelTag()
- {
- return $this->channel_tag;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- * @param int $var
- * @return $this
- */
- public function setChannelTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->channel_tag = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeRequest.php
deleted file mode 100644
index da343e6dfe65..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeRequest.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.speech.v1.StreamingRecognizeRequest
- */
-class StreamingRecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- protected $streaming_request;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1\StreamingRecognitionConfig $streaming_config
- * Provides information to the recognizer that specifies how to process the
- * request. The first `StreamingRecognizeRequest` message must contain a
- * `streaming_config` message.
- * @type string $audio_content
- * The audio data to be recognized. Sequential chunks of audio data are sent
- * in sequential `StreamingRecognizeRequest` messages. The first
- * `StreamingRecognizeRequest` message must not contain `audio_content` data
- * and all subsequent `StreamingRecognizeRequest` messages must contain
- * `audio_content` data. The audio bytes must be encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation (not base64). See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Provides information to the recognizer that specifies how to process the
- * request. The first `StreamingRecognizeRequest` message must contain a
- * `streaming_config` message.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
- * @return \Google\Cloud\Speech\V1\StreamingRecognitionConfig|null
- */
- public function getStreamingConfig()
- {
- return $this->readOneof(1);
- }
-
- public function hasStreamingConfig()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Provides information to the recognizer that specifies how to process the
- * request. The first `StreamingRecognizeRequest` message must contain a
- * `streaming_config` message.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognitionConfig streaming_config = 1;
- * @param \Google\Cloud\Speech\V1\StreamingRecognitionConfig $var
- * @return $this
- */
- public function setStreamingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\StreamingRecognitionConfig::class);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * The audio data to be recognized. Sequential chunks of audio data are sent
- * in sequential `StreamingRecognizeRequest` messages. The first
- * `StreamingRecognizeRequest` message must not contain `audio_content` data
- * and all subsequent `StreamingRecognizeRequest` messages must contain
- * `audio_content` data. The audio bytes must be encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation (not base64). See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
- *
- * Generated from protobuf field bytes audio_content = 2;
- * @return string
- */
- public function getAudioContent()
- {
- return $this->readOneof(2);
- }
-
- public function hasAudioContent()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * The audio data to be recognized. Sequential chunks of audio data are sent
- * in sequential `StreamingRecognizeRequest` messages. The first
- * `StreamingRecognizeRequest` message must not contain `audio_content` data
- * and all subsequent `StreamingRecognizeRequest` messages must contain
- * `audio_content` data. The audio bytes must be encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation (not base64). See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
- *
- * Generated from protobuf field bytes audio_content = 2;
- * @param string $var
- * @return $this
- */
- public function setAudioContent($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getStreamingRequest()
- {
- return $this->whichOneof("streaming_request");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeResponse.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeResponse.php
deleted file mode 100644
index 0a147f2a315d..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeResponse.php
+++ /dev/null
@@ -1,370 +0,0 @@
-google.cloud.speech.v1.StreamingRecognizeResponse
- */
-class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- *
- * Generated from protobuf field .google.rpc.Status error = 1;
- */
- protected $error = null;
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
- */
- private $results;
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
- */
- protected $speech_event_type = 0;
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_time = 8;
- */
- protected $speech_event_time = null;
- /**
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5;
- */
- protected $total_billed_time = null;
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
- */
- protected $speech_adaptation_info = null;
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 10;
- */
- protected $request_id = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Rpc\Status $error
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- * @type array<\Google\Cloud\Speech\V1\StreamingRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- * @type int $speech_event_type
- * Indicates the type of speech event.
- * @type \Google\Protobuf\Duration $speech_event_time
- * Time offset between the beginning of the audio and event emission.
- * @type \Google\Protobuf\Duration $total_billed_time
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- * @type \Google\Cloud\Speech\V1\SpeechAdaptationInfo $speech_adaptation_info
- * Provides information on adaptation behavior in response
- * @type int|string $request_id
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- *
- * Generated from protobuf field .google.rpc.Status error = 1;
- * @return \Google\Rpc\Status|null
- */
- public function getError()
- {
- return $this->error;
- }
-
- public function hasError()
- {
- return isset($this->error);
- }
-
- public function clearError()
- {
- unset($this->error);
- }
-
- /**
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- *
- * Generated from protobuf field .google.rpc.Status error = 1;
- * @param \Google\Rpc\Status $var
- * @return $this
- */
- public function setError($var)
- {
- GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
- $this->error = $var;
-
- return $this;
- }
-
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
- * @param array<\Google\Cloud\Speech\V1\StreamingRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\StreamingRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
- * @return int
- */
- public function getSpeechEventType()
- {
- return $this->speech_event_type;
- }
-
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
- * @param int $var
- * @return $this
- */
- public function setSpeechEventType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1\StreamingRecognizeResponse\SpeechEventType::class);
- $this->speech_event_type = $var;
-
- return $this;
- }
-
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_time = 8;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechEventTime()
- {
- return $this->speech_event_time;
- }
-
- public function hasSpeechEventTime()
- {
- return isset($this->speech_event_time);
- }
-
- public function clearSpeechEventTime()
- {
- unset($this->speech_event_time);
- }
-
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_time = 8;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechEventTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_event_time = $var;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledTime()
- {
- return $this->total_billed_time;
- }
-
- public function hasTotalBilledTime()
- {
- return isset($this->total_billed_time);
- }
-
- public function clearTotalBilledTime()
- {
- unset($this->total_billed_time);
- }
-
- /**
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_time = $var;
-
- return $this;
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
- * @return \Google\Cloud\Speech\V1\SpeechAdaptationInfo|null
- */
- public function getSpeechAdaptationInfo()
- {
- return $this->speech_adaptation_info;
- }
-
- public function hasSpeechAdaptationInfo()
- {
- return isset($this->speech_adaptation_info);
- }
-
- public function clearSpeechAdaptationInfo()
- {
- unset($this->speech_adaptation_info);
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
- * @param \Google\Cloud\Speech\V1\SpeechAdaptationInfo $var
- * @return $this
- */
- public function setSpeechAdaptationInfo($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\SpeechAdaptationInfo::class);
- $this->speech_adaptation_info = $var;
-
- return $this;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 10;
- * @return int|string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 10;
- * @param int|string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkInt64($var);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeResponse/SpeechEventType.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeResponse/SpeechEventType.php
deleted file mode 100644
index 47a5dcb5bf39..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/StreamingRecognizeResponse/SpeechEventType.php
+++ /dev/null
@@ -1,92 +0,0 @@
-google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType
- */
-class SpeechEventType
-{
- /**
- * No speech event specified.
- *
- * Generated from protobuf enum SPEECH_EVENT_UNSPECIFIED = 0;
- */
- const SPEECH_EVENT_UNSPECIFIED = 0;
- /**
- * This event indicates that the server has detected the end of the user's
- * speech utterance and expects no additional speech. Therefore, the server
- * will not process additional audio (although it may subsequently return
- * additional results). The client should stop sending additional audio
- * data, half-close the gRPC connection, and wait for any additional results
- * until the server closes the gRPC connection. This event is only sent if
- * `single_utterance` was set to `true`, and is not used otherwise.
- *
- * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 1;
- */
- const END_OF_SINGLE_UTTERANCE = 1;
- /**
- * This event indicates that the server has detected the beginning of human
- * voice activity in the stream. This event can be returned multiple times
- * if speech starts and stops repeatedly throughout the stream. This event
- * is only sent if `voice_activity_events` is set to true.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_BEGIN = 2;
- */
- const SPEECH_ACTIVITY_BEGIN = 2;
- /**
- * This event indicates that the server has detected the end of human voice
- * activity in the stream. This event can be returned multiple times if
- * speech starts and stops repeatedly throughout the stream. This event is
- * only sent if `voice_activity_events` is set to true.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_END = 3;
- */
- const SPEECH_ACTIVITY_END = 3;
- /**
- * This event indicates that the user-set timeout for speech activity begin
- * or end has exceeded. Upon receiving this event, the client is expected to
- * send a half close. Further audio will not be processed.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_TIMEOUT = 4;
- */
- const SPEECH_ACTIVITY_TIMEOUT = 4;
-
- private static $valueToName = [
- self::SPEECH_EVENT_UNSPECIFIED => 'SPEECH_EVENT_UNSPECIFIED',
- self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE',
- self::SPEECH_ACTIVITY_BEGIN => 'SPEECH_ACTIVITY_BEGIN',
- self::SPEECH_ACTIVITY_END => 'SPEECH_ACTIVITY_END',
- self::SPEECH_ACTIVITY_TIMEOUT => 'SPEECH_ACTIVITY_TIMEOUT',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(SpeechEventType::class, \Google\Cloud\Speech\V1\StreamingRecognizeResponse_SpeechEventType::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptNormalization.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptNormalization.php
deleted file mode 100644
index 3dd137324188..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptNormalization.php
+++ /dev/null
@@ -1,82 +0,0 @@
- 0.8) and final transcripts.
- *
- * Generated from protobuf message google.cloud.speech.v1.TranscriptNormalization
- */
-class TranscriptNormalization extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1;
- */
- private $entries;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1\TranscriptNormalization\Entry>|\Google\Protobuf\Internal\RepeatedField $entries
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getEntries()
- {
- return $this->entries;
- }
-
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1.TranscriptNormalization.Entry entries = 1;
- * @param array<\Google\Cloud\Speech\V1\TranscriptNormalization\Entry>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setEntries($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1\TranscriptNormalization\Entry::class);
- $this->entries = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptNormalization/Entry.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptNormalization/Entry.php
deleted file mode 100644
index c45dc2aa8c28..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptNormalization/Entry.php
+++ /dev/null
@@ -1,138 +0,0 @@
-google.cloud.speech.v1.TranscriptNormalization.Entry
- */
-class Entry extends \Google\Protobuf\Internal\Message
-{
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- */
- protected $search = '';
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- */
- protected $replace = '';
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- */
- protected $case_sensitive = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $search
- * What to replace. Max length is 100 characters.
- * @type string $replace
- * What to replace with. Max length is 100 characters.
- * @type bool $case_sensitive
- * Whether the search is case sensitive.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- * @return string
- */
- public function getSearch()
- {
- return $this->search;
- }
-
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- * @param string $var
- * @return $this
- */
- public function setSearch($var)
- {
- GPBUtil::checkString($var, True);
- $this->search = $var;
-
- return $this;
- }
-
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- * @return string
- */
- public function getReplace()
- {
- return $this->replace;
- }
-
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- * @param string $var
- * @return $this
- */
- public function setReplace($var)
- {
- GPBUtil::checkString($var, True);
- $this->replace = $var;
-
- return $this;
- }
-
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @return bool
- */
- public function getCaseSensitive()
- {
- return $this->case_sensitive;
- }
-
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @param bool $var
- * @return $this
- */
- public function setCaseSensitive($var)
- {
- GPBUtil::checkBool($var);
- $this->case_sensitive = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Entry::class, \Google\Cloud\Speech\V1\TranscriptNormalization_Entry::class);
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptOutputConfig.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptOutputConfig.php
deleted file mode 100644
index d04d0415882b..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/TranscriptOutputConfig.php
+++ /dev/null
@@ -1,81 +0,0 @@
-google.cloud.speech.v1.TranscriptOutputConfig
- */
-class TranscriptOutputConfig extends \Google\Protobuf\Internal\Message
-{
- protected $output_type;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $gcs_uri
- * Specifies a Cloud Storage URI for the recognition results. Must be
- * specified in the format: `gs://bucket_name/object_name`, and the bucket
- * must already exist.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Specifies a Cloud Storage URI for the recognition results. Must be
- * specified in the format: `gs://bucket_name/object_name`, and the bucket
- * must already exist.
- *
- * Generated from protobuf field string gcs_uri = 1;
- * @return string
- */
- public function getGcsUri()
- {
- return $this->readOneof(1);
- }
-
- public function hasGcsUri()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Specifies a Cloud Storage URI for the recognition results. Must be
- * specified in the format: `gs://bucket_name/object_name`, and the bucket
- * must already exist.
- *
- * Generated from protobuf field string gcs_uri = 1;
- * @param string $var
- * @return $this
- */
- public function setGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getOutputType()
- {
- return $this->whichOneof("output_type");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/UpdateCustomClassRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/UpdateCustomClassRequest.php
deleted file mode 100644
index fb44620e9bef..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/UpdateCustomClassRequest.php
+++ /dev/null
@@ -1,153 +0,0 @@
-google.cloud.speech.v1.UpdateCustomClassRequest
- */
-class UpdateCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class = null;
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1\CustomClass $custom_class
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\CustomClass|null
- */
- public function getCustomClass()
- {
- return $this->custom_class;
- }
-
- public function hasCustomClass()
- {
- return isset($this->custom_class);
- }
-
- public function clearCustomClass()
- {
- unset($this->custom_class);
- }
-
- /**
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\CustomClass $var
- * @return $this
- */
- public function setCustomClass($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\CustomClass::class);
- $this->custom_class = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/UpdatePhraseSetRequest.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/UpdatePhraseSetRequest.php
deleted file mode 100644
index d6ce06d7e1ba..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/UpdatePhraseSetRequest.php
+++ /dev/null
@@ -1,153 +0,0 @@
-google.cloud.speech.v1.UpdatePhraseSetRequest
- */
-class UpdatePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set = null;
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1\PhraseSet $phrase_set
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1\PhraseSet|null
- */
- public function getPhraseSet()
- {
- return $this->phrase_set;
- }
-
- public function hasPhraseSet()
- {
- return isset($this->phrase_set);
- }
-
- public function clearPhraseSet()
- {
- unset($this->phrase_set);
- }
-
- /**
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1\PhraseSet $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\PhraseSet::class);
- $this->phrase_set = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/WordInfo.php b/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/WordInfo.php
deleted file mode 100644
index 792e8a4dd9d8..000000000000
--- a/owl-bot-staging/Speech/v1/proto/src/Google/Cloud/Speech/V1/WordInfo.php
+++ /dev/null
@@ -1,366 +0,0 @@
-google.cloud.speech.v1.WordInfo
- */
-class WordInfo extends \Google\Protobuf\Internal\Message
-{
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_time = 1;
- */
- protected $start_time = null;
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_time = 2;
- */
- protected $end_time = null;
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- */
- protected $word = '';
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- */
- protected $confidence = 0.0;
- /**
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only for the
- * top alternative.
- * Note: Use speaker_label instead.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @deprecated
- */
- protected $speaker_tag = 0;
- /**
- * Output only. A label value assigned for every unique speaker within the
- * audio. This field specifies which speaker was detected to have spoken this
- * word. For some models, like medical_conversation this can be actual speaker
- * role, for example "patient" or "provider", but generally this would be a
- * number identifying a speaker. This field is only set if
- * enable_speaker_diarization = 'true' and only for the top alternative.
- *
- * Generated from protobuf field string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $speaker_label = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $start_time
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- * @type \Google\Protobuf\Duration $end_time
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- * @type string $word
- * The word corresponding to this set of information.
- * @type float $confidence
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- * @type int $speaker_tag
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only for the
- * top alternative.
- * Note: Use speaker_label instead.
- * @type string $speaker_label
- * Output only. A label value assigned for every unique speaker within the
- * audio. This field specifies which speaker was detected to have spoken this
- * word. For some models, like medical_conversation this can be actual speaker
- * role, for example "patient" or "provider", but generally this would be a
- * number identifying a speaker. This field is only set if
- * enable_speaker_diarization = 'true' and only for the top alternative.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_time = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_time = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_time = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_time = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- * @return string
- */
- public function getWord()
- {
- return $this->word;
- }
-
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- * @param string $var
- * @return $this
- */
- public function setWord($var)
- {
- GPBUtil::checkString($var, True);
- $this->word = $var;
-
- return $this;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- * @return float
- */
- public function getConfidence()
- {
- return $this->confidence;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- * @param float $var
- * @return $this
- */
- public function setConfidence($var)
- {
- GPBUtil::checkFloat($var);
- $this->confidence = $var;
-
- return $this;
- }
-
- /**
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only for the
- * top alternative.
- * Note: Use speaker_label instead.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- * @deprecated
- */
- public function getSpeakerTag()
- {
- @trigger_error('speaker_tag is deprecated.', E_USER_DEPRECATED);
- return $this->speaker_tag;
- }
-
- /**
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only for the
- * top alternative.
- * Note: Use speaker_label instead.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- * @deprecated
- */
- public function setSpeakerTag($var)
- {
- @trigger_error('speaker_tag is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkInt32($var);
- $this->speaker_tag = $var;
-
- return $this;
- }
-
- /**
- * Output only. A label value assigned for every unique speaker within the
- * audio. This field specifies which speaker was detected to have spoken this
- * word. For some models, like medical_conversation this can be actual speaker
- * role, for example "patient" or "provider", but generally this would be a
- * number identifying a speaker. This field is only set if
- * enable_speaker_diarization = 'true' and only for the top alternative.
- *
- * Generated from protobuf field string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getSpeakerLabel()
- {
- return $this->speaker_label;
- }
-
- /**
- * Output only. A label value assigned for every unique speaker within the
- * audio. This field specifies which speaker was detected to have spoken this
- * word. For some models, like medical_conversation this can be actual speaker
- * role, for example "patient" or "provider", but generally this would be a
- * number identifying a speaker. This field is only set if
- * enable_speaker_diarization = 'true' and only for the top alternative.
- *
- * Generated from protobuf field string speaker_label = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setSpeakerLabel($var)
- {
- GPBUtil::checkString($var, True);
- $this->speaker_label = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/create_custom_class.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/create_custom_class.php
deleted file mode 100644
index 756bc3cbcdee..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/create_custom_class.php
+++ /dev/null
@@ -1,84 +0,0 @@
-createCustomClass($formattedParent, $customClassId, $customClass);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
- $customClassId = '[CUSTOM_CLASS_ID]';
-
- create_custom_class_sample($formattedParent, $customClassId);
-}
-// [END speech_v1_generated_Adaptation_CreateCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/create_phrase_set.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/create_phrase_set.php
deleted file mode 100644
index e3dff2756feb..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/create_phrase_set.php
+++ /dev/null
@@ -1,86 +0,0 @@
-createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
- $phraseSetId = '[PHRASE_SET_ID]';
-
- create_phrase_set_sample($formattedParent, $phraseSetId);
-}
-// [END speech_v1_generated_Adaptation_CreatePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/delete_custom_class.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/delete_custom_class.php
deleted file mode 100644
index 1137db76534b..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/delete_custom_class.php
+++ /dev/null
@@ -1,72 +0,0 @@
-deleteCustomClass($formattedName);
- printf('Call completed successfully.' . PHP_EOL);
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- delete_custom_class_sample($formattedName);
-}
-// [END speech_v1_generated_Adaptation_DeleteCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/delete_phrase_set.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/delete_phrase_set.php
deleted file mode 100644
index b2bd73495ee9..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/delete_phrase_set.php
+++ /dev/null
@@ -1,66 +0,0 @@
-deletePhraseSet($formattedName);
- printf('Call completed successfully.' . PHP_EOL);
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- delete_phrase_set_sample($formattedName);
-}
-// [END speech_v1_generated_Adaptation_DeletePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/get_custom_class.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/get_custom_class.php
deleted file mode 100644
index 3aa1ed5021bc..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/get_custom_class.php
+++ /dev/null
@@ -1,68 +0,0 @@
-getCustomClass($formattedName);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- get_custom_class_sample($formattedName);
-}
-// [END speech_v1_generated_Adaptation_GetCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/get_phrase_set.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/get_phrase_set.php
deleted file mode 100644
index c8cb30c96dc9..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/get_phrase_set.php
+++ /dev/null
@@ -1,74 +0,0 @@
-getPhraseSet($formattedName);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- get_phrase_set_sample($formattedName);
-}
-// [END speech_v1_generated_Adaptation_GetPhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/list_custom_classes.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/list_custom_classes.php
deleted file mode 100644
index fbeecdafc700..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/list_custom_classes.php
+++ /dev/null
@@ -1,79 +0,0 @@
-listCustomClasses($formattedParent);
-
- /** @var CustomClass $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_custom_classes_sample($formattedParent);
-}
-// [END speech_v1_generated_Adaptation_ListCustomClasses_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/list_phrase_set.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/list_phrase_set.php
deleted file mode 100644
index 179787eec4a0..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/list_phrase_set.php
+++ /dev/null
@@ -1,79 +0,0 @@
-listPhraseSet($formattedParent);
-
- /** @var PhraseSet $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_phrase_set_sample($formattedParent);
-}
-// [END speech_v1_generated_Adaptation_ListPhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/update_custom_class.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/update_custom_class.php
deleted file mode 100644
index c7d3f543ded2..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/update_custom_class.php
+++ /dev/null
@@ -1,56 +0,0 @@
-updateCustomClass($customClass);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v1_generated_Adaptation_UpdateCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/update_phrase_set.php b/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/update_phrase_set.php
deleted file mode 100644
index 603fb3fd3873..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/AdaptationClient/update_phrase_set.php
+++ /dev/null
@@ -1,56 +0,0 @@
-updatePhraseSet($phraseSet);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v1_generated_Adaptation_UpdatePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/long_running_recognize.php b/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/long_running_recognize.php
deleted file mode 100644
index 999e2115f7d6..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/long_running_recognize.php
+++ /dev/null
@@ -1,94 +0,0 @@
-setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->longRunningRecognize($config, $audio);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var LongRunningRecognizeResponse $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $configLanguageCode = '[LANGUAGE_CODE]';
-
- long_running_recognize_sample($configLanguageCode);
-}
-// [END speech_v1_generated_Speech_LongRunningRecognize_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/recognize.php b/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/recognize.php
deleted file mode 100644
index f28221b45efb..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/recognize.php
+++ /dev/null
@@ -1,78 +0,0 @@
-setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
-
- // Call the API and handle any network failures.
- try {
- /** @var RecognizeResponse $response */
- $response = $speechClient->recognize($config, $audio);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $configLanguageCode = '[LANGUAGE_CODE]';
-
- recognize_sample($configLanguageCode);
-}
-// [END speech_v1_generated_Speech_Recognize_sync]
diff --git a/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/streaming_recognize.php b/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/streaming_recognize.php
deleted file mode 100644
index 3c1c1923bd88..000000000000
--- a/owl-bot-staging/Speech/v1/samples/V1/SpeechClient/streaming_recognize.php
+++ /dev/null
@@ -1,64 +0,0 @@
-streamingRecognize();
- $stream->writeAll([$request,]);
-
- /** @var StreamingRecognizeResponse $element */
- foreach ($stream->closeWriteAndReadAll() as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v1_generated_Speech_StreamingRecognize_sync]
diff --git a/owl-bot-staging/Speech/v1/src/V1/AdaptationClient.php b/owl-bot-staging/Speech/v1/src/V1/AdaptationClient.php
deleted file mode 100644
index fabce1167abb..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/AdaptationClient.php
+++ /dev/null
@@ -1,34 +0,0 @@
-locationName('[PROJECT]', '[LOCATION]');
- * $customClassId = 'custom_class_id';
- * $customClass = new CustomClass();
- * $response = $adaptationClient->createCustomClass($formattedParent, $customClassId, $customClass);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class AdaptationGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.speech.v1.Adaptation';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'speech.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'speech.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $customClassNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $phraseSetNameTemplate;
-
- private static $pathTemplateMap;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/adaptation_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/adaptation_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/adaptation_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/adaptation_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getCustomClassNameTemplate()
- {
- if (self::$customClassNameTemplate == null) {
- self::$customClassNameTemplate = new PathTemplate('projects/{project}/locations/{location}/customClasses/{custom_class}');
- }
-
- return self::$customClassNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- 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 getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'customClass' => self::getCustomClassNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'phraseSet' => self::getPhraseSetNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a custom_class
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $customClass
- *
- * @return string The formatted custom_class resource.
- */
- public static function customClassName($project, $location, $customClass)
- {
- return self::getCustomClassNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'custom_class' => $customClass,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $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,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- * - location: projects/{project}/locations/{location}
- * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'speech.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /**
- * Create a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * $customClassId = 'custom_class_id';
- * $customClass = new CustomClass();
- * $response = $adaptationClient->createCustomClass($formattedParent, $customClassId, $customClass);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this custom class will be created.
- * Format:
- *
- * `projects/{project}/locations/{location}/customClasses`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param string $customClassId Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- *
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @param CustomClass $customClass Required. The custom class to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\CustomClass
- *
- * @throws ApiException if the remote call fails
- */
- public function createCustomClass($parent, $customClassId, $customClass, array $optionalArgs = [])
- {
- $request = new CreateCustomClassRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setCustomClassId($customClassId);
- $request->setCustomClass($customClass);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreateCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Create a set of phrase hints. Each item in the set can be a single word or
- * a multi-word phrase. The items in the PhraseSet are favored by the
- * recognition model when you send a call that includes the PhraseSet.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * $phraseSetId = 'phrase_set_id';
- * $phraseSet = new PhraseSet();
- * $response = $adaptationClient->createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this phrase set will be created.
- * Format:
- *
- * `projects/{project}/locations/{location}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param string $phraseSetId Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- *
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @param PhraseSet $phraseSet Required. The phrase set to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\PhraseSet
- *
- * @throws ApiException if the remote call fails
- */
- public function createPhraseSet($parent, $phraseSetId, $phraseSet, array $optionalArgs = [])
- {
- $request = new CreatePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setPhraseSetId($phraseSetId);
- $request->setPhraseSet($phraseSet);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreatePhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Delete a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $adaptationClient->deleteCustomClass($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the custom class to delete. Format:
- *
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteCustomClass($name, array $optionalArgs = [])
- {
- $request = new DeleteCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteCustomClass', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Delete a phrase set.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $adaptationClient->deletePhraseSet($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the phrase set to delete. Format:
- *
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @throws ApiException if the remote call fails
- */
- public function deletePhraseSet($name, array $optionalArgs = [])
- {
- $request = new DeletePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeletePhraseSet', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Get a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $response = $adaptationClient->getCustomClass($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the custom class to retrieve. Format:
- *
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\CustomClass
- *
- * @throws ApiException if the remote call fails
- */
- public function getCustomClass($name, array $optionalArgs = [])
- {
- $request = new GetCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Get a phrase set.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $response = $adaptationClient->getPhraseSet($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the phrase set to retrieve. Format:
- *
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\PhraseSet
- *
- * @throws ApiException if the remote call fails
- */
- public function getPhraseSet($name, array $optionalArgs = [])
- {
- $request = new GetPhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetPhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * List custom classes.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $adaptationClient->listCustomClasses($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $adaptationClient->listCustomClasses($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent, which owns this collection of custom classes. Format:
- *
- * `projects/{project}/locations/{location}/customClasses`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listCustomClasses($parent, array $optionalArgs = [])
- {
- $request = new ListCustomClassesRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListCustomClasses', $optionalArgs, ListCustomClassesResponse::class, $request);
- }
-
- /**
- * List phrase sets.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $adaptationClient->listPhraseSet($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $adaptationClient->listPhraseSet($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent, which owns this collection of phrase set. Format:
- *
- * `projects/{project}/locations/{location}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listPhraseSet($parent, array $optionalArgs = [])
- {
- $request = new ListPhraseSetRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListPhraseSet', $optionalArgs, ListPhraseSetResponse::class, $request);
- }
-
- /**
- * Update a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $customClass = new CustomClass();
- * $response = $adaptationClient->updateCustomClass($customClass);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param CustomClass $customClass Required. The custom class to update.
- *
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- *
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to be updated.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\CustomClass
- *
- * @throws ApiException if the remote call fails
- */
- public function updateCustomClass($customClass, array $optionalArgs = [])
- {
- $request = new UpdateCustomClassRequest();
- $requestParamHeaders = [];
- $request->setCustomClass($customClass);
- $requestParamHeaders['custom_class.name'] = $customClass->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdateCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Update a phrase set.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $phraseSet = new PhraseSet();
- * $response = $adaptationClient->updatePhraseSet($phraseSet);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param PhraseSet $phraseSet Required. The phrase set to update.
- *
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- *
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to be updated.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\PhraseSet
- *
- * @throws ApiException if the remote call fails
- */
- public function updatePhraseSet($phraseSet, array $optionalArgs = [])
- {
- $request = new UpdatePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setPhraseSet($phraseSet);
- $requestParamHeaders['phrase_set.name'] = $phraseSet->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdatePhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-}
diff --git a/owl-bot-staging/Speech/v1/src/V1/Gapic/SpeechGapicClient.php b/owl-bot-staging/Speech/v1/src/V1/Gapic/SpeechGapicClient.php
deleted file mode 100644
index 8f63f74713e8..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/Gapic/SpeechGapicClient.php
+++ /dev/null
@@ -1,557 +0,0 @@
-longRunningRecognize($config, $audio);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->longRunningRecognize($config, $audio);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'longRunningRecognize');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class SpeechGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.speech.v1.Speech';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'speech.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'speech.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $customClassNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $phraseSetNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/speech_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/speech_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getCustomClassNameTemplate()
- {
- if (self::$customClassNameTemplate == null) {
- self::$customClassNameTemplate = new PathTemplate('projects/{project}/locations/{location}/customClasses/{custom_class}');
- }
-
- return self::$customClassNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- 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 getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'customClass' => self::getCustomClassNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'phraseSet' => self::getPhraseSetNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a custom_class
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $customClass
- *
- * @return string The formatted custom_class resource.
- */
- public static function customClassName($project, $location, $customClass)
- {
- return self::getCustomClassNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'custom_class' => $customClass,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $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,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- * - location: projects/{project}/locations/{location}
- * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'speech.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Performs asynchronous speech recognition: receive results via the
- * google.longrunning.Operations interface. Returns either an
- * `Operation.error` or an `Operation.response` which contains
- * a `LongRunningRecognizeResponse` message.
- * For more information on asynchronous speech recognition, see the
- * [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $config = new RecognitionConfig();
- * $audio = new RecognitionAudio();
- * $operationResponse = $speechClient->longRunningRecognize($config, $audio);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->longRunningRecognize($config, $audio);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'longRunningRecognize');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param RecognitionConfig $config Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @param RecognitionAudio $audio Required. The audio data to be recognized.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type TranscriptOutputConfig $outputConfig
- * Optional. Specifies an optional destination for the recognition results.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function longRunningRecognize($config, $audio, array $optionalArgs = [])
- {
- $request = new LongRunningRecognizeRequest();
- $request->setConfig($config);
- $request->setAudio($audio);
- if (isset($optionalArgs['outputConfig'])) {
- $request->setOutputConfig($optionalArgs['outputConfig']);
- }
-
- return $this->startOperationsCall('LongRunningRecognize', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Performs synchronous speech recognition: receive results after all audio
- * has been sent and processed.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $config = new RecognitionConfig();
- * $audio = new RecognitionAudio();
- * $response = $speechClient->recognize($config, $audio);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param RecognitionConfig $config Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @param RecognitionAudio $audio Required. The audio data to be recognized.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1\RecognizeResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function recognize($config, $audio, array $optionalArgs = [])
- {
- $request = new RecognizeRequest();
- $request->setConfig($config);
- $request->setAudio($audio);
- return $this->startCall('Recognize', RecognizeResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Performs bidirectional streaming speech recognition: receive results while
- * sending audio. This method is only available via the gRPC API (not REST).
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $request = new StreamingRecognizeRequest();
- * // Write all requests to the server, then read all responses until the
- * // stream is complete
- * $requests = [
- * $request,
- * ];
- * $stream = $speechClient->streamingRecognize();
- * $stream->writeAll($requests);
- * foreach ($stream->closeWriteAndReadAll() as $element) {
- * // doSomethingWith($element);
- * }
- * // Alternatively:
- * // Write requests individually, making read() calls if
- * // required. Call closeWrite() once writes are complete, and read the
- * // remaining responses from the server.
- * $requests = [
- * $request,
- * ];
- * $stream = $speechClient->streamingRecognize();
- * foreach ($requests as $request) {
- * $stream->write($request);
- * // if required, read a single response from the stream
- * $element = $stream->read();
- * // doSomethingWith($element)
- * }
- * $stream->closeWrite();
- * $element = $stream->read();
- * while (!is_null($element)) {
- * // doSomethingWith($element)
- * $element = $stream->read();
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $timeoutMillis
- * Timeout to use for this call.
- * }
- *
- * @return \Google\ApiCore\BidiStream
- *
- * @throws ApiException if the remote call fails
- */
- public function streamingRecognize(array $optionalArgs = [])
- {
- return $this->startCall('StreamingRecognize', StreamingRecognizeResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL);
- }
-}
diff --git a/owl-bot-staging/Speech/v1/src/V1/SpeechClient.php b/owl-bot-staging/Speech/v1/src/V1/SpeechClient.php
deleted file mode 100644
index cb9df59a75dd..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/SpeechClient.php
+++ /dev/null
@@ -1,34 +0,0 @@
- [
- 'google.cloud.speech.v1.Adaptation' => [
- 'ListCustomClasses' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getCustomClasses',
- ],
- ],
- 'ListPhraseSet' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getPhraseSets',
- ],
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/Speech/v1/src/V1/resources/adaptation_rest_client_config.php b/owl-bot-staging/Speech/v1/src/V1/resources/adaptation_rest_client_config.php
deleted file mode 100644
index e42f4b5f2b82..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/resources/adaptation_rest_client_config.php
+++ /dev/null
@@ -1,162 +0,0 @@
- [
- 'google.cloud.speech.v1.Adaptation' => [
- 'CreateCustomClass' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/customClasses',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'CreatePhraseSet' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/phraseSets',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'DeleteCustomClass' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{name=projects/*/locations/*/customClasses/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeletePhraseSet' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1/{name=projects/*/locations/*/phraseSets/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetCustomClass' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{name=projects/*/locations/*/customClasses/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetPhraseSet' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{name=projects/*/locations/*/phraseSets/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListCustomClasses' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/customClasses',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListPhraseSet' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/phraseSets',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'UpdateCustomClass' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1/{custom_class.name=projects/*/locations/*/customClasses/*}',
- 'body' => 'custom_class',
- 'placeholders' => [
- 'custom_class.name' => [
- 'getters' => [
- 'getCustomClass',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdatePhraseSet' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1/{phrase_set.name=projects/*/locations/*/phraseSets/*}',
- 'body' => 'phrase_set',
- 'placeholders' => [
- 'phrase_set.name' => [
- 'getters' => [
- 'getPhraseSet',
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/operations/{name=**}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/operations',
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/Speech/v1/src/V1/resources/speech_client_config.json b/owl-bot-staging/Speech/v1/src/V1/resources/speech_client_config.json
deleted file mode 100644
index 8ec2eb12f308..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/resources/speech_client_config.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "interfaces": {
- "google.cloud.speech.v1.Speech": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_1_codes": [
- "UNAVAILABLE",
- "DEADLINE_EXCEEDED"
- ],
- "no_retry_1_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 5000000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 5000000,
- "total_timeout_millis": 5000000
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 5000000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 5000000,
- "total_timeout_millis": 5000000
- }
- },
- "methods": {
- "LongRunningRecognize": {
- "timeout_millis": 5000000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "Recognize": {
- "timeout_millis": 5000000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "StreamingRecognize": {
- "timeout_millis": 5000000
- }
- }
- }
- }
-}
diff --git a/owl-bot-staging/Speech/v1/src/V1/resources/speech_descriptor_config.php b/owl-bot-staging/Speech/v1/src/V1/resources/speech_descriptor_config.php
deleted file mode 100644
index 1ca84398d524..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/resources/speech_descriptor_config.php
+++ /dev/null
@@ -1,43 +0,0 @@
- [
- 'google.cloud.speech.v1.Speech' => [
- 'LongRunningRecognize' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V1\LongRunningRecognizeResponse',
- 'metadataReturnType' => '\Google\Cloud\Speech\V1\LongRunningRecognizeMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'StreamingRecognize' => [
- 'grpcStreaming' => [
- 'grpcStreamingType' => 'BidiStreaming',
- ],
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/Speech/v1/src/V1/resources/speech_rest_client_config.php b/owl-bot-staging/Speech/v1/src/V1/resources/speech_rest_client_config.php
deleted file mode 100644
index 7bada9a80e48..000000000000
--- a/owl-bot-staging/Speech/v1/src/V1/resources/speech_rest_client_config.php
+++ /dev/null
@@ -1,56 +0,0 @@
- [
- 'google.cloud.speech.v1.Speech' => [
- 'LongRunningRecognize' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/speech:longrunningrecognize',
- 'body' => '*',
- ],
- 'Recognize' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1/speech:recognize',
- 'body' => '*',
- ],
- ],
- 'google.longrunning.Operations' => [
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/operations/{name=**}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1/operations',
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/Speech/v1/tests/Unit/V1/AdaptationClientTest.php b/owl-bot-staging/Speech/v1/tests/Unit/V1/AdaptationClientTest.php
deleted file mode 100644
index 71d174bcaf26..000000000000
--- a/owl-bot-staging/Speech/v1/tests/Unit/V1/AdaptationClientTest.php
+++ /dev/null
@@ -1,703 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return AdaptationClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new AdaptationClient($options);
- }
-
- /** @test */
- public function createCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $customClassId2 = 'customClassId2-529899005';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setCustomClassId($customClassId2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $customClassId = 'customClassId1554754128';
- $customClass = new CustomClass();
- $response = $gapicClient->createCustomClass($formattedParent, $customClassId, $customClass);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/CreateCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getCustomClassId();
- $this->assertProtobufEquals($customClassId, $actualValue);
- $actualValue = $actualRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $customClassId = 'customClassId1554754128';
- $customClass = new CustomClass();
- try {
- $gapicClient->createCustomClass($formattedParent, $customClassId, $customClass);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $boost = 9392221;
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setBoost($boost);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $phraseSetId = 'phraseSetId1496370782';
- $phraseSet = new PhraseSet();
- $response = $gapicClient->createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/CreatePhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getPhraseSetId();
- $this->assertProtobufEquals($phraseSetId, $actualValue);
- $actualValue = $actualRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $phraseSetId = 'phraseSetId1496370782';
- $phraseSet = new PhraseSet();
- try {
- $gapicClient->createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $gapicClient->deleteCustomClass($formattedName);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/DeleteCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- try {
- $gapicClient->deleteCustomClass($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $gapicClient->deletePhraseSet($formattedName);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/DeletePhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- try {
- $gapicClient->deletePhraseSet($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $customClassId = 'customClassId1554754128';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setCustomClassId($customClassId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->getCustomClass($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/GetCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- try {
- $gapicClient->getCustomClass($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $boost = 9392221;
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setBoost($boost);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->getPhraseSet($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/GetPhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- try {
- $gapicClient->getPhraseSet($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $customClassesElement = new CustomClass();
- $customClasses = [
- $customClassesElement,
- ];
- $expectedResponse = new ListCustomClassesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setCustomClasses($customClasses);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listCustomClasses($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getCustomClasses()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/ListCustomClasses', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listCustomClasses($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $phraseSetsElement = new PhraseSet();
- $phraseSets = [
- $phraseSetsElement,
- ];
- $expectedResponse = new ListPhraseSetResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setPhraseSets($phraseSets);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listPhraseSet($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getPhraseSets()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/ListPhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listPhraseSet($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $customClassId = 'customClassId1554754128';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setCustomClassId($customClassId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $customClass = new CustomClass();
- $response = $gapicClient->updateCustomClass($customClass);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/UpdateCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $customClass = new CustomClass();
- try {
- $gapicClient->updateCustomClass($customClass);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $boost = 9392221;
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setBoost($boost);
- $transport->addResponse($expectedResponse);
- // Mock request
- $phraseSet = new PhraseSet();
- $response = $gapicClient->updatePhraseSet($phraseSet);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Adaptation/UpdatePhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $phraseSet = new PhraseSet();
- try {
- $gapicClient->updatePhraseSet($phraseSet);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/Speech/v1/tests/Unit/V1/SpeechClientTest.php b/owl-bot-staging/Speech/v1/tests/Unit/V1/SpeechClientTest.php
deleted file mode 100644
index 7f5ef1414a84..000000000000
--- a/owl-bot-staging/Speech/v1/tests/Unit/V1/SpeechClientTest.php
+++ /dev/null
@@ -1,360 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SpeechClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SpeechClient($options);
- }
-
- /** @test */
- public function longRunningRecognizeTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/longRunningRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $requestId = 37109963;
- $expectedResponse = new LongRunningRecognizeResponse();
- $expectedResponse->setRequestId($requestId);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/longRunningRecognizeTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- $response = $gapicClient->longRunningRecognize($config, $audio);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Speech/LongRunningRecognize', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getConfig();
- $this->assertProtobufEquals($config, $actualValue);
- $actualValue = $actualApiRequestObject->getAudio();
- $this->assertProtobufEquals($audio, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/longRunningRecognizeTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function longRunningRecognizeExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/longRunningRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- $response = $gapicClient->longRunningRecognize($config, $audio);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/longRunningRecognizeTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function recognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $requestId = 37109963;
- $expectedResponse = new RecognizeResponse();
- $expectedResponse->setRequestId($requestId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- $response = $gapicClient->recognize($config, $audio);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Speech/Recognize', $actualFuncCall);
- $actualValue = $actualRequestObject->getConfig();
- $this->assertProtobufEquals($config, $actualValue);
- $actualValue = $actualRequestObject->getAudio();
- $this->assertProtobufEquals($audio, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function recognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- try {
- $gapicClient->recognize($config, $audio);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $requestId = 37109963;
- $expectedResponse = new StreamingRecognizeResponse();
- $expectedResponse->setRequestId($requestId);
- $transport->addResponse($expectedResponse);
- $requestId2 = 1302939070;
- $expectedResponse2 = new StreamingRecognizeResponse();
- $expectedResponse2->setRequestId($requestId2);
- $transport->addResponse($expectedResponse2);
- $requestId3 = 1302939071;
- $expectedResponse3 = new StreamingRecognizeResponse();
- $expectedResponse3->setRequestId($requestId3);
- $transport->addResponse($expectedResponse3);
- // Mock request
- $request = new StreamingRecognizeRequest();
- $request2 = new StreamingRecognizeRequest();
- $request3 = new StreamingRecognizeRequest();
- $bidi = $gapicClient->streamingRecognize();
- $this->assertInstanceOf(BidiStream::class, $bidi);
- $bidi->write($request);
- $responses = [];
- $responses[] = $bidi->read();
- $bidi->writeAll([
- $request2,
- $request3,
- ]);
- foreach ($bidi->closeWriteAndReadAll() as $response) {
- $responses[] = $response;
- }
-
- $expectedResponses = [];
- $expectedResponses[] = $expectedResponse;
- $expectedResponses[] = $expectedResponse2;
- $expectedResponses[] = $expectedResponse3;
- $this->assertEquals($expectedResponses, $responses);
- $createStreamRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($createStreamRequests));
- $streamFuncCall = $createStreamRequests[0]->getFuncCall();
- $streamRequestObject = $createStreamRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1.Speech/StreamingRecognize', $streamFuncCall);
- $this->assertNull($streamRequestObject);
- $callObjects = $transport->popCallObjects();
- $this->assertSame(1, count($callObjects));
- $bidiCall = $callObjects[0];
- $writeRequests = $bidiCall->popReceivedCalls();
- $expectedRequests = [];
- $expectedRequests[] = $request;
- $expectedRequests[] = $request2;
- $expectedRequests[] = $request3;
- $this->assertEquals($expectedRequests, $writeRequests);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->setStreamingStatus($status);
- $this->assertTrue($transport->isExhausted());
- $bidi = $gapicClient->streamingRecognize();
- $results = $bidi->closeWriteAndReadAll();
- try {
- iterator_to_array($results);
- // If the close stream method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/CloudSpeech.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/CloudSpeech.php
deleted file mode 100644
index ebc1d57d3efa..000000000000
Binary files a/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/CloudSpeech.php and /dev/null differ
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/CloudSpeechAdaptation.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/CloudSpeechAdaptation.php
deleted file mode 100644
index df260ca204aa..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/CloudSpeechAdaptation.php
+++ /dev/null
@@ -1,91 +0,0 @@
-internalAddGeneratedFile(
- '
-¹
-;google/cloud/speech/v1p1beta1/cloud_speech_adaptation.protogoogle.cloud.speech.v1p1beta1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto,google/cloud/speech/v1p1beta1/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"°
-CreatePhraseSetRequest7
-parent ( B\'àAúA!speech.googleapis.com/PhraseSet
-
phrase_set_id ( BàAA
-
-phrase_set (2(.google.cloud.speech.v1p1beta1.PhraseSetBàA"Œ
-UpdatePhraseSetRequestA
-
-phrase_set (2(.google.cloud.speech.v1p1beta1.PhraseSetBàA/
-update_mask (2.google.protobuf.FieldMask"L
-GetPhraseSetRequest5
-name ( B\'àAúA!
-speech.googleapis.com/PhraseSet"v
-ListPhraseSetRequest7
-parent ( B\'àAúA!speech.googleapis.com/PhraseSet
- page_size (
-
-page_token ( "o
-ListPhraseSetResponse=
-phrase_sets (2(.google.cloud.speech.v1p1beta1.PhraseSet
-next_page_token ( "O
-DeletePhraseSetRequest5
-name ( B\'àAúA!
-speech.googleapis.com/PhraseSet"º
-CreateCustomClassRequest9
-parent ( B)àAúA#!speech.googleapis.com/CustomClass
-custom_class_id ( BàAE
-custom_class (2*.google.cloud.speech.v1p1beta1.CustomClassBàA"’
-UpdateCustomClassRequestE
-custom_class (2*.google.cloud.speech.v1p1beta1.CustomClassBàA/
-update_mask (2.google.protobuf.FieldMask"P
-GetCustomClassRequest7
-name ( B)àAúA#
-!speech.googleapis.com/CustomClass"|
-ListCustomClassesRequest9
-parent ( B)àAúA#!speech.googleapis.com/CustomClass
- page_size (
-
-page_token ( "x
-ListCustomClassesResponseB
-custom_classes (2*.google.cloud.speech.v1p1beta1.CustomClass
-next_page_token ( "S
-DeleteCustomClassRequest7
-name ( B)àAúA#
-!speech.googleapis.com/CustomClass2Ò
-
-AdaptationÖ
-CreatePhraseSet5.google.cloud.speech.v1p1beta1.CreatePhraseSetRequest(.google.cloud.speech.v1p1beta1.PhraseSet"bÚAparent,phrase_set,phrase_set_id‚Óä“:"5/v1p1beta1/{parent=projects/*/locations/*}/phraseSets:*²
-GetPhraseSet2.google.cloud.speech.v1p1beta1.GetPhraseSetRequest(.google.cloud.speech.v1p1beta1.PhraseSet"DÚAname‚Óä“75/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}Â
-
ListPhraseSet3.google.cloud.speech.v1p1beta1.ListPhraseSetRequest4.google.cloud.speech.v1p1beta1.ListPhraseSetResponse"FÚAparent‚Óä“75/v1p1beta1/{parent=projects/*/locations/*}/phraseSetsá
-UpdatePhraseSet5.google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest(.google.cloud.speech.v1p1beta1.PhraseSet"mÚAphrase_set,update_mask‚Óä“N2@/v1p1beta1/{phrase_set.name=projects/*/locations/*/phraseSets/*}:
-phrase_set¦
-DeletePhraseSet5.google.cloud.speech.v1p1beta1.DeletePhraseSetRequest.google.protobuf.Empty"DÚAname‚Óä“7*5/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}ã
-CreateCustomClass7.google.cloud.speech.v1p1beta1.CreateCustomClassRequest*.google.cloud.speech.v1p1beta1.CustomClass"iÚA#parent,custom_class,custom_class_id‚Óä“="8/v1p1beta1/{parent=projects/*/locations/*}/customClasses:*»
-GetCustomClass4.google.cloud.speech.v1p1beta1.GetCustomClassRequest*.google.cloud.speech.v1p1beta1.CustomClass"GÚAname‚Óä“:8/v1p1beta1/{name=projects/*/locations/*/customClasses/*}Ñ
-ListCustomClasses7.google.cloud.speech.v1p1beta1.ListCustomClassesRequest8.google.cloud.speech.v1p1beta1.ListCustomClassesResponse"IÚAparent‚Óä“:8/v1p1beta1/{parent=projects/*/locations/*}/customClassesð
-UpdateCustomClass7.google.cloud.speech.v1p1beta1.UpdateCustomClassRequest*.google.cloud.speech.v1p1beta1.CustomClass"vÚAcustom_class,update_mask‚Óä“U2E/v1p1beta1/{custom_class.name=projects/*/locations/*/customClasses/*}:custom_class
-DeleteCustomClass7.google.cloud.speech.v1p1beta1.DeleteCustomClassRequest.google.protobuf.Empty"GÚAname‚Óä“:*8/v1p1beta1/{name=projects/*/locations/*/customClasses/*}IÊAspeech.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB€
-!com.google.cloud.speech.v1p1beta1BSpeechAdaptationProtoPZ9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpbø¢GCSbproto3'
- , true);
-
- static::$is_initialized = true;
- }
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/Resource.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/Resource.php
deleted file mode 100644
index f331b97975f8..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/GPBMetadata/Google/Cloud/Speech/V1P1Beta1/Resource.php
+++ /dev/null
@@ -1,57 +0,0 @@
-internalAddGeneratedFile(
- '
-Ù
-,google/cloud/speech/v1p1beta1/resource.protogoogle.cloud.speech.v1p1beta1"ƒ
-CustomClass
-name (
-custom_class_id ( C
-items (24.google.cloud.speech.v1p1beta1.CustomClass.ClassItem
- ClassItem
-value ( :lêAi
-!speech.googleapis.com/CustomClassDprojects/{project}/locations/{location}/customClasses/{custom_class}"ù
- PhraseSet
-name ( @
-phrases (2/.google.cloud.speech.v1p1beta1.PhraseSet.Phrase
-boost (&
-Phrase
-value (
-boost (:eêAb
-speech.googleapis.com/PhraseSet?projects/{project}/locations/{location}/phraseSets/{phrase_set}"Ò
-SpeechAdaptation=
-phrase_sets (2(.google.cloud.speech.v1p1beta1.PhraseSetC
-phrase_set_references ( B$úA!
-speech.googleapis.com/PhraseSetB
-custom_classes (2*.google.cloud.speech.v1p1beta1.CustomClassQ
-abnf_grammar (2;.google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar#
-ABNFGrammar
-abnf_strings ( "ª
-TranscriptNormalizationM
-entries (2<.google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry@
-Entry
-search (
-replace (
-case_sensitive (B~
-!com.google.cloud.speech.v1p1beta1BSpeechResourceProtoPZ9cloud.google.com/go/speech/apiv1p1beta1/speechpb;speechpbø¢GCSbproto3'
- , true);
-
- static::$is_initialized = true;
- }
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CreateCustomClassRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CreateCustomClassRequest.php
deleted file mode 100644
index 80fe2a16865b..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CreateCustomClassRequest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-google.cloud.speech.v1p1beta1.CreateCustomClassRequest
- */
-class CreateCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string custom_class_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class_id = '';
- /**
- * Required. The custom class to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.CustomClass custom_class = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type string $custom_class_id
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @type \Google\Cloud\Speech\V1p1beta1\CustomClass $custom_class
- * Required. The custom class to create.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent resource where this custom class will be created.
- * Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string custom_class_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getCustomClassId()
- {
- return $this->custom_class_id;
- }
-
- /**
- * Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string custom_class_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setCustomClassId($var)
- {
- GPBUtil::checkString($var, True);
- $this->custom_class_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The custom class to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.CustomClass custom_class = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\CustomClass|null
- */
- public function getCustomClass()
- {
- return $this->custom_class;
- }
-
- public function hasCustomClass()
- {
- return isset($this->custom_class);
- }
-
- public function clearCustomClass()
- {
- unset($this->custom_class);
- }
-
- /**
- * Required. The custom class to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.CustomClass custom_class = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\CustomClass $var
- * @return $this
- */
- public function setCustomClass($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\CustomClass::class);
- $this->custom_class = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CreatePhraseSetRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CreatePhraseSetRequest.php
deleted file mode 100644
index 6d1920863dc0..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CreatePhraseSetRequest.php
+++ /dev/null
@@ -1,185 +0,0 @@
-google.cloud.speech.v1p1beta1.CreatePhraseSetRequest
- */
-class CreatePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string phrase_set_id = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set_id = '';
- /**
- * Required. The phrase set to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.PhraseSet phrase_set = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type string $phrase_set_id
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @type \Google\Cloud\Speech\V1p1beta1\PhraseSet $phrase_set
- * Required. The phrase set to create.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent resource where this phrase set will be created.
- * Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string phrase_set_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getPhraseSetId()
- {
- return $this->phrase_set_id;
- }
-
- /**
- * Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- *
- * Generated from protobuf field string phrase_set_id = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setPhraseSetId($var)
- {
- GPBUtil::checkString($var, True);
- $this->phrase_set_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The phrase set to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.PhraseSet phrase_set = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\PhraseSet|null
- */
- public function getPhraseSet()
- {
- return $this->phrase_set;
- }
-
- public function hasPhraseSet()
- {
- return isset($this->phrase_set);
- }
-
- public function clearPhraseSet()
- {
- unset($this->phrase_set);
- }
-
- /**
- * Required. The phrase set to create.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.PhraseSet phrase_set = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\PhraseSet $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\PhraseSet::class);
- $this->phrase_set = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CustomClass.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CustomClass.php
deleted file mode 100644
index 493f2d4cdfe6..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CustomClass.php
+++ /dev/null
@@ -1,141 +0,0 @@
-google.cloud.speech.v1p1beta1.CustomClass
- */
-class CustomClass extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resource name of the custom class.
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- *
- * Generated from protobuf field string custom_class_id = 2;
- */
- protected $custom_class_id = '';
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3;
- */
- private $items;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The resource name of the custom class.
- * @type string $custom_class_id
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- * @type array<\Google\Cloud\Speech\V1p1beta1\CustomClass\ClassItem>|\Google\Protobuf\Internal\RepeatedField $items
- * A collection of class items.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resource name of the custom class.
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The resource name of the custom class.
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- *
- * Generated from protobuf field string custom_class_id = 2;
- * @return string
- */
- public function getCustomClassId()
- {
- return $this->custom_class_id;
- }
-
- /**
- * If this custom class is a resource, the custom_class_id is the resource id
- * of the CustomClass. Case sensitive.
- *
- * Generated from protobuf field string custom_class_id = 2;
- * @param string $var
- * @return $this
- */
- public function setCustomClassId($var)
- {
- GPBUtil::checkString($var, True);
- $this->custom_class_id = $var;
-
- return $this;
- }
-
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getItems()
- {
- return $this->items;
- }
-
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass.ClassItem items = 3;
- * @param array<\Google\Cloud\Speech\V1p1beta1\CustomClass\ClassItem>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setItems($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\CustomClass\ClassItem::class);
- $this->items = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CustomClass/ClassItem.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CustomClass/ClassItem.php
deleted file mode 100644
index a1c86b2a98ee..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/CustomClass/ClassItem.php
+++ /dev/null
@@ -1,70 +0,0 @@
-google.cloud.speech.v1p1beta1.CustomClass.ClassItem
- */
-class ClassItem extends \Google\Protobuf\Internal\Message
-{
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- */
- protected $value = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $value
- * The class item's value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ClassItem::class, \Google\Cloud\Speech\V1p1beta1\CustomClass_ClassItem::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/DeleteCustomClassRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/DeleteCustomClassRequest.php
deleted file mode 100644
index 590ab4fc6d80..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/DeleteCustomClassRequest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-google.cloud.speech.v1p1beta1.DeleteCustomClassRequest
- */
-class DeleteCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the custom class to delete. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/DeletePhraseSetRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/DeletePhraseSetRequest.php
deleted file mode 100644
index 3d22b003ccf7..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/DeletePhraseSetRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.speech.v1p1beta1.DeletePhraseSetRequest
- */
-class DeletePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the phrase set to delete. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/GetCustomClassRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/GetCustomClassRequest.php
deleted file mode 100644
index ea8f0d71ebe7..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/GetCustomClassRequest.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.speech.v1p1beta1.GetCustomClassRequest
- */
-class GetCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the custom class to retrieve. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/GetPhraseSetRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/GetPhraseSetRequest.php
deleted file mode 100644
index b7a403a28c96..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/GetPhraseSetRequest.php
+++ /dev/null
@@ -1,91 +0,0 @@
-google.cloud.speech.v1p1beta1.GetPhraseSetRequest
- */
-class GetPhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the phrase set to retrieve. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListCustomClassesRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListCustomClassesRequest.php
deleted file mode 100644
index be90258684d1..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListCustomClassesRequest.php
+++ /dev/null
@@ -1,183 +0,0 @@
-google.cloud.speech.v1p1beta1.ListCustomClassesRequest
- */
-class ListCustomClassesRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type int $page_size
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- * @type string $page_token
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent, which owns this collection of custom classes. Format:
- * `projects/{project}/locations/{location}/customClasses`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of custom classes to return. The service may return
- * fewer than this value. If unspecified, at most 50 custom classes will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous `ListCustomClass` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListCustomClass` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListCustomClassesResponse.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListCustomClassesResponse.php
deleted file mode 100644
index 31af4f9e1566..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListCustomClassesResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.cloud.speech.v1p1beta1.ListCustomClassesResponse
- */
-class ListCustomClassesResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The custom classes.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 1;
- */
- private $custom_classes;
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
- * The custom classes.
- * @type string $next_page_token
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The custom classes.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getCustomClasses()
- {
- return $this->custom_classes;
- }
-
- /**
- * The custom classes.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 1;
- * @param array<\Google\Cloud\Speech\V1p1beta1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setCustomClasses($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\CustomClass::class);
- $this->custom_classes = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListPhraseSetRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListPhraseSetRequest.php
deleted file mode 100644
index 82f8d09fb72c..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListPhraseSetRequest.php
+++ /dev/null
@@ -1,183 +0,0 @@
-google.cloud.speech.v1p1beta1.ListPhraseSetRequest
- */
-class ListPhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type int $page_size
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- * @type string $page_token
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The parent, which owns this collection of phrase set. Format:
- * `projects/{project}/locations/{location}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of phrase sets to return. The service may return
- * fewer than this value. If unspecified, at most 50 phrase sets will be
- * returned. The maximum value is 1000; values above 1000 will be coerced to
- * 1000.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous `ListPhraseSet` call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to `ListPhraseSet` must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListPhraseSetResponse.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListPhraseSetResponse.php
deleted file mode 100644
index 42acba662777..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/ListPhraseSetResponse.php
+++ /dev/null
@@ -1,105 +0,0 @@
-google.cloud.speech.v1p1beta1.ListPhraseSetResponse
- */
-class ListPhraseSetResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The phrase set.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;
- */
- private $phrase_sets;
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
- * The phrase set.
- * @type string $next_page_token
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The phrase set.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSets()
- {
- return $this->phrase_sets;
- }
-
- /**
- * The phrase set.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;
- * @param array<\Google\Cloud\Speech\V1p1beta1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSets($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\PhraseSet::class);
- $this->phrase_sets = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as `page_token` to retrieve the next page.
- * If this field is omitted, there are no subsequent pages.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeMetadata.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeMetadata.php
deleted file mode 100644
index ecca683bd94c..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeMetadata.php
+++ /dev/null
@@ -1,247 +0,0 @@
-google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata
- */
-class LongRunningRecognizeMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- */
- protected $progress_percent = 0;
- /**
- * Time when the request was received.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 2;
- */
- protected $start_time = null;
- /**
- * Time of the most recent processing update.
- *
- * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 3;
- */
- protected $last_update_time = null;
- /**
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- *
- * Generated from protobuf field string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uri = '';
- /**
- * Output only. A copy of the TranscriptOutputConfig if it was set in the
- * request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $output_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $progress_percent
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- * @type \Google\Protobuf\Timestamp $start_time
- * Time when the request was received.
- * @type \Google\Protobuf\Timestamp $last_update_time
- * Time of the most recent processing update.
- * @type string $uri
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- * @type \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig $output_config
- * Output only. A copy of the TranscriptOutputConfig if it was set in the
- * request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- * @return int
- */
- public function getProgressPercent()
- {
- return $this->progress_percent;
- }
-
- /**
- * Approximate percentage of audio processed thus far. Guaranteed to be 100
- * when the audio is fully processed and the results are available.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- * @param int $var
- * @return $this
- */
- public function setProgressPercent($var)
- {
- GPBUtil::checkInt32($var);
- $this->progress_percent = $var;
-
- return $this;
- }
-
- /**
- * Time when the request was received.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 2;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Time when the request was received.
- *
- * Generated from protobuf field .google.protobuf.Timestamp start_time = 2;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Time of the most recent processing update.
- *
- * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 3;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getLastUpdateTime()
- {
- return $this->last_update_time;
- }
-
- public function hasLastUpdateTime()
- {
- return isset($this->last_update_time);
- }
-
- public function clearLastUpdateTime()
- {
- unset($this->last_update_time);
- }
-
- /**
- * Time of the most recent processing update.
- *
- * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 3;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setLastUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->last_update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- *
- * Generated from protobuf field string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUri()
- {
- return $this->uri;
- }
-
- /**
- * Output only. The URI of the audio file being transcribed. Empty if the
- * audio was sent as byte content.
- *
- * Generated from protobuf field string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->uri = $var;
-
- return $this;
- }
-
- /**
- * Output only. A copy of the TranscriptOutputConfig if it was set in the
- * request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig|null
- */
- public function getOutputConfig()
- {
- return $this->output_config;
- }
-
- public function hasOutputConfig()
- {
- return isset($this->output_config);
- }
-
- public function clearOutputConfig()
- {
- unset($this->output_config);
- }
-
- /**
- * Output only. A copy of the TranscriptOutputConfig if it was set in the
- * request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig $var
- * @return $this
- */
- public function setOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig::class);
- $this->output_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeRequest.php
deleted file mode 100644
index 3004b5d07847..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeRequest.php
+++ /dev/null
@@ -1,170 +0,0 @@
-google.cloud.speech.v1p1beta1.LongRunningRecognizeRequest
- */
-class LongRunningRecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $audio = null;
- /**
- * Optional. Specifies an optional destination for the recognition results.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $output_config = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1p1beta1\RecognitionConfig $config
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @type \Google\Cloud\Speech\V1p1beta1\RecognitionAudio $audio
- * Required. The audio data to be recognized.
- * @type \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig $output_config
- * Optional. Specifies an optional destination for the recognition results.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\RecognitionAudio|null
- */
- public function getAudio()
- {
- return $this->audio;
- }
-
- public function hasAudio()
- {
- return isset($this->audio);
- }
-
- public function clearAudio()
- {
- unset($this->audio);
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\RecognitionAudio $var
- * @return $this
- */
- public function setAudio($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\RecognitionAudio::class);
- $this->audio = $var;
-
- return $this;
- }
-
- /**
- * Optional. Specifies an optional destination for the recognition results.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig|null
- */
- public function getOutputConfig()
- {
- return $this->output_config;
- }
-
- public function hasOutputConfig()
- {
- return isset($this->output_config);
- }
-
- public function clearOutputConfig()
- {
- unset($this->output_config);
- }
-
- /**
- * Optional. Specifies an optional destination for the recognition results.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig $var
- * @return $this
- */
- public function setOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig::class);
- $this->output_config = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeResponse.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeResponse.php
deleted file mode 100644
index 28c665718406..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/LongRunningRecognizeResponse.php
+++ /dev/null
@@ -1,289 +0,0 @@
-google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse
- */
-class LongRunningRecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;
- */
- private $results;
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- */
- protected $total_billed_time = null;
- /**
- * Original output config if present in the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 6;
- */
- protected $output_config = null;
- /**
- * If the transcript output fails this field contains the relevant error.
- *
- * Generated from protobuf field .google.rpc.Status output_error = 7;
- */
- protected $output_error = null;
- /**
- * Provides information on speech adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 8;
- */
- protected $speech_adaptation_info = null;
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 9;
- */
- protected $request_id = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- * @type \Google\Protobuf\Duration $total_billed_time
- * When available, billed audio seconds for the corresponding request.
- * @type \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig $output_config
- * Original output config if present in the request.
- * @type \Google\Rpc\Status $output_error
- * If the transcript output fails this field contains the relevant error.
- * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $speech_adaptation_info
- * Provides information on speech adaptation behavior in response
- * @type int|string $request_id
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;
- * @param array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\SpeechRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledTime()
- {
- return $this->total_billed_time;
- }
-
- public function hasTotalBilledTime()
- {
- return isset($this->total_billed_time);
- }
-
- public function clearTotalBilledTime()
- {
- unset($this->total_billed_time);
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_time = $var;
-
- return $this;
- }
-
- /**
- * Original output config if present in the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 6;
- * @return \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig|null
- */
- public function getOutputConfig()
- {
- return $this->output_config;
- }
-
- public function hasOutputConfig()
- {
- return isset($this->output_config);
- }
-
- public function clearOutputConfig()
- {
- unset($this->output_config);
- }
-
- /**
- * Original output config if present in the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptOutputConfig output_config = 6;
- * @param \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig $var
- * @return $this
- */
- public function setOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\TranscriptOutputConfig::class);
- $this->output_config = $var;
-
- return $this;
- }
-
- /**
- * If the transcript output fails this field contains the relevant error.
- *
- * Generated from protobuf field .google.rpc.Status output_error = 7;
- * @return \Google\Rpc\Status|null
- */
- public function getOutputError()
- {
- return $this->output_error;
- }
-
- public function hasOutputError()
- {
- return isset($this->output_error);
- }
-
- public function clearOutputError()
- {
- unset($this->output_error);
- }
-
- /**
- * If the transcript output fails this field contains the relevant error.
- *
- * Generated from protobuf field .google.rpc.Status output_error = 7;
- * @param \Google\Rpc\Status $var
- * @return $this
- */
- public function setOutputError($var)
- {
- GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
- $this->output_error = $var;
-
- return $this;
- }
-
- /**
- * Provides information on speech adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 8;
- * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo|null
- */
- public function getSpeechAdaptationInfo()
- {
- return $this->speech_adaptation_info;
- }
-
- public function hasSpeechAdaptationInfo()
- {
- return isset($this->speech_adaptation_info);
- }
-
- public function clearSpeechAdaptationInfo()
- {
- unset($this->speech_adaptation_info);
- }
-
- /**
- * Provides information on speech adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 8;
- * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $var
- * @return $this
- */
- public function setSpeechAdaptationInfo($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo::class);
- $this->speech_adaptation_info = $var;
-
- return $this;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 9;
- * @return int|string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 9;
- * @param int|string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkInt64($var);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/PhraseSet.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/PhraseSet.php
deleted file mode 100644
index 83a1fb3fc92f..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/PhraseSet.php
+++ /dev/null
@@ -1,168 +0,0 @@
-google.cloud.speech.v1p1beta1.PhraseSet
- */
-class PhraseSet extends \Google\Protobuf\Internal\Message
-{
- /**
- * The resource name of the phrase set.
- *
- * Generated from protobuf field string name = 1;
- */
- protected $name = '';
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
- */
- private $phrases;
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * The resource name of the phrase set.
- * @type array<\Google\Cloud\Speech\V1p1beta1\PhraseSet\Phrase>|\Google\Protobuf\Internal\RepeatedField $phrases
- * A list of word and phrases.
- * @type float $boost
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The resource name of the phrase set.
- *
- * Generated from protobuf field string name = 1;
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * The resource name of the phrase set.
- *
- * Generated from protobuf field string name = 1;
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhrases()
- {
- return $this->phrases;
- }
-
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet.Phrase phrases = 2;
- * @param array<\Google\Cloud\Speech\V1p1beta1\PhraseSet\Phrase>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhrases($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\PhraseSet\Phrase::class);
- $this->phrases = $arr;
-
- return $this;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 (exclusive) and 20. We recommend using a binary search
- * approach to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/PhraseSet/Phrase.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/PhraseSet/Phrase.php
deleted file mode 100644
index 52b9adf5524a..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/PhraseSet/Phrase.php
+++ /dev/null
@@ -1,158 +0,0 @@
-google.cloud.speech.v1p1beta1.PhraseSet.Phrase
- */
-class Phrase extends \Google\Protobuf\Internal\Message
-{
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- */
- protected $value = '';
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 2;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $value
- * The phrase itself.
- * @type float $boost
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 2;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost will simply be ignored. Though `boost` can accept a wide range of
- * positive values, most use cases are best served
- * with values between 0 and 20. We recommend using a binary search approach
- * to finding the optimal value for your use case as well as adding
- * phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 2;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Phrase::class, \Google\Cloud\Speech\V1p1beta1\PhraseSet_Phrase::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionAudio.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionAudio.php
deleted file mode 100644
index 33f56b8607e2..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionAudio.php
+++ /dev/null
@@ -1,138 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionAudio
- */
-class RecognitionAudio extends \Google\Protobuf\Internal\Message
-{
- protected $audio_source;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $content
- * The audio data bytes encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation, whereas JSON representations use base64.
- * @type string $uri
- * URI that points to a file that contains audio data bytes as specified in
- * `RecognitionConfig`. The file must not be compressed (for example, gzip).
- * Currently, only Google Cloud Storage URIs are
- * supported, which must be specified in the following format:
- * `gs://bucket_name/object_name` (other URI formats return
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
- * For more information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The audio data bytes encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation, whereas JSON representations use base64.
- *
- * Generated from protobuf field bytes content = 1;
- * @return string
- */
- public function getContent()
- {
- return $this->readOneof(1);
- }
-
- public function hasContent()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * The audio data bytes encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation, whereas JSON representations use base64.
- *
- * Generated from protobuf field bytes content = 1;
- * @param string $var
- * @return $this
- */
- public function setContent($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * URI that points to a file that contains audio data bytes as specified in
- * `RecognitionConfig`. The file must not be compressed (for example, gzip).
- * Currently, only Google Cloud Storage URIs are
- * supported, which must be specified in the following format:
- * `gs://bucket_name/object_name` (other URI formats return
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
- * For more information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * Generated from protobuf field string uri = 2;
- * @return string
- */
- public function getUri()
- {
- return $this->readOneof(2);
- }
-
- public function hasUri()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * URI that points to a file that contains audio data bytes as specified in
- * `RecognitionConfig`. The file must not be compressed (for example, gzip).
- * Currently, only Google Cloud Storage URIs are
- * supported, which must be specified in the following format:
- * `gs://bucket_name/object_name` (other URI formats return
- * [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]).
- * For more information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * Generated from protobuf field string uri = 2;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getAudioSource()
- {
- return $this->whichOneof("audio_source");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionConfig.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionConfig.php
deleted file mode 100644
index 99a025058edf..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionConfig.php
+++ /dev/null
@@ -1,1498 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionConfig
- */
-class RecognitionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1;
- */
- protected $encoding = 0;
- /**
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2;
- */
- protected $sample_rate_hertz = 0;
- /**
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- *
- * Generated from protobuf field int32 audio_channel_count = 7;
- */
- protected $audio_channel_count = 0;
- /**
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- *
- * Generated from protobuf field bool enable_separate_recognition_per_channel = 12;
- */
- protected $enable_separate_recognition_per_channel = false;
- /**
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- *
- * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $language_code = '';
- /**
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- *
- * Generated from protobuf field repeated string alternative_language_codes = 18;
- */
- private $alternative_language_codes;
- /**
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 4;
- */
- protected $max_alternatives = 0;
- /**
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 5;
- */
- protected $profanity_filter = false;
- /**
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
- */
- protected $adaptation = null;
- /**
- * Use transcription normalization to automatically replace parts of the
- * transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptNormalization transcript_normalization = 24;
- */
- protected $transcript_normalization = null;
- /**
- * Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
- */
- private $speech_contexts;
- /**
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 8;
- */
- protected $enable_word_time_offsets = false;
- /**
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 15;
- */
- protected $enable_word_confidence = false;
- /**
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 11;
- */
- protected $enable_automatic_punctuation = false;
- /**
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- */
- protected $enable_spoken_punctuation = null;
- /**
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- */
- protected $enable_spoken_emojis = null;
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- * Note: Use diarization_config instead.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 16 [deprecated = true];
- * @deprecated
- */
- protected $enable_speaker_diarization = false;
- /**
- * If set, specifies the estimated number of speakers in the conversation.
- * Defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
- * Note: Use diarization_config instead.
- *
- * Generated from protobuf field int32 diarization_speaker_count = 17 [deprecated = true];
- * @deprecated
- */
- protected $diarization_speaker_count = 0;
- /**
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig diarization_config = 19;
- */
- protected $diarization_config = null;
- /**
- * Metadata regarding this request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata metadata = 9;
- */
- protected $metadata = null;
- /**
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- *
- * Generated from protobuf field string model = 13;
- */
- protected $model = '';
- /**
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- *
- * Generated from protobuf field bool use_enhanced = 14;
- */
- protected $use_enhanced = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $encoding
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- * @type int $sample_rate_hertz
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- * @type int $audio_channel_count
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- * @type bool $enable_separate_recognition_per_channel
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- * @type string $language_code
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- * @type array|\Google\Protobuf\Internal\RepeatedField $alternative_language_codes
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- * @type int $max_alternatives
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- * @type bool $profanity_filter
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation $adaptation
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- * @type \Google\Cloud\Speech\V1p1beta1\TranscriptNormalization $transcript_normalization
- * Use transcription normalization to automatically replace parts of the
- * transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- * @type array<\Google\Cloud\Speech\V1p1beta1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $speech_contexts
- * Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- * @type bool $enable_word_time_offsets
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- * @type bool $enable_word_confidence
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- * @type bool $enable_automatic_punctuation
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- * @type \Google\Protobuf\BoolValue $enable_spoken_punctuation
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- * @type \Google\Protobuf\BoolValue $enable_spoken_emojis
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- * @type bool $enable_speaker_diarization
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- * Note: Use diarization_config instead.
- * @type int $diarization_speaker_count
- * If set, specifies the estimated number of speakers in the conversation.
- * Defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
- * Note: Use diarization_config instead.
- * @type \Google\Cloud\Speech\V1p1beta1\SpeakerDiarizationConfig $diarization_config
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- * @type \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata $metadata
- * Metadata regarding this request.
- * @type string $model
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- * @type bool $use_enhanced
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1;
- * @return int
- */
- public function getEncoding()
- {
- return $this->encoding;
- }
-
- /**
- * Encoding of audio data sent in all `RecognitionAudio` messages.
- * This field is optional for `FLAC` and `WAV` audio files and required
- * for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding encoding = 1;
- * @param int $var
- * @return $this
- */
- public function setEncoding($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionConfig\AudioEncoding::class);
- $this->encoding = $var;
-
- return $this;
- }
-
- /**
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2;
- * @return int
- */
- public function getSampleRateHertz()
- {
- return $this->sample_rate_hertz;
- }
-
- /**
- * Sample rate in Hertz of the audio data sent in all
- * `RecognitionAudio` messages. Valid values are: 8000-48000.
- * 16000 is optimal. For best results, set the sampling rate of the audio
- * source to 16000 Hz. If that's not possible, use the native sample rate of
- * the audio source (instead of re-sampling).
- * This field is optional for FLAC and WAV audio files, but is
- * required for all other audio formats. For details, see
- * [AudioEncoding][google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding].
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2;
- * @param int $var
- * @return $this
- */
- public function setSampleRateHertz($var)
- {
- GPBUtil::checkInt32($var);
- $this->sample_rate_hertz = $var;
-
- return $this;
- }
-
- /**
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- *
- * Generated from protobuf field int32 audio_channel_count = 7;
- * @return int
- */
- public function getAudioChannelCount()
- {
- return $this->audio_channel_count;
- }
-
- /**
- * The number of channels in the input audio data.
- * ONLY set this for MULTI-CHANNEL recognition.
- * Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`.
- * Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`.
- * If `0` or omitted, defaults to one channel (mono).
- * Note: We only recognize the first channel by default.
- * To perform independent recognition on each channel set
- * `enable_separate_recognition_per_channel` to 'true'.
- *
- * Generated from protobuf field int32 audio_channel_count = 7;
- * @param int $var
- * @return $this
- */
- public function setAudioChannelCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->audio_channel_count = $var;
-
- return $this;
- }
-
- /**
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- *
- * Generated from protobuf field bool enable_separate_recognition_per_channel = 12;
- * @return bool
- */
- public function getEnableSeparateRecognitionPerChannel()
- {
- return $this->enable_separate_recognition_per_channel;
- }
-
- /**
- * This needs to be set to `true` explicitly and `audio_channel_count` > 1
- * to get each channel recognized separately. The recognition result will
- * contain a `channel_tag` field to state which channel that result belongs
- * to. If this is not true, we will only recognize the first channel. The
- * request is billed cumulatively for all channels recognized:
- * `audio_channel_count` multiplied by the length of the audio.
- *
- * Generated from protobuf field bool enable_separate_recognition_per_channel = 12;
- * @param bool $var
- * @return $this
- */
- public function setEnableSeparateRecognitionPerChannel($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_separate_recognition_per_channel = $var;
-
- return $this;
- }
-
- /**
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- *
- * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Required. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Example: "en-US".
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes.
- *
- * Generated from protobuf field string language_code = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
- /**
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- *
- * Generated from protobuf field repeated string alternative_language_codes = 18;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternativeLanguageCodes()
- {
- return $this->alternative_language_codes;
- }
-
- /**
- * A list of up to 3 additional
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags,
- * listing possible alternative languages of the supplied audio.
- * See [Language
- * Support](https://cloud.google.com/speech-to-text/docs/languages) for a list
- * of the currently supported language codes. If alternative languages are
- * listed, recognition result will contain recognition in the most likely
- * language detected including the main language_code. The recognition result
- * will include the language tag of the language detected in the audio. Note:
- * This feature is only supported for Voice Command and Voice Search use cases
- * and performance may vary for other use cases (e.g., phone call
- * transcription).
- *
- * Generated from protobuf field repeated string alternative_language_codes = 18;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternativeLanguageCodes($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->alternative_language_codes = $arr;
-
- return $this;
- }
-
- /**
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 4;
- * @return int
- */
- public function getMaxAlternatives()
- {
- return $this->max_alternatives;
- }
-
- /**
- * Maximum number of recognition hypotheses to be returned.
- * Specifically, the maximum number of `SpeechRecognitionAlternative` messages
- * within each `SpeechRecognitionResult`.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 4;
- * @param int $var
- * @return $this
- */
- public function setMaxAlternatives($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_alternatives = $var;
-
- return $this;
- }
-
- /**
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 5;
- * @return bool
- */
- public function getProfanityFilter()
- {
- return $this->profanity_filter;
- }
-
- /**
- * If set to `true`, the server will attempt to filter out
- * profanities, replacing all but the initial character in each filtered word
- * with asterisks, e.g. "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 5;
- * @param bool $var
- * @return $this
- */
- public function setProfanityFilter($var)
- {
- GPBUtil::checkBool($var);
- $this->profanity_filter = $var;
-
- return $this;
- }
-
- /**
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
- * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation|null
- */
- public function getAdaptation()
- {
- return $this->adaptation;
- }
-
- public function hasAdaptation()
- {
- return isset($this->adaptation);
- }
-
- public function clearAdaptation()
- {
- unset($this->adaptation);
- }
-
- /**
- * Speech adaptation configuration improves the accuracy of speech
- * recognition. For more information, see the [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation)
- * documentation.
- * When speech adaptation is set it supersedes the `speech_contexts` field.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptation adaptation = 20;
- * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation $var
- * @return $this
- */
- public function setAdaptation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation::class);
- $this->adaptation = $var;
-
- return $this;
- }
-
- /**
- * Use transcription normalization to automatically replace parts of the
- * transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptNormalization transcript_normalization = 24;
- * @return \Google\Cloud\Speech\V1p1beta1\TranscriptNormalization|null
- */
- public function getTranscriptNormalization()
- {
- return $this->transcript_normalization;
- }
-
- public function hasTranscriptNormalization()
- {
- return isset($this->transcript_normalization);
- }
-
- public function clearTranscriptNormalization()
- {
- unset($this->transcript_normalization);
- }
-
- /**
- * Use transcription normalization to automatically replace parts of the
- * transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.TranscriptNormalization transcript_normalization = 24;
- * @param \Google\Cloud\Speech\V1p1beta1\TranscriptNormalization $var
- * @return $this
- */
- public function setTranscriptNormalization($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\TranscriptNormalization::class);
- $this->transcript_normalization = $var;
-
- return $this;
- }
-
- /**
- * Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getSpeechContexts()
- {
- return $this->speech_contexts;
- }
-
- /**
- * Array of [SpeechContext][google.cloud.speech.v1p1beta1.SpeechContext].
- * A means to provide context to assist the speech recognition. For more
- * information, see
- * [speech
- * adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechContext speech_contexts = 6;
- * @param array<\Google\Cloud\Speech\V1p1beta1\SpeechContext>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setSpeechContexts($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\SpeechContext::class);
- $this->speech_contexts = $arr;
-
- return $this;
- }
-
- /**
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 8;
- * @return bool
- */
- public function getEnableWordTimeOffsets()
- {
- return $this->enable_word_time_offsets;
- }
-
- /**
- * If `true`, the top result includes a list of words and
- * the start and end time offsets (timestamps) for those words. If
- * `false`, no word-level time offset information is returned. The default is
- * `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 8;
- * @param bool $var
- * @return $this
- */
- public function setEnableWordTimeOffsets($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_word_time_offsets = $var;
-
- return $this;
- }
-
- /**
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 15;
- * @return bool
- */
- public function getEnableWordConfidence()
- {
- return $this->enable_word_confidence;
- }
-
- /**
- * If `true`, the top result includes a list of words and the
- * confidence for those words. If `false`, no word-level confidence
- * information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 15;
- * @param bool $var
- * @return $this
- */
- public function setEnableWordConfidence($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_word_confidence = $var;
-
- return $this;
- }
-
- /**
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 11;
- * @return bool
- */
- public function getEnableAutomaticPunctuation()
- {
- return $this->enable_automatic_punctuation;
- }
-
- /**
- * If 'true', adds punctuation to recognition result hypotheses.
- * This feature is only available in select languages. Setting this for
- * requests in other languages has no effect at all.
- * The default 'false' value does not add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 11;
- * @param bool $var
- * @return $this
- */
- public function setEnableAutomaticPunctuation($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_automatic_punctuation = $var;
-
- return $this;
- }
-
- /**
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @return \Google\Protobuf\BoolValue|null
- */
- public function getEnableSpokenPunctuation()
- {
- return $this->enable_spoken_punctuation;
- }
-
- public function hasEnableSpokenPunctuation()
- {
- return isset($this->enable_spoken_punctuation);
- }
-
- public function clearEnableSpokenPunctuation()
- {
- unset($this->enable_spoken_punctuation);
- }
-
- /**
- * Returns the unboxed value from getEnableSpokenPunctuation()
-
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @return bool|null
- */
- public function getEnableSpokenPunctuationUnwrapped()
- {
- return $this->readWrapperValue("enable_spoken_punctuation");
- }
-
- /**
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @param \Google\Protobuf\BoolValue $var
- * @return $this
- */
- public function setEnableSpokenPunctuation($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
- $this->enable_spoken_punctuation = $var;
-
- return $this;
- }
-
- /**
- * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
-
- * The spoken punctuation behavior for the call
- * If not set, uses default behavior based on model of choice
- * e.g. command_and_search will enable spoken punctuation by default
- * If 'true', replaces spoken punctuation with the corresponding symbols in
- * the request. For example, "how are you question mark" becomes "how are
- * you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation
- * for support. If 'false', spoken punctuation is not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_punctuation = 22;
- * @param bool|null $var
- * @return $this
- */
- public function setEnableSpokenPunctuationUnwrapped($var)
- {
- $this->writeWrapperValue("enable_spoken_punctuation", $var);
- return $this;}
-
- /**
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @return \Google\Protobuf\BoolValue|null
- */
- public function getEnableSpokenEmojis()
- {
- return $this->enable_spoken_emojis;
- }
-
- public function hasEnableSpokenEmojis()
- {
- return isset($this->enable_spoken_emojis);
- }
-
- public function clearEnableSpokenEmojis()
- {
- unset($this->enable_spoken_emojis);
- }
-
- /**
- * Returns the unboxed value from getEnableSpokenEmojis()
-
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @return bool|null
- */
- public function getEnableSpokenEmojisUnwrapped()
- {
- return $this->readWrapperValue("enable_spoken_emojis");
- }
-
- /**
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @param \Google\Protobuf\BoolValue $var
- * @return $this
- */
- public function setEnableSpokenEmojis($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
- $this->enable_spoken_emojis = $var;
-
- return $this;
- }
-
- /**
- * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object.
-
- * The spoken emoji behavior for the call
- * If not set, uses default behavior based on model of choice
- * If 'true', adds spoken emoji formatting for the request. This will replace
- * spoken emojis with the corresponding Unicode symbols in the final
- * transcript. If 'false', spoken emojis are not replaced.
- *
- * Generated from protobuf field .google.protobuf.BoolValue enable_spoken_emojis = 23;
- * @param bool|null $var
- * @return $this
- */
- public function setEnableSpokenEmojisUnwrapped($var)
- {
- $this->writeWrapperValue("enable_spoken_emojis", $var);
- return $this;}
-
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- * Note: Use diarization_config instead.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 16 [deprecated = true];
- * @return bool
- * @deprecated
- */
- public function getEnableSpeakerDiarization()
- {
- @trigger_error('enable_speaker_diarization is deprecated.', E_USER_DEPRECATED);
- return $this->enable_speaker_diarization;
- }
-
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- * Note: Use diarization_config instead.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 16 [deprecated = true];
- * @param bool $var
- * @return $this
- * @deprecated
- */
- public function setEnableSpeakerDiarization($var)
- {
- @trigger_error('enable_speaker_diarization is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkBool($var);
- $this->enable_speaker_diarization = $var;
-
- return $this;
- }
-
- /**
- * If set, specifies the estimated number of speakers in the conversation.
- * Defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
- * Note: Use diarization_config instead.
- *
- * Generated from protobuf field int32 diarization_speaker_count = 17 [deprecated = true];
- * @return int
- * @deprecated
- */
- public function getDiarizationSpeakerCount()
- {
- @trigger_error('diarization_speaker_count is deprecated.', E_USER_DEPRECATED);
- return $this->diarization_speaker_count;
- }
-
- /**
- * If set, specifies the estimated number of speakers in the conversation.
- * Defaults to '2'. Ignored unless enable_speaker_diarization is set to true.
- * Note: Use diarization_config instead.
- *
- * Generated from protobuf field int32 diarization_speaker_count = 17 [deprecated = true];
- * @param int $var
- * @return $this
- * @deprecated
- */
- public function setDiarizationSpeakerCount($var)
- {
- @trigger_error('diarization_speaker_count is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkInt32($var);
- $this->diarization_speaker_count = $var;
-
- return $this;
- }
-
- /**
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig diarization_config = 19;
- * @return \Google\Cloud\Speech\V1p1beta1\SpeakerDiarizationConfig|null
- */
- public function getDiarizationConfig()
- {
- return $this->diarization_config;
- }
-
- public function hasDiarizationConfig()
- {
- return isset($this->diarization_config);
- }
-
- public function clearDiarizationConfig()
- {
- unset($this->diarization_config);
- }
-
- /**
- * Config to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * Note: When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig diarization_config = 19;
- * @param \Google\Cloud\Speech\V1p1beta1\SpeakerDiarizationConfig $var
- * @return $this
- */
- public function setDiarizationConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeakerDiarizationConfig::class);
- $this->diarization_config = $var;
-
- return $this;
- }
-
- /**
- * Metadata regarding this request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata metadata = 9;
- * @return \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata regarding this request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata metadata = 9;
- * @param \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata::class);
- $this->metadata = $var;
-
- return $this;
- }
-
- /**
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- *
- * Generated from protobuf field string model = 13;
- * @return string
- */
- public function getModel()
- {
- return $this->model;
- }
-
- /**
- * Which model to select for the given request. Select the model
- * best suited to your domain to get best results. If a model is not
- * explicitly specified, then we auto-select a model based on the parameters
- * in the RecognitionConfig.
- *
- *
- * Model |
- * Description |
- *
- *
- * latest_long |
- * Best for long form content like media or conversation. |
- *
- *
- * latest_short |
- * Best for short form content like commands or single shot directed
- * speech. |
- *
- *
- * command_and_search |
- * Best for short queries such as voice commands or voice search. |
- *
- *
- * phone_call |
- * Best for audio that originated from a phone call (typically
- * recorded at an 8khz sampling rate). |
- *
- *
- * video |
- * Best for audio that originated from video or includes multiple
- * speakers. Ideally the audio is recorded at a 16khz or greater
- * sampling rate. This is a premium model that costs more than the
- * standard rate. |
- *
- *
- * default |
- * Best for audio that is not one of the specific audio models.
- * For example, long-form audio. Ideally the audio is high-fidelity,
- * recorded at a 16khz or greater sampling rate. |
- *
- *
- * medical_conversation |
- * Best for audio that originated from a conversation between a
- * medical provider and patient. |
- *
- *
- * medical_dictation |
- * Best for audio that originated from dictation notes by a medical
- * provider. |
- *
- *
- *
- * Generated from protobuf field string model = 13;
- * @param string $var
- * @return $this
- */
- public function setModel($var)
- {
- GPBUtil::checkString($var, True);
- $this->model = $var;
-
- return $this;
- }
-
- /**
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- *
- * Generated from protobuf field bool use_enhanced = 14;
- * @return bool
- */
- public function getUseEnhanced()
- {
- return $this->use_enhanced;
- }
-
- /**
- * Set to true to use an enhanced model for speech recognition.
- * If `use_enhanced` is set to true and the `model` field is not set, then
- * an appropriate enhanced model is chosen if an enhanced model exists for
- * the audio.
- * If `use_enhanced` is true and an enhanced version of the specified model
- * does not exist, then the speech is recognized using the standard version
- * of the specified model.
- *
- * Generated from protobuf field bool use_enhanced = 14;
- * @param bool $var
- * @return $this
- */
- public function setUseEnhanced($var)
- {
- GPBUtil::checkBool($var);
- $this->use_enhanced = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionConfig/AudioEncoding.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionConfig/AudioEncoding.php
deleted file mode 100644
index 7ec3471ecc76..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionConfig/AudioEncoding.php
+++ /dev/null
@@ -1,157 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding
- */
-class AudioEncoding
-{
- /**
- * Not specified.
- *
- * Generated from protobuf enum ENCODING_UNSPECIFIED = 0;
- */
- const ENCODING_UNSPECIFIED = 0;
- /**
- * Uncompressed 16-bit signed little-endian samples (Linear PCM).
- *
- * Generated from protobuf enum LINEAR16 = 1;
- */
- const LINEAR16 = 1;
- /**
- * `FLAC` (Free Lossless Audio
- * Codec) is the recommended encoding because it is
- * lossless--therefore recognition is not compromised--and
- * requires only about half the bandwidth of `LINEAR16`. `FLAC` stream
- * encoding supports 16-bit and 24-bit samples, however, not all fields in
- * `STREAMINFO` are supported.
- *
- * Generated from protobuf enum FLAC = 2;
- */
- const FLAC = 2;
- /**
- * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
- *
- * Generated from protobuf enum MULAW = 3;
- */
- const MULAW = 3;
- /**
- * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
- *
- * Generated from protobuf enum AMR = 4;
- */
- const AMR = 4;
- /**
- * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
- *
- * Generated from protobuf enum AMR_WB = 5;
- */
- const AMR_WB = 5;
- /**
- * Opus encoded audio frames in Ogg container
- * ([OggOpus](https://wiki.xiph.org/OggOpus)).
- * `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.
- *
- * Generated from protobuf enum OGG_OPUS = 6;
- */
- const OGG_OPUS = 6;
- /**
- * Although the use of lossy encodings is not recommended, if a very low
- * bitrate encoding is required, `OGG_OPUS` is highly preferred over
- * Speex encoding. The [Speex](https://speex.org/) encoding supported by
- * Cloud Speech API has a header byte in each block, as in MIME type
- * `audio/x-speex-with-header-byte`.
- * It is a variant of the RTP Speex encoding defined in
- * [RFC 5574](https://tools.ietf.org/html/rfc5574).
- * The stream is a sequence of blocks, one block per RTP packet. Each block
- * starts with a byte containing the length of the block, in bytes, followed
- * by one or more frames of Speex data, padded to an integral number of
- * bytes (octets) as specified in RFC 5574. In other words, each RTP header
- * is replaced with a single byte containing the block length. Only Speex
- * wideband is supported. `sample_rate_hertz` must be 16000.
- *
- * Generated from protobuf enum SPEEX_WITH_HEADER_BYTE = 7;
- */
- const SPEEX_WITH_HEADER_BYTE = 7;
- /**
- * MP3 audio. MP3 encoding is a Beta feature and only available in
- * v1p1beta1. Support all standard MP3 bitrates (which range from 32-320
- * kbps). When using this encoding, `sample_rate_hertz` has to match the
- * sample rate of the file being used.
- *
- * Generated from protobuf enum MP3 = 8;
- */
- const MP3 = 8;
- /**
- * Opus encoded audio frames in WebM container
- * ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be
- * one of 8000, 12000, 16000, 24000, or 48000.
- *
- * Generated from protobuf enum WEBM_OPUS = 9;
- */
- const WEBM_OPUS = 9;
-
- private static $valueToName = [
- self::ENCODING_UNSPECIFIED => 'ENCODING_UNSPECIFIED',
- self::LINEAR16 => 'LINEAR16',
- self::FLAC => 'FLAC',
- self::MULAW => 'MULAW',
- self::AMR => 'AMR',
- self::AMR_WB => 'AMR_WB',
- self::OGG_OPUS => 'OGG_OPUS',
- self::SPEEX_WITH_HEADER_BYTE => 'SPEEX_WITH_HEADER_BYTE',
- self::MP3 => 'MP3',
- self::WEBM_OPUS => 'WEBM_OPUS',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AudioEncoding::class, \Google\Cloud\Speech\V1p1beta1\RecognitionConfig_AudioEncoding::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata.php
deleted file mode 100644
index c0acacea63b4..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata.php
+++ /dev/null
@@ -1,385 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionMetadata
- */
-class RecognitionMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * The use case most closely describing the audio content to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType interaction_type = 1;
- */
- protected $interaction_type = 0;
- /**
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- *
- * Generated from protobuf field uint32 industry_naics_code_of_audio = 3;
- */
- protected $industry_naics_code_of_audio = 0;
- /**
- * The audio type that most closely describes the audio being recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;
- */
- protected $microphone_distance = 0;
- /**
- * The original media the speech was recorded on.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType original_media_type = 5;
- */
- protected $original_media_type = 0;
- /**
- * The type of device the speech was recorded with.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;
- */
- protected $recording_device_type = 0;
- /**
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- *
- * Generated from protobuf field string recording_device_name = 7;
- */
- protected $recording_device_name = '';
- /**
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- *
- * Generated from protobuf field string original_mime_type = 8;
- */
- protected $original_mime_type = '';
- /**
- * Obfuscated (privacy-protected) ID of the user, to identify number of
- * unique users using the service.
- *
- * Generated from protobuf field int64 obfuscated_id = 9 [deprecated = true];
- * @deprecated
- */
- protected $obfuscated_id = 0;
- /**
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- *
- * Generated from protobuf field string audio_topic = 10;
- */
- protected $audio_topic = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $interaction_type
- * The use case most closely describing the audio content to be recognized.
- * @type int $industry_naics_code_of_audio
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- * @type int $microphone_distance
- * The audio type that most closely describes the audio being recognized.
- * @type int $original_media_type
- * The original media the speech was recorded on.
- * @type int $recording_device_type
- * The type of device the speech was recorded with.
- * @type string $recording_device_name
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- * @type string $original_mime_type
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- * @type int|string $obfuscated_id
- * Obfuscated (privacy-protected) ID of the user, to identify number of
- * unique users using the service.
- * @type string $audio_topic
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The use case most closely describing the audio content to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType interaction_type = 1;
- * @return int
- */
- public function getInteractionType()
- {
- return $this->interaction_type;
- }
-
- /**
- * The use case most closely describing the audio content to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType interaction_type = 1;
- * @param int $var
- * @return $this
- */
- public function setInteractionType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata\InteractionType::class);
- $this->interaction_type = $var;
-
- return $this;
- }
-
- /**
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- *
- * Generated from protobuf field uint32 industry_naics_code_of_audio = 3;
- * @return int
- */
- public function getIndustryNaicsCodeOfAudio()
- {
- return $this->industry_naics_code_of_audio;
- }
-
- /**
- * The industry vertical to which this speech recognition request most
- * closely applies. This is most indicative of the topics contained
- * in the audio. Use the 6-digit NAICS code to identify the industry
- * vertical - see https://www.naics.com/search/.
- *
- * Generated from protobuf field uint32 industry_naics_code_of_audio = 3;
- * @param int $var
- * @return $this
- */
- public function setIndustryNaicsCodeOfAudio($var)
- {
- GPBUtil::checkUint32($var);
- $this->industry_naics_code_of_audio = $var;
-
- return $this;
- }
-
- /**
- * The audio type that most closely describes the audio being recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;
- * @return int
- */
- public function getMicrophoneDistance()
- {
- return $this->microphone_distance;
- }
-
- /**
- * The audio type that most closely describes the audio being recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance microphone_distance = 4;
- * @param int $var
- * @return $this
- */
- public function setMicrophoneDistance($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata\MicrophoneDistance::class);
- $this->microphone_distance = $var;
-
- return $this;
- }
-
- /**
- * The original media the speech was recorded on.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType original_media_type = 5;
- * @return int
- */
- public function getOriginalMediaType()
- {
- return $this->original_media_type;
- }
-
- /**
- * The original media the speech was recorded on.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType original_media_type = 5;
- * @param int $var
- * @return $this
- */
- public function setOriginalMediaType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata\OriginalMediaType::class);
- $this->original_media_type = $var;
-
- return $this;
- }
-
- /**
- * The type of device the speech was recorded with.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;
- * @return int
- */
- public function getRecordingDeviceType()
- {
- return $this->recording_device_type;
- }
-
- /**
- * The type of device the speech was recorded with.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType recording_device_type = 6;
- * @param int $var
- * @return $this
- */
- public function setRecordingDeviceType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata\RecordingDeviceType::class);
- $this->recording_device_type = $var;
-
- return $this;
- }
-
- /**
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- *
- * Generated from protobuf field string recording_device_name = 7;
- * @return string
- */
- public function getRecordingDeviceName()
- {
- return $this->recording_device_name;
- }
-
- /**
- * The device used to make the recording. Examples 'Nexus 5X' or
- * 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or
- * 'Cardioid Microphone'.
- *
- * Generated from protobuf field string recording_device_name = 7;
- * @param string $var
- * @return $this
- */
- public function setRecordingDeviceName($var)
- {
- GPBUtil::checkString($var, True);
- $this->recording_device_name = $var;
-
- return $this;
- }
-
- /**
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- *
- * Generated from protobuf field string original_mime_type = 8;
- * @return string
- */
- public function getOriginalMimeType()
- {
- return $this->original_mime_type;
- }
-
- /**
- * Mime type of the original audio file. For example `audio/m4a`,
- * `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`.
- * A list of possible audio mime types is maintained at
- * http://www.iana.org/assignments/media-types/media-types.xhtml#audio
- *
- * Generated from protobuf field string original_mime_type = 8;
- * @param string $var
- * @return $this
- */
- public function setOriginalMimeType($var)
- {
- GPBUtil::checkString($var, True);
- $this->original_mime_type = $var;
-
- return $this;
- }
-
- /**
- * Obfuscated (privacy-protected) ID of the user, to identify number of
- * unique users using the service.
- *
- * Generated from protobuf field int64 obfuscated_id = 9 [deprecated = true];
- * @return int|string
- * @deprecated
- */
- public function getObfuscatedId()
- {
- @trigger_error('obfuscated_id is deprecated.', E_USER_DEPRECATED);
- return $this->obfuscated_id;
- }
-
- /**
- * Obfuscated (privacy-protected) ID of the user, to identify number of
- * unique users using the service.
- *
- * Generated from protobuf field int64 obfuscated_id = 9 [deprecated = true];
- * @param int|string $var
- * @return $this
- * @deprecated
- */
- public function setObfuscatedId($var)
- {
- @trigger_error('obfuscated_id is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkInt64($var);
- $this->obfuscated_id = $var;
-
- return $this;
- }
-
- /**
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- *
- * Generated from protobuf field string audio_topic = 10;
- * @return string
- */
- public function getAudioTopic()
- {
- return $this->audio_topic;
- }
-
- /**
- * Description of the content. Eg. "Recordings of federal supreme court
- * hearings from 2012".
- *
- * Generated from protobuf field string audio_topic = 10;
- * @param string $var
- * @return $this
- */
- public function setAudioTopic($var)
- {
- GPBUtil::checkString($var, True);
- $this->audio_topic = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/InteractionType.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/InteractionType.php
deleted file mode 100644
index ff262b5c532f..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/InteractionType.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionMetadata.InteractionType
- */
-class InteractionType
-{
- /**
- * Use case is either unknown or is something other than one of the other
- * values below.
- *
- * Generated from protobuf enum INTERACTION_TYPE_UNSPECIFIED = 0;
- */
- const INTERACTION_TYPE_UNSPECIFIED = 0;
- /**
- * Multiple people in a conversation or discussion. For example in a
- * meeting with two or more people actively participating. Typically
- * all the primary people speaking would be in the same room (if not,
- * see PHONE_CALL)
- *
- * Generated from protobuf enum DISCUSSION = 1;
- */
- const DISCUSSION = 1;
- /**
- * One or more persons lecturing or presenting to others, mostly
- * uninterrupted.
- *
- * Generated from protobuf enum PRESENTATION = 2;
- */
- const PRESENTATION = 2;
- /**
- * A phone-call or video-conference in which two or more people, who are
- * not in the same room, are actively participating.
- *
- * Generated from protobuf enum PHONE_CALL = 3;
- */
- const PHONE_CALL = 3;
- /**
- * A recorded message intended for another person to listen to.
- *
- * Generated from protobuf enum VOICEMAIL = 4;
- */
- const VOICEMAIL = 4;
- /**
- * Professionally produced audio (eg. TV Show, Podcast).
- *
- * Generated from protobuf enum PROFESSIONALLY_PRODUCED = 5;
- */
- const PROFESSIONALLY_PRODUCED = 5;
- /**
- * Transcribe spoken questions and queries into text.
- *
- * Generated from protobuf enum VOICE_SEARCH = 6;
- */
- const VOICE_SEARCH = 6;
- /**
- * Transcribe voice commands, such as for controlling a device.
- *
- * Generated from protobuf enum VOICE_COMMAND = 7;
- */
- const VOICE_COMMAND = 7;
- /**
- * Transcribe speech to text to create a written document, such as a
- * text-message, email or report.
- *
- * Generated from protobuf enum DICTATION = 8;
- */
- const DICTATION = 8;
-
- private static $valueToName = [
- self::INTERACTION_TYPE_UNSPECIFIED => 'INTERACTION_TYPE_UNSPECIFIED',
- self::DISCUSSION => 'DISCUSSION',
- self::PRESENTATION => 'PRESENTATION',
- self::PHONE_CALL => 'PHONE_CALL',
- self::VOICEMAIL => 'VOICEMAIL',
- self::PROFESSIONALLY_PRODUCED => 'PROFESSIONALLY_PRODUCED',
- self::VOICE_SEARCH => 'VOICE_SEARCH',
- self::VOICE_COMMAND => 'VOICE_COMMAND',
- self::DICTATION => 'DICTATION',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(InteractionType::class, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_InteractionType::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/MicrophoneDistance.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/MicrophoneDistance.php
deleted file mode 100644
index f3ce2d212868..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/MicrophoneDistance.php
+++ /dev/null
@@ -1,73 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionMetadata.MicrophoneDistance
- */
-class MicrophoneDistance
-{
- /**
- * Audio type is not known.
- *
- * Generated from protobuf enum MICROPHONE_DISTANCE_UNSPECIFIED = 0;
- */
- const MICROPHONE_DISTANCE_UNSPECIFIED = 0;
- /**
- * The audio was captured from a closely placed microphone. Eg. phone,
- * dictaphone, or handheld microphone. Generally if there speaker is within
- * 1 meter of the microphone.
- *
- * Generated from protobuf enum NEARFIELD = 1;
- */
- const NEARFIELD = 1;
- /**
- * The speaker if within 3 meters of the microphone.
- *
- * Generated from protobuf enum MIDFIELD = 2;
- */
- const MIDFIELD = 2;
- /**
- * The speaker is more than 3 meters away from the microphone.
- *
- * Generated from protobuf enum FARFIELD = 3;
- */
- const FARFIELD = 3;
-
- private static $valueToName = [
- self::MICROPHONE_DISTANCE_UNSPECIFIED => 'MICROPHONE_DISTANCE_UNSPECIFIED',
- self::NEARFIELD => 'NEARFIELD',
- self::MIDFIELD => 'MIDFIELD',
- self::FARFIELD => 'FARFIELD',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(MicrophoneDistance::class, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_MicrophoneDistance::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/OriginalMediaType.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/OriginalMediaType.php
deleted file mode 100644
index ceb7cd616495..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/OriginalMediaType.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionMetadata.OriginalMediaType
- */
-class OriginalMediaType
-{
- /**
- * Unknown original media type.
- *
- * Generated from protobuf enum ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0;
- */
- const ORIGINAL_MEDIA_TYPE_UNSPECIFIED = 0;
- /**
- * The speech data is an audio recording.
- *
- * Generated from protobuf enum AUDIO = 1;
- */
- const AUDIO = 1;
- /**
- * The speech data originally recorded on a video.
- *
- * Generated from protobuf enum VIDEO = 2;
- */
- const VIDEO = 2;
-
- private static $valueToName = [
- self::ORIGINAL_MEDIA_TYPE_UNSPECIFIED => 'ORIGINAL_MEDIA_TYPE_UNSPECIFIED',
- self::AUDIO => 'AUDIO',
- self::VIDEO => 'VIDEO',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(OriginalMediaType::class, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_OriginalMediaType::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/RecordingDeviceType.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/RecordingDeviceType.php
deleted file mode 100644
index 879bfebd723e..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognitionMetadata/RecordingDeviceType.php
+++ /dev/null
@@ -1,92 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognitionMetadata.RecordingDeviceType
- */
-class RecordingDeviceType
-{
- /**
- * The recording device is unknown.
- *
- * Generated from protobuf enum RECORDING_DEVICE_TYPE_UNSPECIFIED = 0;
- */
- const RECORDING_DEVICE_TYPE_UNSPECIFIED = 0;
- /**
- * Speech was recorded on a smartphone.
- *
- * Generated from protobuf enum SMARTPHONE = 1;
- */
- const SMARTPHONE = 1;
- /**
- * Speech was recorded using a personal computer or tablet.
- *
- * Generated from protobuf enum PC = 2;
- */
- const PC = 2;
- /**
- * Speech was recorded over a phone line.
- *
- * Generated from protobuf enum PHONE_LINE = 3;
- */
- const PHONE_LINE = 3;
- /**
- * Speech was recorded in a vehicle.
- *
- * Generated from protobuf enum VEHICLE = 4;
- */
- const VEHICLE = 4;
- /**
- * Speech was recorded outdoors.
- *
- * Generated from protobuf enum OTHER_OUTDOOR_DEVICE = 5;
- */
- const OTHER_OUTDOOR_DEVICE = 5;
- /**
- * Speech was recorded indoors.
- *
- * Generated from protobuf enum OTHER_INDOOR_DEVICE = 6;
- */
- const OTHER_INDOOR_DEVICE = 6;
-
- private static $valueToName = [
- self::RECORDING_DEVICE_TYPE_UNSPECIFIED => 'RECORDING_DEVICE_TYPE_UNSPECIFIED',
- self::SMARTPHONE => 'SMARTPHONE',
- self::PC => 'PC',
- self::PHONE_LINE => 'PHONE_LINE',
- self::VEHICLE => 'VEHICLE',
- self::OTHER_OUTDOOR_DEVICE => 'OTHER_OUTDOOR_DEVICE',
- self::OTHER_INDOOR_DEVICE => 'OTHER_INDOOR_DEVICE',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(RecordingDeviceType::class, \Google\Cloud\Speech\V1p1beta1\RecognitionMetadata_RecordingDeviceType::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognizeRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognizeRequest.php
deleted file mode 100644
index 141677225997..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognizeRequest.php
+++ /dev/null
@@ -1,125 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognizeRequest
- */
-class RecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $audio = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1p1beta1\RecognitionConfig $config
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @type \Google\Cloud\Speech\V1p1beta1\RecognitionAudio $audio
- * Required. The audio data to be recognized.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\RecognitionAudio|null
- */
- public function getAudio()
- {
- return $this->audio;
- }
-
- public function hasAudio()
- {
- return isset($this->audio);
- }
-
- public function clearAudio()
- {
- unset($this->audio);
- }
-
- /**
- * Required. The audio data to be recognized.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionAudio audio = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\RecognitionAudio $var
- * @return $this
- */
- public function setAudio($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\RecognitionAudio::class);
- $this->audio = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognizeResponse.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognizeResponse.php
deleted file mode 100644
index e52169340083..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/RecognizeResponse.php
+++ /dev/null
@@ -1,199 +0,0 @@
-google.cloud.speech.v1p1beta1.RecognizeResponse
- */
-class RecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;
- */
- private $results;
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- */
- protected $total_billed_time = null;
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;
- */
- protected $speech_adaptation_info = null;
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 8;
- */
- protected $request_id = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- * @type \Google\Protobuf\Duration $total_billed_time
- * When available, billed audio seconds for the corresponding request.
- * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $speech_adaptation_info
- * Provides information on adaptation behavior in response
- * @type int|string $request_id
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Sequential list of transcription results corresponding to
- * sequential portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionResult results = 2;
- * @param array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\SpeechRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledTime()
- {
- return $this->total_billed_time;
- }
-
- public function hasTotalBilledTime()
- {
- return isset($this->total_billed_time);
- }
-
- public function clearTotalBilledTime()
- {
- unset($this->total_billed_time);
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 3;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_time = $var;
-
- return $this;
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;
- * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo|null
- */
- public function getSpeechAdaptationInfo()
- {
- return $this->speech_adaptation_info;
- }
-
- public function hasSpeechAdaptationInfo()
- {
- return isset($this->speech_adaptation_info);
- }
-
- public function clearSpeechAdaptationInfo()
- {
- unset($this->speech_adaptation_info);
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 7;
- * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $var
- * @return $this
- */
- public function setSpeechAdaptationInfo($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo::class);
- $this->speech_adaptation_info = $var;
-
- return $this;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 8;
- * @return int|string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 8;
- * @param int|string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkInt64($var);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeakerDiarizationConfig.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeakerDiarizationConfig.php
deleted file mode 100644
index 903b11ca5252..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeakerDiarizationConfig.php
+++ /dev/null
@@ -1,198 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeakerDiarizationConfig
- */
-class SpeakerDiarizationConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 1;
- */
- protected $enable_speaker_diarization = false;
- /**
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- *
- * Generated from protobuf field int32 min_speaker_count = 2;
- */
- protected $min_speaker_count = 0;
- /**
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- *
- * Generated from protobuf field int32 max_speaker_count = 3;
- */
- protected $max_speaker_count = 0;
- /**
- * Output only. Unused.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @deprecated
- */
- protected $speaker_tag = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $enable_speaker_diarization
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- * @type int $min_speaker_count
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- * @type int $max_speaker_count
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- * @type int $speaker_tag
- * Output only. Unused.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 1;
- * @return bool
- */
- public function getEnableSpeakerDiarization()
- {
- return $this->enable_speaker_diarization;
- }
-
- /**
- * If 'true', enables speaker detection for each recognized word in
- * the top alternative of the recognition result using a speaker_tag provided
- * in the WordInfo.
- *
- * Generated from protobuf field bool enable_speaker_diarization = 1;
- * @param bool $var
- * @return $this
- */
- public function setEnableSpeakerDiarization($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_speaker_diarization = $var;
-
- return $this;
- }
-
- /**
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- *
- * Generated from protobuf field int32 min_speaker_count = 2;
- * @return int
- */
- public function getMinSpeakerCount()
- {
- return $this->min_speaker_count;
- }
-
- /**
- * Minimum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 2.
- *
- * Generated from protobuf field int32 min_speaker_count = 2;
- * @param int $var
- * @return $this
- */
- public function setMinSpeakerCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->min_speaker_count = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- *
- * Generated from protobuf field int32 max_speaker_count = 3;
- * @return int
- */
- public function getMaxSpeakerCount()
- {
- return $this->max_speaker_count;
- }
-
- /**
- * Maximum number of speakers in the conversation. This range gives you more
- * flexibility by allowing the system to automatically determine the correct
- * number of speakers. If not set, the default value is 6.
- *
- * Generated from protobuf field int32 max_speaker_count = 3;
- * @param int $var
- * @return $this
- */
- public function setMaxSpeakerCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_speaker_count = $var;
-
- return $this;
- }
-
- /**
- * Output only. Unused.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- * @deprecated
- */
- public function getSpeakerTag()
- {
- @trigger_error('speaker_tag is deprecated.', E_USER_DEPRECATED);
- return $this->speaker_tag;
- }
-
- /**
- * Output only. Unused.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- * @deprecated
- */
- public function setSpeakerTag($var)
- {
- @trigger_error('speaker_tag is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkInt32($var);
- $this->speaker_tag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptation.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptation.php
deleted file mode 100644
index 46e3146f5cb0..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptation.php
+++ /dev/null
@@ -1,207 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeechAdaptation
- */
-class SpeechAdaptation extends \Google\Protobuf\Internal\Message
-{
- /**
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;
- */
- private $phrase_sets;
- /**
- * A collection of phrase set resource names to use.
- *
- * Generated from protobuf field repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {
- */
- private $phrase_set_references;
- /**
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 3;
- */
- private $custom_classes;
- /**
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;
- */
- protected $abnf_grammar = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- * @type array|\Google\Protobuf\Internal\RepeatedField $phrase_set_references
- * A collection of phrase set resource names to use.
- * @type array<\Google\Cloud\Speech\V1p1beta1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar $abnf_grammar
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSets()
- {
- return $this->phrase_sets;
- }
-
- /**
- * A collection of phrase sets. To specify the hints inline, leave the
- * phrase set's `name` blank and fill in the rest of its fields. Any
- * phrase set can use any custom class.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.PhraseSet phrase_sets = 1;
- * @param array<\Google\Cloud\Speech\V1p1beta1\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSets($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\PhraseSet::class);
- $this->phrase_sets = $arr;
-
- return $this;
- }
-
- /**
- * A collection of phrase set resource names to use.
- *
- * Generated from protobuf field repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSetReferences()
- {
- return $this->phrase_set_references;
- }
-
- /**
- * A collection of phrase set resource names to use.
- *
- * Generated from protobuf field repeated string phrase_set_references = 2 [(.google.api.resource_reference) = {
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSetReferences($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->phrase_set_references = $arr;
-
- return $this;
- }
-
- /**
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getCustomClasses()
- {
- return $this->custom_classes;
- }
-
- /**
- * A collection of custom classes. To specify the classes inline, leave the
- * class' `name` blank and fill in the rest of its fields, giving it a unique
- * `custom_class_id`. Refer to the inline defined class in phrase hints by its
- * `custom_class_id`.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.CustomClass custom_classes = 3;
- * @param array<\Google\Cloud\Speech\V1p1beta1\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setCustomClasses($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\CustomClass::class);
- $this->custom_classes = $arr;
-
- return $this;
- }
-
- /**
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;
- * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar|null
- */
- public function getAbnfGrammar()
- {
- return $this->abnf_grammar;
- }
-
- public function hasAbnfGrammar()
- {
- return isset($this->abnf_grammar);
- }
-
- public function clearAbnfGrammar()
- {
- unset($this->abnf_grammar);
- }
-
- /**
- * Augmented Backus-Naur form (ABNF) is a standardized grammar notation
- * comprised by a set of derivation rules.
- * See specifications: https://www.w3.org/TR/speech-grammar
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar abnf_grammar = 4;
- * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar $var
- * @return $this
- */
- public function setAbnfGrammar($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation\ABNFGrammar::class);
- $this->abnf_grammar = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptation/ABNFGrammar.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptation/ABNFGrammar.php
deleted file mode 100644
index 89a2f3c42bc4..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptation/ABNFGrammar.php
+++ /dev/null
@@ -1,72 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeechAdaptation.ABNFGrammar
- */
-class ABNFGrammar extends \Google\Protobuf\Internal\Message
-{
- /**
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- *
- * Generated from protobuf field repeated string abnf_strings = 1;
- */
- private $abnf_strings;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $abnf_strings
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- *
- * Generated from protobuf field repeated string abnf_strings = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAbnfStrings()
- {
- return $this->abnf_strings;
- }
-
- /**
- * All declarations and rules of an ABNF grammar broken up into multiple
- * strings that will end up concatenated.
- *
- * Generated from protobuf field repeated string abnf_strings = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAbnfStrings($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->abnf_strings = $arr;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ABNFGrammar::class, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptation_ABNFGrammar::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptationInfo.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptationInfo.php
deleted file mode 100644
index 6cdfbaf77ee6..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechAdaptationInfo.php
+++ /dev/null
@@ -1,109 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeechAdaptationInfo
- */
-class SpeechAdaptationInfo extends \Google\Protobuf\Internal\Message
-{
- /**
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- *
- * Generated from protobuf field bool adaptation_timeout = 1;
- */
- protected $adaptation_timeout = false;
- /**
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- *
- * Generated from protobuf field string timeout_message = 4;
- */
- protected $timeout_message = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $adaptation_timeout
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- * @type string $timeout_message
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- *
- * Generated from protobuf field bool adaptation_timeout = 1;
- * @return bool
- */
- public function getAdaptationTimeout()
- {
- return $this->adaptation_timeout;
- }
-
- /**
- * Whether there was a timeout when applying speech adaptation. If true,
- * adaptation had no effect in the response transcript.
- *
- * Generated from protobuf field bool adaptation_timeout = 1;
- * @param bool $var
- * @return $this
- */
- public function setAdaptationTimeout($var)
- {
- GPBUtil::checkBool($var);
- $this->adaptation_timeout = $var;
-
- return $this;
- }
-
- /**
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- *
- * Generated from protobuf field string timeout_message = 4;
- * @return string
- */
- public function getTimeoutMessage()
- {
- return $this->timeout_message;
- }
-
- /**
- * If set, returns a message specifying which part of the speech adaptation
- * request timed out.
- *
- * Generated from protobuf field string timeout_message = 4;
- * @param string $var
- * @return $this
- */
- public function setTimeoutMessage($var)
- {
- GPBUtil::checkString($var, True);
- $this->timeout_message = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechContext.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechContext.php
deleted file mode 100644
index 677449113890..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechContext.php
+++ /dev/null
@@ -1,170 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeechContext
- */
-class SpeechContext extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- *
- * Generated from protobuf field repeated string phrases = 1;
- */
- private $phrases;
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- *
- * Generated from protobuf field float boost = 4;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\RepeatedField $phrases
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- * @type float $boost
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- *
- * Generated from protobuf field repeated string phrases = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhrases()
- {
- return $this->phrases;
- }
-
- /**
- * A list of strings containing words and phrases "hints" so that
- * the speech recognition is more likely to recognize them. This can be used
- * to improve the accuracy for specific words and phrases, for example, if
- * specific commands are typically spoken by the user. This can also be used
- * to add additional words to the vocabulary of the recognizer. See
- * [usage limits](https://cloud.google.com/speech-to-text/quotas#content).
- * List items can also be set to classes for groups of words that represent
- * common concepts that occur in natural language. For example, rather than
- * providing phrase hints for every month of the year, using the $MONTH class
- * improves the likelihood of correctly transcribing audio that includes
- * months.
- *
- * Generated from protobuf field repeated string phrases = 1;
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhrases($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->phrases = $arr;
-
- return $this;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- *
- * Generated from protobuf field float boost = 4;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Negative boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost will simply be ignored. Though `boost` can
- * accept a wide range of positive values, most use cases are best served with
- * values between 0 and 20. We recommend using a binary search approach to
- * finding the optimal value for your use case.
- *
- * Generated from protobuf field float boost = 4;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechRecognitionAlternative.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechRecognitionAlternative.php
deleted file mode 100644
index 6f05d0abe5f2..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechRecognitionAlternative.php
+++ /dev/null
@@ -1,179 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative
- */
-class SpeechRecognitionAlternative extends \Google\Protobuf\Internal\Message
-{
- /**
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- *
- * Generated from protobuf field string transcript = 1;
- */
- protected $transcript = '';
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- */
- protected $confidence = 0.0;
- /**
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;
- */
- private $words;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $transcript
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- * @type float $confidence
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- * @type array<\Google\Cloud\Speech\V1p1beta1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- *
- * Generated from protobuf field string transcript = 1;
- * @return string
- */
- public function getTranscript()
- {
- return $this->transcript;
- }
-
- /**
- * Transcript text representing the words that the user spoke.
- * In languages that use spaces to separate words, the transcript might have a
- * leading space if it isn't the first result. You can concatenate each result
- * to obtain the full transcript without using a separator.
- *
- * Generated from protobuf field string transcript = 1;
- * @param string $var
- * @return $this
- */
- public function setTranscript($var)
- {
- GPBUtil::checkString($var, True);
- $this->transcript = $var;
-
- return $this;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- * @return float
- */
- public function getConfidence()
- {
- return $this->confidence;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- * @param float $var
- * @return $this
- */
- public function setConfidence($var)
- {
- GPBUtil::checkFloat($var);
- $this->confidence = $var;
-
- return $this;
- }
-
- /**
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getWords()
- {
- return $this->words;
- }
-
- /**
- * A list of word-specific information for each recognized word.
- * Note: When `enable_speaker_diarization` is true, you will see all the words
- * from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.WordInfo words = 3;
- * @param array<\Google\Cloud\Speech\V1p1beta1\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setWords($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\WordInfo::class);
- $this->words = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechRecognitionResult.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechRecognitionResult.php
deleted file mode 100644
index 882a3ad90738..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/SpeechRecognitionResult.php
+++ /dev/null
@@ -1,211 +0,0 @@
-google.cloud.speech.v1p1beta1.SpeechRecognitionResult
- */
-class SpeechRecognitionResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
- */
- private $alternatives;
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- */
- protected $channel_tag = 0;
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- */
- protected $result_end_time = null;
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $language_code = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- * @type int $channel_tag
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- * @type \Google\Protobuf\Duration $result_end_time
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- * @type string $language_code
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
- * @param array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternatives($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\SpeechRecognitionAlternative::class);
- $this->alternatives = $arr;
-
- return $this;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- * @return int
- */
- public function getChannelTag()
- {
- return $this->channel_tag;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- * @param int $var
- * @return $this
- */
- public function setChannelTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->channel_tag = $var;
-
- return $this;
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @return \Google\Protobuf\Duration|null
- */
- public function getResultEndTime()
- {
- return $this->result_end_time;
- }
-
- public function hasResultEndTime()
- {
- return isset($this->result_end_time);
- }
-
- public function clearResultEndTime()
- {
- unset($this->result_end_time);
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setResultEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->result_end_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionConfig.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionConfig.php
deleted file mode 100644
index 82a7717a23cc..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionConfig.php
+++ /dev/null
@@ -1,320 +0,0 @@
-google.cloud.speech.v1p1beta1.StreamingRecognitionConfig
- */
-class StreamingRecognitionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- *
- * Generated from protobuf field bool single_utterance = 2;
- */
- protected $single_utterance = false;
- /**
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- *
- * Generated from protobuf field bool interim_results = 3;
- */
- protected $interim_results = false;
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 5;
- */
- protected $enable_voice_activity_events = false;
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout voice_activity_timeout = 6;
- */
- protected $voice_activity_timeout = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1p1beta1\RecognitionConfig $config
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @type bool $single_utterance
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- * @type bool $interim_results
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- * @type bool $enable_voice_activity_events
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- * @type \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig\VoiceActivityTimeout $voice_activity_timeout
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Provides information to the recognizer that specifies how to
- * process the request.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- *
- * Generated from protobuf field bool single_utterance = 2;
- * @return bool
- */
- public function getSingleUtterance()
- {
- return $this->single_utterance;
- }
-
- /**
- * If `false` or omitted, the recognizer will perform continuous
- * recognition (continuing to wait for and process audio even if the user
- * pauses speaking) until the client closes the input stream (gRPC API) or
- * until the maximum time limit has been reached. May return multiple
- * `StreamingRecognitionResult`s with the `is_final` flag set to `true`.
- * If `true`, the recognizer will detect a single spoken utterance. When it
- * detects that the user has paused or stopped speaking, it will return an
- * `END_OF_SINGLE_UTTERANCE` event and cease recognition. It will return no
- * more than one `StreamingRecognitionResult` with the `is_final` flag set to
- * `true`.
- * The `single_utterance` field can only be used with specified models,
- * otherwise an error is thrown. The `model` field in [`RecognitionConfig`][]
- * must be set to:
- * * `command_and_search`
- * * `phone_call` AND additional field `useEnhanced`=`true`
- * * The `model` field is left undefined. In this case the API auto-selects
- * a model based on any other parameters that you set in
- * `RecognitionConfig`.
- *
- * Generated from protobuf field bool single_utterance = 2;
- * @param bool $var
- * @return $this
- */
- public function setSingleUtterance($var)
- {
- GPBUtil::checkBool($var);
- $this->single_utterance = $var;
-
- return $this;
- }
-
- /**
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- *
- * Generated from protobuf field bool interim_results = 3;
- * @return bool
- */
- public function getInterimResults()
- {
- return $this->interim_results;
- }
-
- /**
- * If `true`, interim results (tentative hypotheses) may be
- * returned as they become available (these interim results are indicated with
- * the `is_final=false` flag).
- * If `false` or omitted, only `is_final=true` result(s) are returned.
- *
- * Generated from protobuf field bool interim_results = 3;
- * @param bool $var
- * @return $this
- */
- public function setInterimResults($var)
- {
- GPBUtil::checkBool($var);
- $this->interim_results = $var;
-
- return $this;
- }
-
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 5;
- * @return bool
- */
- public function getEnableVoiceActivityEvents()
- {
- return $this->enable_voice_activity_events;
- }
-
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 5;
- * @param bool $var
- * @return $this
- */
- public function setEnableVoiceActivityEvents($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_voice_activity_events = $var;
-
- return $this;
- }
-
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout voice_activity_timeout = 6;
- * @return \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig\VoiceActivityTimeout|null
- */
- public function getVoiceActivityTimeout()
- {
- return $this->voice_activity_timeout;
- }
-
- public function hasVoiceActivityTimeout()
- {
- return isset($this->voice_activity_timeout);
- }
-
- public function clearVoiceActivityTimeout()
- {
- unset($this->voice_activity_timeout);
- }
-
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout voice_activity_timeout = 6;
- * @param \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig\VoiceActivityTimeout $var
- * @return $this
- */
- public function setVoiceActivityTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig\VoiceActivityTimeout::class);
- $this->voice_activity_timeout = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionConfig/VoiceActivityTimeout.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionConfig/VoiceActivityTimeout.php
deleted file mode 100644
index 0bae80ca0948..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionConfig/VoiceActivityTimeout.php
+++ /dev/null
@@ -1,124 +0,0 @@
-google.cloud.speech.v1p1beta1.StreamingRecognitionConfig.VoiceActivityTimeout
- */
-class VoiceActivityTimeout extends \Google\Protobuf\Internal\Message
-{
- /**
- * Duration to timeout the stream if no speech begins.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- */
- protected $speech_start_timeout = null;
- /**
- * Duration to timeout the stream after speech ends.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- */
- protected $speech_end_timeout = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $speech_start_timeout
- * Duration to timeout the stream if no speech begins.
- * @type \Google\Protobuf\Duration $speech_end_timeout
- * Duration to timeout the stream after speech ends.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Duration to timeout the stream if no speech begins.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechStartTimeout()
- {
- return $this->speech_start_timeout;
- }
-
- public function hasSpeechStartTimeout()
- {
- return isset($this->speech_start_timeout);
- }
-
- public function clearSpeechStartTimeout()
- {
- unset($this->speech_start_timeout);
- }
-
- /**
- * Duration to timeout the stream if no speech begins.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechStartTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_start_timeout = $var;
-
- return $this;
- }
-
- /**
- * Duration to timeout the stream after speech ends.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechEndTimeout()
- {
- return $this->speech_end_timeout;
- }
-
- public function hasSpeechEndTimeout()
- {
- return isset($this->speech_end_timeout);
- }
-
- public function clearSpeechEndTimeout()
- {
- unset($this->speech_end_timeout);
- }
-
- /**
- * Duration to timeout the stream after speech ends.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechEndTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_end_timeout = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(VoiceActivityTimeout::class, \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig_VoiceActivityTimeout::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionResult.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionResult.php
deleted file mode 100644
index 1da70eeb60e3..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognitionResult.php
+++ /dev/null
@@ -1,312 +0,0 @@
-google.cloud.speech.v1p1beta1.StreamingRecognitionResult
- */
-class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
- */
- private $alternatives;
- /**
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- */
- protected $is_final = false;
- /**
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- */
- protected $stability = 0.0;
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- */
- protected $result_end_time = null;
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- */
- protected $channel_tag = 0;
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $language_code = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- * @type bool $is_final
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- * @type float $stability
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- * @type \Google\Protobuf\Duration $result_end_time
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- * @type int $channel_tag
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- * @type string $language_code
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-
- /**
- * May contain one or more recognition hypotheses (up to the
- * maximum specified in `max_alternatives`).
- * These alternatives are ordered in terms of accuracy, with the top (first)
- * alternative being the most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative alternatives = 1;
- * @param array<\Google\Cloud\Speech\V1p1beta1\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternatives($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\SpeechRecognitionAlternative::class);
- $this->alternatives = $arr;
-
- return $this;
- }
-
- /**
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- * @return bool
- */
- public function getIsFinal()
- {
- return $this->is_final;
- }
-
- /**
- * If `false`, this `StreamingRecognitionResult` represents an
- * interim result that may change. If `true`, this is the final time the
- * speech service will return this particular `StreamingRecognitionResult`,
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- * @param bool $var
- * @return $this
- */
- public function setIsFinal($var)
- {
- GPBUtil::checkBool($var);
- $this->is_final = $var;
-
- return $this;
- }
-
- /**
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- * @return float
- */
- public function getStability()
- {
- return $this->stability;
- }
-
- /**
- * An estimate of the likelihood that the recognizer will not
- * change its guess about this interim result. Values range from 0.0
- * (completely unstable) to 1.0 (completely stable).
- * This field is only provided for interim results (`is_final=false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- * @param float $var
- * @return $this
- */
- public function setStability($var)
- {
- GPBUtil::checkFloat($var);
- $this->stability = $var;
-
- return $this;
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @return \Google\Protobuf\Duration|null
- */
- public function getResultEndTime()
- {
- return $this->result_end_time;
- }
-
- public function hasResultEndTime()
- {
- return isset($this->result_end_time);
- }
-
- public function clearResultEndTime()
- {
- unset($this->result_end_time);
- }
-
- /**
- * Time offset of the end of this result relative to the
- * beginning of the audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_time = 4;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setResultEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->result_end_time = $var;
-
- return $this;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- * @return int
- */
- public function getChannelTag()
- {
- return $this->channel_tag;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For audio_channel_count = N, its output values can range from '1' to 'N'.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- * @param int $var
- * @return $this
- */
- public function setChannelTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->channel_tag = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeRequest.php
deleted file mode 100644
index 378dc2718fe3..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeRequest.php
+++ /dev/null
@@ -1,139 +0,0 @@
-google.cloud.speech.v1p1beta1.StreamingRecognizeRequest
- */
-class StreamingRecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- protected $streaming_request;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig $streaming_config
- * Provides information to the recognizer that specifies how to process the
- * request. The first `StreamingRecognizeRequest` message must contain a
- * `streaming_config` message.
- * @type string $audio_content
- * The audio data to be recognized. Sequential chunks of audio data are sent
- * in sequential `StreamingRecognizeRequest` messages. The first
- * `StreamingRecognizeRequest` message must not contain `audio_content` data
- * and all subsequent `StreamingRecognizeRequest` messages must contain
- * `audio_content` data. The audio bytes must be encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation (not base64). See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Provides information to the recognizer that specifies how to process the
- * request. The first `StreamingRecognizeRequest` message must contain a
- * `streaming_config` message.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognitionConfig streaming_config = 1;
- * @return \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig|null
- */
- public function getStreamingConfig()
- {
- return $this->readOneof(1);
- }
-
- public function hasStreamingConfig()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Provides information to the recognizer that specifies how to process the
- * request. The first `StreamingRecognizeRequest` message must contain a
- * `streaming_config` message.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognitionConfig streaming_config = 1;
- * @param \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig $var
- * @return $this
- */
- public function setStreamingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionConfig::class);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * The audio data to be recognized. Sequential chunks of audio data are sent
- * in sequential `StreamingRecognizeRequest` messages. The first
- * `StreamingRecognizeRequest` message must not contain `audio_content` data
- * and all subsequent `StreamingRecognizeRequest` messages must contain
- * `audio_content` data. The audio bytes must be encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation (not base64). See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
- *
- * Generated from protobuf field bytes audio_content = 2;
- * @return string
- */
- public function getAudioContent()
- {
- return $this->readOneof(2);
- }
-
- public function hasAudioContent()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * The audio data to be recognized. Sequential chunks of audio data are sent
- * in sequential `StreamingRecognizeRequest` messages. The first
- * `StreamingRecognizeRequest` message must not contain `audio_content` data
- * and all subsequent `StreamingRecognizeRequest` messages must contain
- * `audio_content` data. The audio bytes must be encoded as specified in
- * `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a
- * pure binary representation (not base64). See
- * [content limits](https://cloud.google.com/speech-to-text/quotas#content).
- *
- * Generated from protobuf field bytes audio_content = 2;
- * @param string $var
- * @return $this
- */
- public function setAudioContent($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getStreamingRequest()
- {
- return $this->whichOneof("streaming_request");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeResponse.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeResponse.php
deleted file mode 100644
index ceb254b05d24..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeResponse.php
+++ /dev/null
@@ -1,370 +0,0 @@
-google.cloud.speech.v1p1beta1.StreamingRecognizeResponse
- */
-class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- *
- * Generated from protobuf field .google.rpc.Status error = 1;
- */
- protected $error = null;
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.StreamingRecognitionResult results = 2;
- */
- private $results;
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
- */
- protected $speech_event_type = 0;
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_time = 8;
- */
- protected $speech_event_time = null;
- /**
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5;
- */
- protected $total_billed_time = null;
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 9;
- */
- protected $speech_adaptation_info = null;
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 10;
- */
- protected $request_id = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Rpc\Status $error
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- * @type array<\Google\Cloud\Speech\V1p1beta1\StreamingRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- * @type int $speech_event_type
- * Indicates the type of speech event.
- * @type \Google\Protobuf\Duration $speech_event_time
- * Time offset between the beginning of the audio and event emission.
- * @type \Google\Protobuf\Duration $total_billed_time
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- * @type \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $speech_adaptation_info
- * Provides information on adaptation behavior in response
- * @type int|string $request_id
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- *
- * Generated from protobuf field .google.rpc.Status error = 1;
- * @return \Google\Rpc\Status|null
- */
- public function getError()
- {
- return $this->error;
- }
-
- public function hasError()
- {
- return isset($this->error);
- }
-
- public function clearError()
- {
- unset($this->error);
- }
-
- /**
- * If set, returns a [google.rpc.Status][google.rpc.Status] message that
- * specifies the error for the operation.
- *
- * Generated from protobuf field .google.rpc.Status error = 1;
- * @param \Google\Rpc\Status $var
- * @return $this
- */
- public function setError($var)
- {
- GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
- $this->error = $var;
-
- return $this;
- }
-
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.StreamingRecognitionResult results = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one `is_final=true` result (the newly settled portion),
- * followed by zero or more `is_final=false` results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.StreamingRecognitionResult results = 2;
- * @param array<\Google\Cloud\Speech\V1p1beta1\StreamingRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\StreamingRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
- * @return int
- */
- public function getSpeechEventType()
- {
- return $this->speech_event_type;
- }
-
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
- * @param int $var
- * @return $this
- */
- public function setSpeechEventType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V1p1beta1\StreamingRecognizeResponse\SpeechEventType::class);
- $this->speech_event_type = $var;
-
- return $this;
- }
-
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_time = 8;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechEventTime()
- {
- return $this->speech_event_time;
- }
-
- public function hasSpeechEventTime()
- {
- return isset($this->speech_event_time);
- }
-
- public function clearSpeechEventTime()
- {
- unset($this->speech_event_time);
- }
-
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_time = 8;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechEventTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_event_time = $var;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledTime()
- {
- return $this->total_billed_time;
- }
-
- public function hasTotalBilledTime()
- {
- return isset($this->total_billed_time);
- }
-
- public function clearTotalBilledTime()
- {
- unset($this->total_billed_time);
- }
-
- /**
- * When available, billed audio seconds for the stream.
- * Set only if this is the last response in the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_time = 5;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_time = $var;
-
- return $this;
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 9;
- * @return \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo|null
- */
- public function getSpeechAdaptationInfo()
- {
- return $this->speech_adaptation_info;
- }
-
- public function hasSpeechAdaptationInfo()
- {
- return isset($this->speech_adaptation_info);
- }
-
- public function clearSpeechAdaptationInfo()
- {
- unset($this->speech_adaptation_info);
- }
-
- /**
- * Provides information on adaptation behavior in response
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.SpeechAdaptationInfo speech_adaptation_info = 9;
- * @param \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo $var
- * @return $this
- */
- public function setSpeechAdaptationInfo($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\SpeechAdaptationInfo::class);
- $this->speech_adaptation_info = $var;
-
- return $this;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 10;
- * @return int|string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * The ID associated with the request. This is a unique ID specific only to
- * the given request.
- *
- * Generated from protobuf field int64 request_id = 10;
- * @param int|string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkInt64($var);
- $this->request_id = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeResponse/SpeechEventType.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeResponse/SpeechEventType.php
deleted file mode 100644
index dceeb029f7da..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/StreamingRecognizeResponse/SpeechEventType.php
+++ /dev/null
@@ -1,92 +0,0 @@
-google.cloud.speech.v1p1beta1.StreamingRecognizeResponse.SpeechEventType
- */
-class SpeechEventType
-{
- /**
- * No speech event specified.
- *
- * Generated from protobuf enum SPEECH_EVENT_UNSPECIFIED = 0;
- */
- const SPEECH_EVENT_UNSPECIFIED = 0;
- /**
- * This event indicates that the server has detected the end of the user's
- * speech utterance and expects no additional speech. Therefore, the server
- * will not process additional audio (although it may subsequently return
- * additional results). The client should stop sending additional audio
- * data, half-close the gRPC connection, and wait for any additional results
- * until the server closes the gRPC connection. This event is only sent if
- * `single_utterance` was set to `true`, and is not used otherwise.
- *
- * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 1;
- */
- const END_OF_SINGLE_UTTERANCE = 1;
- /**
- * This event indicates that the server has detected the beginning of human
- * voice activity in the stream. This event can be returned multiple times
- * if speech starts and stops repeatedly throughout the stream. This event
- * is only sent if `voice_activity_events` is set to true.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_BEGIN = 2;
- */
- const SPEECH_ACTIVITY_BEGIN = 2;
- /**
- * This event indicates that the server has detected the end of human voice
- * activity in the stream. This event can be returned multiple times if
- * speech starts and stops repeatedly throughout the stream. This event is
- * only sent if `voice_activity_events` is set to true.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_END = 3;
- */
- const SPEECH_ACTIVITY_END = 3;
- /**
- * This event indicates that the user-set timeout for speech activity begin
- * or end has exceeded. Upon receiving this event, the client is expected to
- * send a half close. Further audio will not be processed.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_TIMEOUT = 4;
- */
- const SPEECH_ACTIVITY_TIMEOUT = 4;
-
- private static $valueToName = [
- self::SPEECH_EVENT_UNSPECIFIED => 'SPEECH_EVENT_UNSPECIFIED',
- self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE',
- self::SPEECH_ACTIVITY_BEGIN => 'SPEECH_ACTIVITY_BEGIN',
- self::SPEECH_ACTIVITY_END => 'SPEECH_ACTIVITY_END',
- self::SPEECH_ACTIVITY_TIMEOUT => 'SPEECH_ACTIVITY_TIMEOUT',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(SpeechEventType::class, \Google\Cloud\Speech\V1p1beta1\StreamingRecognizeResponse_SpeechEventType::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptNormalization.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptNormalization.php
deleted file mode 100644
index f77710693ced..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptNormalization.php
+++ /dev/null
@@ -1,82 +0,0 @@
- 0.8) and final transcripts.
- *
- * Generated from protobuf message google.cloud.speech.v1p1beta1.TranscriptNormalization
- */
-class TranscriptNormalization extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry entries = 1;
- */
- private $entries;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V1p1beta1\TranscriptNormalization\Entry>|\Google\Protobuf\Internal\RepeatedField $entries
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry entries = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getEntries()
- {
- return $this->entries;
- }
-
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry entries = 1;
- * @param array<\Google\Cloud\Speech\V1p1beta1\TranscriptNormalization\Entry>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setEntries($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V1p1beta1\TranscriptNormalization\Entry::class);
- $this->entries = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptNormalization/Entry.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptNormalization/Entry.php
deleted file mode 100644
index 60cd1801563a..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptNormalization/Entry.php
+++ /dev/null
@@ -1,138 +0,0 @@
-google.cloud.speech.v1p1beta1.TranscriptNormalization.Entry
- */
-class Entry extends \Google\Protobuf\Internal\Message
-{
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- */
- protected $search = '';
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- */
- protected $replace = '';
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- */
- protected $case_sensitive = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $search
- * What to replace. Max length is 100 characters.
- * @type string $replace
- * What to replace with. Max length is 100 characters.
- * @type bool $case_sensitive
- * Whether the search is case sensitive.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\Resource::initOnce();
- parent::__construct($data);
- }
-
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- * @return string
- */
- public function getSearch()
- {
- return $this->search;
- }
-
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- * @param string $var
- * @return $this
- */
- public function setSearch($var)
- {
- GPBUtil::checkString($var, True);
- $this->search = $var;
-
- return $this;
- }
-
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- * @return string
- */
- public function getReplace()
- {
- return $this->replace;
- }
-
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- * @param string $var
- * @return $this
- */
- public function setReplace($var)
- {
- GPBUtil::checkString($var, True);
- $this->replace = $var;
-
- return $this;
- }
-
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @return bool
- */
- public function getCaseSensitive()
- {
- return $this->case_sensitive;
- }
-
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @param bool $var
- * @return $this
- */
- public function setCaseSensitive($var)
- {
- GPBUtil::checkBool($var);
- $this->case_sensitive = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Entry::class, \Google\Cloud\Speech\V1p1beta1\TranscriptNormalization_Entry::class);
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptOutputConfig.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptOutputConfig.php
deleted file mode 100644
index ae2e21948cf5..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/TranscriptOutputConfig.php
+++ /dev/null
@@ -1,81 +0,0 @@
-google.cloud.speech.v1p1beta1.TranscriptOutputConfig
- */
-class TranscriptOutputConfig extends \Google\Protobuf\Internal\Message
-{
- protected $output_type;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $gcs_uri
- * Specifies a Cloud Storage URI for the recognition results. Must be
- * specified in the format: `gs://bucket_name/object_name`, and the bucket
- * must already exist.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Specifies a Cloud Storage URI for the recognition results. Must be
- * specified in the format: `gs://bucket_name/object_name`, and the bucket
- * must already exist.
- *
- * Generated from protobuf field string gcs_uri = 1;
- * @return string
- */
- public function getGcsUri()
- {
- return $this->readOneof(1);
- }
-
- public function hasGcsUri()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Specifies a Cloud Storage URI for the recognition results. Must be
- * specified in the format: `gs://bucket_name/object_name`, and the bucket
- * must already exist.
- *
- * Generated from protobuf field string gcs_uri = 1;
- * @param string $var
- * @return $this
- */
- public function setGcsUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getOutputType()
- {
- return $this->whichOneof("output_type");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/UpdateCustomClassRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/UpdateCustomClassRequest.php
deleted file mode 100644
index b7ad56cb4ddb..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/UpdateCustomClassRequest.php
+++ /dev/null
@@ -1,153 +0,0 @@
-google.cloud.speech.v1p1beta1.UpdateCustomClassRequest
- */
-class UpdateCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class = null;
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1p1beta1\CustomClass $custom_class
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\CustomClass|null
- */
- public function getCustomClass()
- {
- return $this->custom_class;
- }
-
- public function hasCustomClass()
- {
- return isset($this->custom_class);
- }
-
- public function clearCustomClass()
- {
- unset($this->custom_class);
- }
-
- /**
- * Required. The custom class to update.
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\CustomClass $var
- * @return $this
- */
- public function setCustomClass($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\CustomClass::class);
- $this->custom_class = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/UpdatePhraseSetRequest.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/UpdatePhraseSetRequest.php
deleted file mode 100644
index 286cbc8ec44f..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/UpdatePhraseSetRequest.php
+++ /dev/null
@@ -1,153 +0,0 @@
-google.cloud.speech.v1p1beta1.UpdatePhraseSetRequest
- */
-class UpdatePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set = null;
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V1p1beta1\PhraseSet $phrase_set
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeechAdaptation::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V1p1beta1\PhraseSet|null
- */
- public function getPhraseSet()
- {
- return $this->phrase_set;
- }
-
- public function hasPhraseSet()
- {
- return isset($this->phrase_set);
- }
-
- public function clearPhraseSet()
- {
- unset($this->phrase_set);
- }
-
- /**
- * Required. The phrase set to update.
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- *
- * Generated from protobuf field .google.cloud.speech.v1p1beta1.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V1p1beta1\PhraseSet $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1p1beta1\PhraseSet::class);
- $this->phrase_set = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/WordInfo.php b/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/WordInfo.php
deleted file mode 100644
index 3ef1edd5142a..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/proto/src/Google/Cloud/Speech/V1p1beta1/WordInfo.php
+++ /dev/null
@@ -1,303 +0,0 @@
-google.cloud.speech.v1p1beta1.WordInfo
- */
-class WordInfo extends \Google\Protobuf\Internal\Message
-{
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_time = 1;
- */
- protected $start_time = null;
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_time = 2;
- */
- protected $end_time = null;
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- */
- protected $word = '';
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- */
- protected $confidence = 0.0;
- /**
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
- * top alternative.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $speaker_tag = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $start_time
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- * @type \Google\Protobuf\Duration $end_time
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- * @type string $word
- * The word corresponding to this set of information.
- * @type float $confidence
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- * @type int $speaker_tag
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
- * top alternative.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V1P1Beta1\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_time = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getStartTime()
- {
- return $this->start_time;
- }
-
- public function hasStartTime()
- {
- return isset($this->start_time);
- }
-
- public function clearStartTime()
- {
- unset($this->start_time);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_time = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setStartTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->start_time = $var;
-
- return $this;
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_time = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getEndTime()
- {
- return $this->end_time;
- }
-
- public function hasEndTime()
- {
- return isset($this->end_time);
- }
-
- public function clearEndTime()
- {
- unset($this->end_time);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if `enable_word_time_offsets=true` and only
- * in the top hypothesis.
- * This is an experimental feature and the accuracy of the time offset can
- * vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_time = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setEndTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->end_time = $var;
-
- return $this;
- }
-
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- * @return string
- */
- public function getWord()
- {
- return $this->word;
- }
-
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- * @param string $var
- * @return $this
- */
- public function setWord($var)
- {
- GPBUtil::checkString($var, True);
- $this->word = $var;
-
- return $this;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- * @return float
- */
- public function getConfidence()
- {
- return $this->confidence;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where `is_final=true`.
- * This field is not guaranteed to be accurate and users should not rely on it
- * to be always provided.
- * The default of 0.0 is a sentinel value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- * @param float $var
- * @return $this
- */
- public function setConfidence($var)
- {
- GPBUtil::checkFloat($var);
- $this->confidence = $var;
-
- return $this;
- }
-
- /**
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
- * top alternative.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getSpeakerTag()
- {
- return $this->speaker_tag;
- }
-
- /**
- * Output only. A distinct integer value is assigned for every speaker within
- * the audio. This field specifies which one of those speakers was detected to
- * have spoken this word. Value ranges from '1' to diarization_speaker_count.
- * speaker_tag is set if enable_speaker_diarization = 'true' and only in the
- * top alternative.
- *
- * Generated from protobuf field int32 speaker_tag = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setSpeakerTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->speaker_tag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/create_custom_class.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/create_custom_class.php
deleted file mode 100644
index dbba6bf217e5..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/create_custom_class.php
+++ /dev/null
@@ -1,84 +0,0 @@
-createCustomClass($formattedParent, $customClassId, $customClass);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
- $customClassId = '[CUSTOM_CLASS_ID]';
-
- create_custom_class_sample($formattedParent, $customClassId);
-}
-// [END speech_v1p1beta1_generated_Adaptation_CreateCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/create_phrase_set.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/create_phrase_set.php
deleted file mode 100644
index 0018d056f04f..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/create_phrase_set.php
+++ /dev/null
@@ -1,86 +0,0 @@
-createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
- $phraseSetId = '[PHRASE_SET_ID]';
-
- create_phrase_set_sample($formattedParent, $phraseSetId);
-}
-// [END speech_v1p1beta1_generated_Adaptation_CreatePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/delete_custom_class.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/delete_custom_class.php
deleted file mode 100644
index 9ef2ec4e960e..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/delete_custom_class.php
+++ /dev/null
@@ -1,72 +0,0 @@
-deleteCustomClass($formattedName);
- printf('Call completed successfully.' . PHP_EOL);
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- delete_custom_class_sample($formattedName);
-}
-// [END speech_v1p1beta1_generated_Adaptation_DeleteCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php
deleted file mode 100644
index f80ece9e91e3..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/delete_phrase_set.php
+++ /dev/null
@@ -1,66 +0,0 @@
-deletePhraseSet($formattedName);
- printf('Call completed successfully.' . PHP_EOL);
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- delete_phrase_set_sample($formattedName);
-}
-// [END speech_v1p1beta1_generated_Adaptation_DeletePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/get_custom_class.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/get_custom_class.php
deleted file mode 100644
index 83b50cf93361..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/get_custom_class.php
+++ /dev/null
@@ -1,68 +0,0 @@
-getCustomClass($formattedName);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- get_custom_class_sample($formattedName);
-}
-// [END speech_v1p1beta1_generated_Adaptation_GetCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/get_phrase_set.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/get_phrase_set.php
deleted file mode 100644
index eb80b037fa98..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/get_phrase_set.php
+++ /dev/null
@@ -1,74 +0,0 @@
-getPhraseSet($formattedName);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = AdaptationClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- get_phrase_set_sample($formattedName);
-}
-// [END speech_v1p1beta1_generated_Adaptation_GetPhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/list_custom_classes.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/list_custom_classes.php
deleted file mode 100644
index 2533d8454348..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/list_custom_classes.php
+++ /dev/null
@@ -1,79 +0,0 @@
-listCustomClasses($formattedParent);
-
- /** @var CustomClass $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_custom_classes_sample($formattedParent);
-}
-// [END speech_v1p1beta1_generated_Adaptation_ListCustomClasses_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/list_phrase_set.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/list_phrase_set.php
deleted file mode 100644
index 2d0087bbefa7..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/list_phrase_set.php
+++ /dev/null
@@ -1,79 +0,0 @@
-listPhraseSet($formattedParent);
-
- /** @var PhraseSet $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = AdaptationClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_phrase_set_sample($formattedParent);
-}
-// [END speech_v1p1beta1_generated_Adaptation_ListPhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/update_custom_class.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/update_custom_class.php
deleted file mode 100644
index 7b63b35d57e2..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/update_custom_class.php
+++ /dev/null
@@ -1,56 +0,0 @@
-updateCustomClass($customClass);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v1p1beta1_generated_Adaptation_UpdateCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/update_phrase_set.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/update_phrase_set.php
deleted file mode 100644
index 92396559a257..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/AdaptationClient/update_phrase_set.php
+++ /dev/null
@@ -1,56 +0,0 @@
-updatePhraseSet($phraseSet);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v1p1beta1_generated_Adaptation_UpdatePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/long_running_recognize.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/long_running_recognize.php
deleted file mode 100644
index 7519bb9772e7..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/long_running_recognize.php
+++ /dev/null
@@ -1,94 +0,0 @@
-setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->longRunningRecognize($config, $audio);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var LongRunningRecognizeResponse $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $configLanguageCode = '[LANGUAGE_CODE]';
-
- long_running_recognize_sample($configLanguageCode);
-}
-// [END speech_v1p1beta1_generated_Speech_LongRunningRecognize_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/recognize.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/recognize.php
deleted file mode 100644
index 8037bfebbc10..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/recognize.php
+++ /dev/null
@@ -1,78 +0,0 @@
-setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
-
- // Call the API and handle any network failures.
- try {
- /** @var RecognizeResponse $response */
- $response = $speechClient->recognize($config, $audio);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $configLanguageCode = '[LANGUAGE_CODE]';
-
- recognize_sample($configLanguageCode);
-}
-// [END speech_v1p1beta1_generated_Speech_Recognize_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/streaming_recognize.php b/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/streaming_recognize.php
deleted file mode 100644
index 218945ed873b..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/samples/V1p1beta1/SpeechClient/streaming_recognize.php
+++ /dev/null
@@ -1,64 +0,0 @@
-streamingRecognize();
- $stream->writeAll([$request,]);
-
- /** @var StreamingRecognizeResponse $element */
- foreach ($stream->closeWriteAndReadAll() as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v1p1beta1_generated_Speech_StreamingRecognize_sync]
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/AdaptationClient.php b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/AdaptationClient.php
deleted file mode 100644
index a01d12598997..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/AdaptationClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
-locationName('[PROJECT]', '[LOCATION]');
- * $customClassId = 'custom_class_id';
- * $customClass = new CustomClass();
- * $response = $adaptationClient->createCustomClass($formattedParent, $customClassId, $customClass);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class AdaptationGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.speech.v1p1beta1.Adaptation';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'speech.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'speech.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $customClassNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $phraseSetNameTemplate;
-
- private static $pathTemplateMap;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/adaptation_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/adaptation_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/adaptation_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/adaptation_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getCustomClassNameTemplate()
- {
- if (self::$customClassNameTemplate == null) {
- self::$customClassNameTemplate = new PathTemplate('projects/{project}/locations/{location}/customClasses/{custom_class}');
- }
-
- return self::$customClassNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- 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 getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'customClass' => self::getCustomClassNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'phraseSet' => self::getPhraseSetNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a custom_class
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $customClass
- *
- * @return string The formatted custom_class resource.
- *
- * @experimental
- */
- public static function customClassName($project, $location, $customClass)
- {
- return self::getCustomClassNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'custom_class' => $customClass,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- *
- * @experimental
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $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.
- *
- * @experimental
- */
- public static function phraseSetName($project, $location, $phraseSet)
- {
- return self::getPhraseSetNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'phrase_set' => $phraseSet,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- * - location: projects/{project}/locations/{location}
- * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'speech.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- }
-
- /**
- * Create a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * $customClassId = 'custom_class_id';
- * $customClass = new CustomClass();
- * $response = $adaptationClient->createCustomClass($formattedParent, $customClassId, $customClass);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this custom class will be created.
- * Format:
- *
- * `projects/{project}/locations/{location}/customClasses`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param string $customClassId Required. The ID to use for the custom class, which will become the final
- * component of the custom class' resource name.
- *
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @param CustomClass $customClass Required. The custom class to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\CustomClass
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createCustomClass($parent, $customClassId, $customClass, array $optionalArgs = [])
- {
- $request = new CreateCustomClassRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setCustomClassId($customClassId);
- $request->setCustomClass($customClass);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreateCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Create a set of phrase hints. Each item in the set can be a single word or
- * a multi-word phrase. The items in the PhraseSet are favored by the
- * recognition model when you send a call that includes the PhraseSet.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * $phraseSetId = 'phrase_set_id';
- * $phraseSet = new PhraseSet();
- * $response = $adaptationClient->createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent resource where this phrase set will be created.
- * Format:
- *
- * `projects/{project}/locations/{location}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param string $phraseSetId Required. The ID to use for the phrase set, which will become the final
- * component of the phrase set's resource name.
- *
- * This value should restrict to letters, numbers, and hyphens, with the first
- * character a letter, the last a letter or a number, and be 4-63 characters.
- * @param PhraseSet $phraseSet Required. The phrase set to create.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\PhraseSet
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function createPhraseSet($parent, $phraseSetId, $phraseSet, array $optionalArgs = [])
- {
- $request = new CreatePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $request->setPhraseSetId($phraseSetId);
- $request->setPhraseSet($phraseSet);
- $requestParamHeaders['parent'] = $parent;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('CreatePhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Delete a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $adaptationClient->deleteCustomClass($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the custom class to delete. Format:
- *
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deleteCustomClass($name, array $optionalArgs = [])
- {
- $request = new DeleteCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeleteCustomClass', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Delete a phrase set.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $adaptationClient->deletePhraseSet($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the phrase set to delete. Format:
- *
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function deletePhraseSet($name, array $optionalArgs = [])
- {
- $request = new DeletePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('DeletePhraseSet', GPBEmpty::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Get a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $response = $adaptationClient->getCustomClass($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the custom class to retrieve. Format:
- *
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\CustomClass
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getCustomClass($name, array $optionalArgs = [])
- {
- $request = new GetCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Get a phrase set.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedName = $adaptationClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $response = $adaptationClient->getPhraseSet($formattedName);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the phrase set to retrieve. Format:
- *
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\PhraseSet
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function getPhraseSet($name, array $optionalArgs = [])
- {
- $request = new GetPhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetPhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * List custom classes.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $adaptationClient->listCustomClasses($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $adaptationClient->listCustomClasses($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent, which owns this collection of custom classes. Format:
- *
- * `projects/{project}/locations/{location}/customClasses`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listCustomClasses($parent, array $optionalArgs = [])
- {
- $request = new ListCustomClassesRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListCustomClasses', $optionalArgs, ListCustomClassesResponse::class, $request);
- }
-
- /**
- * List phrase sets.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $formattedParent = $adaptationClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $adaptationClient->listPhraseSet($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $adaptationClient->listPhraseSet($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The parent, which owns this collection of phrase set. Format:
- *
- * `projects/{project}/locations/{location}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function listPhraseSet($parent, array $optionalArgs = [])
- {
- $request = new ListPhraseSetRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListPhraseSet', $optionalArgs, ListPhraseSetResponse::class, $request);
- }
-
- /**
- * Update a custom class.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $customClass = new CustomClass();
- * $response = $adaptationClient->updateCustomClass($customClass);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param CustomClass $customClass Required. The custom class to update.
- *
- * The custom class's `name` field is used to identify the custom class to be
- * updated. Format:
- *
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to be updated.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\CustomClass
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updateCustomClass($customClass, array $optionalArgs = [])
- {
- $request = new UpdateCustomClassRequest();
- $requestParamHeaders = [];
- $request->setCustomClass($customClass);
- $requestParamHeaders['custom_class.name'] = $customClass->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdateCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Update a phrase set.
- *
- * Sample code:
- * ```
- * $adaptationClient = new AdaptationClient();
- * try {
- * $phraseSet = new PhraseSet();
- * $response = $adaptationClient->updatePhraseSet($phraseSet);
- * } finally {
- * $adaptationClient->close();
- * }
- * ```
- *
- * @param PhraseSet $phraseSet Required. The phrase set to update.
- *
- * The phrase set's `name` field is used to identify the set to be
- * updated. Format:
- *
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Speech-to-Text supports three locations: `global`, `us` (US North America),
- * and `eu` (Europe). If you are calling the `speech.googleapis.com`
- * endpoint, use the `global` location. To specify a region, use a
- * [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints)
- * with matching `us` or `eu` location value.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to be updated.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\PhraseSet
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function updatePhraseSet($phraseSet, array $optionalArgs = [])
- {
- $request = new UpdatePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setPhraseSet($phraseSet);
- $requestParamHeaders['phrase_set.name'] = $phraseSet->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdatePhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-}
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/Gapic/SpeechGapicClient.php b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/Gapic/SpeechGapicClient.php
deleted file mode 100644
index 6e91499c6e7e..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/Gapic/SpeechGapicClient.php
+++ /dev/null
@@ -1,581 +0,0 @@
-longRunningRecognize($config, $audio);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->longRunningRecognize($config, $audio);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'longRunningRecognize');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @experimental
- *
- * @deprecated This class will be removed in the next major version update.
- */
-class SpeechGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.speech.v1p1beta1.Speech';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'speech.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'speech.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $customClassNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $phraseSetNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/speech_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/speech_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getCustomClassNameTemplate()
- {
- if (self::$customClassNameTemplate == null) {
- self::$customClassNameTemplate = new PathTemplate('projects/{project}/locations/{location}/customClasses/{custom_class}');
- }
-
- return self::$customClassNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- 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 getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'customClass' => self::getCustomClassNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'phraseSet' => self::getPhraseSetNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a custom_class
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $customClass
- *
- * @return string The formatted custom_class resource.
- *
- * @experimental
- */
- public static function customClassName($project, $location, $customClass)
- {
- return self::getCustomClassNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'custom_class' => $customClass,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- *
- * @experimental
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $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.
- *
- * @experimental
- */
- public static function phraseSetName($project, $location, $phraseSet)
- {
- return self::getPhraseSetNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'phrase_set' => $phraseSet,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- * - location: projects/{project}/locations/{location}
- * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- *
- * @experimental
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- *
- * @experimental
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- *
- * @experimental
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'speech.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- *
- * @experimental
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Performs asynchronous speech recognition: receive results via the
- * google.longrunning.Operations interface. Returns either an
- * `Operation.error` or an `Operation.response` which contains
- * a `LongRunningRecognizeResponse` message.
- * For more information on asynchronous speech recognition, see the
- * [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $config = new RecognitionConfig();
- * $audio = new RecognitionAudio();
- * $operationResponse = $speechClient->longRunningRecognize($config, $audio);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->longRunningRecognize($config, $audio);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'longRunningRecognize');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param RecognitionConfig $config Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @param RecognitionAudio $audio Required. The audio data to be recognized.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type TranscriptOutputConfig $outputConfig
- * Optional. Specifies an optional destination for the recognition results.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function longRunningRecognize($config, $audio, array $optionalArgs = [])
- {
- $request = new LongRunningRecognizeRequest();
- $request->setConfig($config);
- $request->setAudio($audio);
- if (isset($optionalArgs['outputConfig'])) {
- $request->setOutputConfig($optionalArgs['outputConfig']);
- }
-
- return $this->startOperationsCall('LongRunningRecognize', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Performs synchronous speech recognition: receive results after all audio
- * has been sent and processed.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $config = new RecognitionConfig();
- * $audio = new RecognitionAudio();
- * $response = $speechClient->recognize($config, $audio);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param RecognitionConfig $config Required. Provides information to the recognizer that specifies how to
- * process the request.
- * @param RecognitionAudio $audio Required. The audio data to be recognized.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V1p1beta1\RecognizeResponse
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function recognize($config, $audio, array $optionalArgs = [])
- {
- $request = new RecognizeRequest();
- $request->setConfig($config);
- $request->setAudio($audio);
- return $this->startCall('Recognize', RecognizeResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Performs bidirectional streaming speech recognition: receive results while
- * sending audio. This method is only available via the gRPC API (not REST).
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $request = new StreamingRecognizeRequest();
- * // Write all requests to the server, then read all responses until the
- * // stream is complete
- * $requests = [
- * $request,
- * ];
- * $stream = $speechClient->streamingRecognize();
- * $stream->writeAll($requests);
- * foreach ($stream->closeWriteAndReadAll() as $element) {
- * // doSomethingWith($element);
- * }
- * // Alternatively:
- * // Write requests individually, making read() calls if
- * // required. Call closeWrite() once writes are complete, and read the
- * // remaining responses from the server.
- * $requests = [
- * $request,
- * ];
- * $stream = $speechClient->streamingRecognize();
- * foreach ($requests as $request) {
- * $stream->write($request);
- * // if required, read a single response from the stream
- * $element = $stream->read();
- * // doSomethingWith($element)
- * }
- * $stream->closeWrite();
- * $element = $stream->read();
- * while (!is_null($element)) {
- * // doSomethingWith($element)
- * $element = $stream->read();
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $timeoutMillis
- * Timeout to use for this call.
- * }
- *
- * @return \Google\ApiCore\BidiStream
- *
- * @throws ApiException if the remote call fails
- *
- * @experimental
- */
- public function streamingRecognize(array $optionalArgs = [])
- {
- return $this->startCall('StreamingRecognize', StreamingRecognizeResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL);
- }
-}
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/SpeechClient.php b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/SpeechClient.php
deleted file mode 100644
index 1ac219db1b77..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/SpeechClient.php
+++ /dev/null
@@ -1,36 +0,0 @@
- [
- 'google.cloud.speech.v1p1beta1.Adaptation' => [
- 'ListCustomClasses' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getCustomClasses',
- ],
- ],
- 'ListPhraseSet' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getPhraseSets',
- ],
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/adaptation_rest_client_config.php b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/adaptation_rest_client_config.php
deleted file mode 100644
index d4e0c1845fea..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/adaptation_rest_client_config.php
+++ /dev/null
@@ -1,162 +0,0 @@
- [
- 'google.cloud.speech.v1p1beta1.Adaptation' => [
- 'CreateCustomClass' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1p1beta1/{parent=projects/*/locations/*}/customClasses',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'CreatePhraseSet' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1p1beta1/{parent=projects/*/locations/*}/phraseSets',
- 'body' => '*',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'DeleteCustomClass' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1p1beta1/{name=projects/*/locations/*/customClasses/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeletePhraseSet' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetCustomClass' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/{name=projects/*/locations/*/customClasses/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetPhraseSet' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/{name=projects/*/locations/*/phraseSets/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListCustomClasses' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/{parent=projects/*/locations/*}/customClasses',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListPhraseSet' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/{parent=projects/*/locations/*}/phraseSets',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'UpdateCustomClass' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1p1beta1/{custom_class.name=projects/*/locations/*/customClasses/*}',
- 'body' => 'custom_class',
- 'placeholders' => [
- 'custom_class.name' => [
- 'getters' => [
- 'getCustomClass',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdatePhraseSet' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v1p1beta1/{phrase_set.name=projects/*/locations/*/phraseSets/*}',
- 'body' => 'phrase_set',
- 'placeholders' => [
- 'phrase_set.name' => [
- 'getters' => [
- 'getPhraseSet',
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/operations/{name=**}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/operations',
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_client_config.json b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_client_config.json
deleted file mode 100644
index 1f9e0ef31ed0..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_client_config.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "interfaces": {
- "google.cloud.speech.v1p1beta1.Speech": {
- "retry_codes": {
- "no_retry_codes": [],
- "retry_policy_1_codes": [
- "DEADLINE_EXCEEDED",
- "UNAVAILABLE"
- ],
- "no_retry_1_codes": []
- },
- "retry_params": {
- "no_retry_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 0,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 0,
- "total_timeout_millis": 0
- },
- "retry_policy_1_params": {
- "initial_retry_delay_millis": 100,
- "retry_delay_multiplier": 1.3,
- "max_retry_delay_millis": 60000,
- "initial_rpc_timeout_millis": 5000000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 5000000,
- "total_timeout_millis": 5000000
- },
- "no_retry_1_params": {
- "initial_retry_delay_millis": 0,
- "retry_delay_multiplier": 0.0,
- "max_retry_delay_millis": 0,
- "initial_rpc_timeout_millis": 5000000,
- "rpc_timeout_multiplier": 1.0,
- "max_rpc_timeout_millis": 5000000,
- "total_timeout_millis": 5000000
- }
- },
- "methods": {
- "LongRunningRecognize": {
- "timeout_millis": 5000000,
- "retry_codes_name": "no_retry_1_codes",
- "retry_params_name": "no_retry_1_params"
- },
- "Recognize": {
- "timeout_millis": 5000000,
- "retry_codes_name": "retry_policy_1_codes",
- "retry_params_name": "retry_policy_1_params"
- },
- "StreamingRecognize": {
- "timeout_millis": 5000000
- }
- }
- }
- }
-}
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_descriptor_config.php b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_descriptor_config.php
deleted file mode 100644
index 5517a3e9b94e..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_descriptor_config.php
+++ /dev/null
@@ -1,43 +0,0 @@
- [
- 'google.cloud.speech.v1p1beta1.Speech' => [
- 'LongRunningRecognize' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V1p1beta1\LongRunningRecognizeResponse',
- 'metadataReturnType' => '\Google\Cloud\Speech\V1p1beta1\LongRunningRecognizeMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- ],
- 'StreamingRecognize' => [
- 'grpcStreaming' => [
- 'grpcStreamingType' => 'BidiStreaming',
- ],
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_rest_client_config.php b/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_rest_client_config.php
deleted file mode 100644
index 49c8e8cc781a..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/src/V1p1beta1/resources/speech_rest_client_config.php
+++ /dev/null
@@ -1,56 +0,0 @@
- [
- 'google.cloud.speech.v1p1beta1.Speech' => [
- 'LongRunningRecognize' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1p1beta1/speech:longrunningrecognize',
- 'body' => '*',
- ],
- 'Recognize' => [
- 'method' => 'post',
- 'uriTemplate' => '/v1p1beta1/speech:recognize',
- 'body' => '*',
- ],
- ],
- 'google.longrunning.Operations' => [
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/operations/{name=**}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v1p1beta1/operations',
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/Speech/v1p1beta1/tests/Unit/V1p1beta1/AdaptationClientTest.php b/owl-bot-staging/Speech/v1p1beta1/tests/Unit/V1p1beta1/AdaptationClientTest.php
deleted file mode 100644
index a0c33c82dcc9..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/tests/Unit/V1p1beta1/AdaptationClientTest.php
+++ /dev/null
@@ -1,703 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return AdaptationClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new AdaptationClient($options);
- }
-
- /** @test */
- public function createCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $customClassId2 = 'customClassId2-529899005';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setCustomClassId($customClassId2);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $customClassId = 'customClassId1554754128';
- $customClass = new CustomClass();
- $response = $gapicClient->createCustomClass($formattedParent, $customClassId, $customClass);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/CreateCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getCustomClassId();
- $this->assertProtobufEquals($customClassId, $actualValue);
- $actualValue = $actualRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $customClassId = 'customClassId1554754128';
- $customClass = new CustomClass();
- try {
- $gapicClient->createCustomClass($formattedParent, $customClassId, $customClass);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $boost = 9392221;
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setBoost($boost);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $phraseSetId = 'phraseSetId1496370782';
- $phraseSet = new PhraseSet();
- $response = $gapicClient->createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/CreatePhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $actualValue = $actualRequestObject->getPhraseSetId();
- $this->assertProtobufEquals($phraseSetId, $actualValue);
- $actualValue = $actualRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $phraseSetId = 'phraseSetId1496370782';
- $phraseSet = new PhraseSet();
- try {
- $gapicClient->createPhraseSet($formattedParent, $phraseSetId, $phraseSet);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $gapicClient->deleteCustomClass($formattedName);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/DeleteCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- try {
- $gapicClient->deleteCustomClass($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new GPBEmpty();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $gapicClient->deletePhraseSet($formattedName);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/DeletePhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- try {
- $gapicClient->deletePhraseSet($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $customClassId = 'customClassId1554754128';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setCustomClassId($customClassId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->getCustomClass($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/GetCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- try {
- $gapicClient->getCustomClass($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $boost = 9392221;
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setBoost($boost);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->getPhraseSet($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/GetPhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- try {
- $gapicClient->getPhraseSet($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $customClassesElement = new CustomClass();
- $customClasses = [
- $customClassesElement,
- ];
- $expectedResponse = new ListCustomClassesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setCustomClasses($customClasses);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listCustomClasses($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getCustomClasses()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/ListCustomClasses', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listCustomClasses($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $phraseSetsElement = new PhraseSet();
- $phraseSets = [
- $phraseSetsElement,
- ];
- $expectedResponse = new ListPhraseSetResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setPhraseSets($phraseSets);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listPhraseSet($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getPhraseSets()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/ListPhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listPhraseSet($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $customClassId = 'customClassId1554754128';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setCustomClassId($customClassId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $customClass = new CustomClass();
- $response = $gapicClient->updateCustomClass($customClass);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/UpdateCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $customClass = new CustomClass();
- try {
- $gapicClient->updateCustomClass($customClass);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $boost = 9392221;
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setBoost($boost);
- $transport->addResponse($expectedResponse);
- // Mock request
- $phraseSet = new PhraseSet();
- $response = $gapicClient->updatePhraseSet($phraseSet);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Adaptation/UpdatePhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $phraseSet = new PhraseSet();
- try {
- $gapicClient->updatePhraseSet($phraseSet);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/Speech/v1p1beta1/tests/Unit/V1p1beta1/SpeechClientTest.php b/owl-bot-staging/Speech/v1p1beta1/tests/Unit/V1p1beta1/SpeechClientTest.php
deleted file mode 100644
index 7101b4871e93..000000000000
--- a/owl-bot-staging/Speech/v1p1beta1/tests/Unit/V1p1beta1/SpeechClientTest.php
+++ /dev/null
@@ -1,360 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SpeechClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SpeechClient($options);
- }
-
- /** @test */
- public function longRunningRecognizeTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/longRunningRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $requestId = 37109963;
- $expectedResponse = new LongRunningRecognizeResponse();
- $expectedResponse->setRequestId($requestId);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/longRunningRecognizeTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- $response = $gapicClient->longRunningRecognize($config, $audio);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Speech/LongRunningRecognize', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getConfig();
- $this->assertProtobufEquals($config, $actualValue);
- $actualValue = $actualApiRequestObject->getAudio();
- $this->assertProtobufEquals($audio, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/longRunningRecognizeTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function longRunningRecognizeExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/longRunningRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- $response = $gapicClient->longRunningRecognize($config, $audio);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/longRunningRecognizeTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function recognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $requestId = 37109963;
- $expectedResponse = new RecognizeResponse();
- $expectedResponse->setRequestId($requestId);
- $transport->addResponse($expectedResponse);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- $response = $gapicClient->recognize($config, $audio);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Speech/Recognize', $actualFuncCall);
- $actualValue = $actualRequestObject->getConfig();
- $this->assertProtobufEquals($config, $actualValue);
- $actualValue = $actualRequestObject->getAudio();
- $this->assertProtobufEquals($audio, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function recognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $config = new RecognitionConfig();
- $configLanguageCode = 'configLanguageCode-537965113';
- $config->setLanguageCode($configLanguageCode);
- $audio = new RecognitionAudio();
- try {
- $gapicClient->recognize($config, $audio);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $requestId = 37109963;
- $expectedResponse = new StreamingRecognizeResponse();
- $expectedResponse->setRequestId($requestId);
- $transport->addResponse($expectedResponse);
- $requestId2 = 1302939070;
- $expectedResponse2 = new StreamingRecognizeResponse();
- $expectedResponse2->setRequestId($requestId2);
- $transport->addResponse($expectedResponse2);
- $requestId3 = 1302939071;
- $expectedResponse3 = new StreamingRecognizeResponse();
- $expectedResponse3->setRequestId($requestId3);
- $transport->addResponse($expectedResponse3);
- // Mock request
- $request = new StreamingRecognizeRequest();
- $request2 = new StreamingRecognizeRequest();
- $request3 = new StreamingRecognizeRequest();
- $bidi = $gapicClient->streamingRecognize();
- $this->assertInstanceOf(BidiStream::class, $bidi);
- $bidi->write($request);
- $responses = [];
- $responses[] = $bidi->read();
- $bidi->writeAll([
- $request2,
- $request3,
- ]);
- foreach ($bidi->closeWriteAndReadAll() as $response) {
- $responses[] = $response;
- }
-
- $expectedResponses = [];
- $expectedResponses[] = $expectedResponse;
- $expectedResponses[] = $expectedResponse2;
- $expectedResponses[] = $expectedResponse3;
- $this->assertEquals($expectedResponses, $responses);
- $createStreamRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($createStreamRequests));
- $streamFuncCall = $createStreamRequests[0]->getFuncCall();
- $streamRequestObject = $createStreamRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v1p1beta1.Speech/StreamingRecognize', $streamFuncCall);
- $this->assertNull($streamRequestObject);
- $callObjects = $transport->popCallObjects();
- $this->assertSame(1, count($callObjects));
- $bidiCall = $callObjects[0];
- $writeRequests = $bidiCall->popReceivedCalls();
- $expectedRequests = [];
- $expectedRequests[] = $request;
- $expectedRequests[] = $request2;
- $expectedRequests[] = $request3;
- $this->assertEquals($expectedRequests, $writeRequests);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->setStreamingStatus($status);
- $this->assertTrue($transport->isExhausted());
- $bidi = $gapicClient->streamingRecognize();
- $results = $bidi->closeWriteAndReadAll();
- try {
- iterator_to_array($results);
- // If the close stream method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/Speech/v2/proto/src/GPBMetadata/Google/Cloud/Speech/V2/CloudSpeech.php b/owl-bot-staging/Speech/v2/proto/src/GPBMetadata/Google/Cloud/Speech/V2/CloudSpeech.php
deleted file mode 100644
index a37c0b0865c3..000000000000
Binary files a/owl-bot-staging/Speech/v2/proto/src/GPBMetadata/Google/Cloud/Speech/V2/CloudSpeech.php and /dev/null differ
diff --git a/owl-bot-staging/Speech/v2/proto/src/GPBMetadata/Google/Cloud/Speech/V2/LocationsMetadata.php b/owl-bot-staging/Speech/v2/proto/src/GPBMetadata/Google/Cloud/Speech/V2/LocationsMetadata.php
deleted file mode 100644
index e46f0e32a839..000000000000
Binary files a/owl-bot-staging/Speech/v2/proto/src/GPBMetadata/Google/Cloud/Speech/V2/LocationsMetadata.php and /dev/null differ
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AccessMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AccessMetadata.php
deleted file mode 100644
index aba94bb70839..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AccessMetadata.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.speech.v2.AccessMetadata
- */
-class AccessMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Describes the different types of constraints that are applied.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AccessMetadata.ConstraintType constraint_type = 1;
- */
- protected $constraint_type = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $constraint_type
- * Describes the different types of constraints that are applied.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\LocationsMetadata::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Describes the different types of constraints that are applied.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AccessMetadata.ConstraintType constraint_type = 1;
- * @return int
- */
- public function getConstraintType()
- {
- return $this->constraint_type;
- }
-
- /**
- * Describes the different types of constraints that are applied.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AccessMetadata.ConstraintType constraint_type = 1;
- * @param int $var
- * @return $this
- */
- public function setConstraintType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\AccessMetadata\ConstraintType::class);
- $this->constraint_type = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AccessMetadata/ConstraintType.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AccessMetadata/ConstraintType.php
deleted file mode 100644
index 3da344eeeb64..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AccessMetadata/ConstraintType.php
+++ /dev/null
@@ -1,58 +0,0 @@
-google.cloud.speech.v2.AccessMetadata.ConstraintType
- */
-class ConstraintType
-{
- /**
- * Unspecified constraint applied.
- *
- * Generated from protobuf enum CONSTRAINT_TYPE_UNSPECIFIED = 0;
- */
- const CONSTRAINT_TYPE_UNSPECIFIED = 0;
- /**
- * The project's org policy disallows the given region.
- *
- * Generated from protobuf enum RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT = 1;
- */
- const RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT = 1;
-
- private static $valueToName = [
- self::CONSTRAINT_TYPE_UNSPECIFIED => 'CONSTRAINT_TYPE_UNSPECIFIED',
- self::RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT => 'RESOURCE_LOCATIONS_ORG_POLICY_CREATE_CONSTRAINT',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ConstraintType::class, \Google\Cloud\Speech\V2\AccessMetadata_ConstraintType::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AutoDetectDecodingConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AutoDetectDecodingConfig.php
deleted file mode 100644
index 35b11391ad74..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/AutoDetectDecodingConfig.php
+++ /dev/null
@@ -1,46 +0,0 @@
-google.cloud.speech.v2.AutoDetectDecodingConfig
- */
-class AutoDetectDecodingConfig extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeFileMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeFileMetadata.php
deleted file mode 100644
index 9bd92acd4797..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeFileMetadata.php
+++ /dev/null
@@ -1,239 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeFileMetadata
- */
-class BatchRecognizeFileMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeFileMetadata.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource as well as the
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] at the
- * request level.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 4;
- */
- protected $config = null;
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] override
- * the values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 5;
- */
- protected $config_mask = null;
- protected $audio_source;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $uri
- * Cloud Storage URI for the audio file.
- * @type \Google\Cloud\Speech\V2\RecognitionConfig $config
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeFileMetadata.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource as well as the
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] at the
- * request level.
- * @type \Google\Protobuf\FieldMask $config_mask
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] override
- * the values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Cloud Storage URI for the audio file.
- *
- * Generated from protobuf field string uri = 1;
- * @return string
- */
- public function getUri()
- {
- return $this->readOneof(1);
- }
-
- public function hasUri()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * Cloud Storage URI for the audio file.
- *
- * Generated from protobuf field string uri = 1;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeFileMetadata.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource as well as the
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] at the
- * request level.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 4;
- * @return \Google\Cloud\Speech\V2\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeFileMetadata.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource as well as the
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] at the
- * request level.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 4;
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] override
- * the values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 5;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getConfigMask()
- {
- return $this->config_mask;
- }
-
- public function hasConfigMask()
- {
- return isset($this->config_mask);
- }
-
- public function clearConfigMask()
- {
- unset($this->config_mask);
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config] override
- * the values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeFileMetadata.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 5;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setConfigMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->config_mask = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getAudioSource()
- {
- return $this->whichOneof("audio_source");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeFileResult.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeFileResult.php
deleted file mode 100644
index f5f8366b37f5..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeFileResult.php
+++ /dev/null
@@ -1,300 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeFileResult
- */
-class BatchRecognizeFileResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * Error if one was encountered.
- *
- * Generated from protobuf field .google.rpc.Status error = 2;
- */
- protected $error = null;
- /**
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3;
- */
- protected $metadata = null;
- /**
- * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
- *
- * Generated from protobuf field string uri = 1 [deprecated = true];
- * @deprecated
- */
- protected $uri = '';
- /**
- * Deprecated. Use `inline_result.transcript` instead.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true];
- * @deprecated
- */
- protected $transcript = null;
- protected $result;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Rpc\Status $error
- * Error if one was encountered.
- * @type \Google\Cloud\Speech\V2\RecognitionResponseMetadata $metadata
- * @type \Google\Cloud\Speech\V2\CloudStorageResult $cloud_storage_result
- * Recognition results written to Cloud Storage. This is
- * populated only when
- * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
- * the
- * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
- * @type \Google\Cloud\Speech\V2\InlineResult $inline_result
- * Recognition results. This is populated only when
- * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
- * the
- * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
- * @type string $uri
- * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
- * @type \Google\Cloud\Speech\V2\BatchRecognizeResults $transcript
- * Deprecated. Use `inline_result.transcript` instead.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Error if one was encountered.
- *
- * Generated from protobuf field .google.rpc.Status error = 2;
- * @return \Google\Rpc\Status|null
- */
- public function getError()
- {
- return $this->error;
- }
-
- public function hasError()
- {
- return isset($this->error);
- }
-
- public function clearError()
- {
- unset($this->error);
- }
-
- /**
- * Error if one was encountered.
- *
- * Generated from protobuf field .google.rpc.Status error = 2;
- * @param \Google\Rpc\Status $var
- * @return $this
- */
- public function setError($var)
- {
- GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
- $this->error = $var;
-
- return $this;
- }
-
- /**
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3;
- * @return \Google\Cloud\Speech\V2\RecognitionResponseMetadata|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 3;
- * @param \Google\Cloud\Speech\V2\RecognitionResponseMetadata $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionResponseMetadata::class);
- $this->metadata = $var;
-
- return $this;
- }
-
- /**
- * Recognition results written to Cloud Storage. This is
- * populated only when
- * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
- * the
- * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
- *
- * Generated from protobuf field .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5;
- * @return \Google\Cloud\Speech\V2\CloudStorageResult|null
- */
- public function getCloudStorageResult()
- {
- return $this->readOneof(5);
- }
-
- public function hasCloudStorageResult()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * Recognition results written to Cloud Storage. This is
- * populated only when
- * [GcsOutputConfig][google.cloud.speech.v2.GcsOutputConfig] is set in
- * the
- * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
- *
- * Generated from protobuf field .google.cloud.speech.v2.CloudStorageResult cloud_storage_result = 5;
- * @param \Google\Cloud\Speech\V2\CloudStorageResult $var
- * @return $this
- */
- public function setCloudStorageResult($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CloudStorageResult::class);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * Recognition results. This is populated only when
- * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
- * the
- * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
- *
- * Generated from protobuf field .google.cloud.speech.v2.InlineResult inline_result = 6;
- * @return \Google\Cloud\Speech\V2\InlineResult|null
- */
- public function getInlineResult()
- {
- return $this->readOneof(6);
- }
-
- public function hasInlineResult()
- {
- return $this->hasOneof(6);
- }
-
- /**
- * Recognition results. This is populated only when
- * [InlineOutputConfig][google.cloud.speech.v2.InlineOutputConfig] is set in
- * the
- * [RecognitionOutputConfig][[google.cloud.speech.v2.RecognitionOutputConfig].
- *
- * Generated from protobuf field .google.cloud.speech.v2.InlineResult inline_result = 6;
- * @param \Google\Cloud\Speech\V2\InlineResult $var
- * @return $this
- */
- public function setInlineResult($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\InlineResult::class);
- $this->writeOneof(6, $var);
-
- return $this;
- }
-
- /**
- * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
- *
- * Generated from protobuf field string uri = 1 [deprecated = true];
- * @return string
- * @deprecated
- */
- public function getUri()
- {
- @trigger_error('uri is deprecated.', E_USER_DEPRECATED);
- return $this->uri;
- }
-
- /**
- * Deprecated. Use `cloud_storage_result.native_format_uri` instead.
- *
- * Generated from protobuf field string uri = 1 [deprecated = true];
- * @param string $var
- * @return $this
- * @deprecated
- */
- public function setUri($var)
- {
- @trigger_error('uri is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkString($var, True);
- $this->uri = $var;
-
- return $this;
- }
-
- /**
- * Deprecated. Use `inline_result.transcript` instead.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true];
- * @return \Google\Cloud\Speech\V2\BatchRecognizeResults|null
- * @deprecated
- */
- public function getTranscript()
- {
- @trigger_error('transcript is deprecated.', E_USER_DEPRECATED);
- return $this->transcript;
- }
-
- public function hasTranscript()
- {
- @trigger_error('transcript is deprecated.', E_USER_DEPRECATED);
- return isset($this->transcript);
- }
-
- public function clearTranscript()
- {
- @trigger_error('transcript is deprecated.', E_USER_DEPRECATED);
- unset($this->transcript);
- }
-
- /**
- * Deprecated. Use `inline_result.transcript` instead.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeResults transcript = 4 [deprecated = true];
- * @param \Google\Cloud\Speech\V2\BatchRecognizeResults $var
- * @return $this
- * @deprecated
- */
- public function setTranscript($var)
- {
- @trigger_error('transcript is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\BatchRecognizeResults::class);
- $this->transcript = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getResult()
- {
- return $this->whichOneof("result");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeMetadata.php
deleted file mode 100644
index 88e0300d88ea..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeMetadata.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeMetadata
- */
-class BatchRecognizeMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Map from provided filename to the transcription metadata for that file.
- *
- * Generated from protobuf field map transcription_metadata = 1;
- */
- private $transcription_metadata;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $transcription_metadata
- * Map from provided filename to the transcription metadata for that file.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Map from provided filename to the transcription metadata for that file.
- *
- * Generated from protobuf field map transcription_metadata = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getTranscriptionMetadata()
- {
- return $this->transcription_metadata;
- }
-
- /**
- * Map from provided filename to the transcription metadata for that file.
- *
- * Generated from protobuf field map transcription_metadata = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setTranscriptionMetadata($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\BatchRecognizeTranscriptionMetadata::class);
- $this->transcription_metadata = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeRequest.php
deleted file mode 100644
index 5911dbb5b205..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeRequest.php
+++ /dev/null
@@ -1,394 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeRequest
- */
-class BatchRecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $recognizer = '';
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 4;
- */
- protected $config = null;
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
- * the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all given fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 5;
- */
- protected $config_mask = null;
- /**
- * Audio files with file metadata for ASR.
- * The maximum number of files allowed to be specified is 15.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.BatchRecognizeFileMetadata files = 3;
- */
- private $files;
- /**
- * Configuration options for where to output the transcripts of each file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionOutputConfig recognition_output_config = 6;
- */
- protected $recognition_output_config = null;
- /**
- * Processing strategy to use for this request.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy processing_strategy = 7;
- */
- protected $processing_strategy = 0;
-
- /**
- * @param string $recognizer Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer. Please see
- * {@see SpeechClient::recognizerName()} for help formatting this field.
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $config Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @param \Google\Protobuf\FieldMask $configMask The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
- * the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all given fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @param \Google\Cloud\Speech\V2\BatchRecognizeFileMetadata[] $files Audio files with file metadata for ASR.
- * The maximum number of files allowed to be specified is 15.
- *
- * @return \Google\Cloud\Speech\V2\BatchRecognizeRequest
- *
- * @experimental
- */
- public static function build(string $recognizer, \Google\Cloud\Speech\V2\RecognitionConfig $config, \Google\Protobuf\FieldMask $configMask, array $files): self
- {
- return (new self())
- ->setRecognizer($recognizer)
- ->setConfig($config)
- ->setConfigMask($configMask)
- ->setFiles($files);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $recognizer
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- * @type \Google\Cloud\Speech\V2\RecognitionConfig $config
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @type \Google\Protobuf\FieldMask $config_mask
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
- * the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all given fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @type array<\Google\Cloud\Speech\V2\BatchRecognizeFileMetadata>|\Google\Protobuf\Internal\RepeatedField $files
- * Audio files with file metadata for ASR.
- * The maximum number of files allowed to be specified is 15.
- * @type \Google\Cloud\Speech\V2\RecognitionOutputConfig $recognition_output_config
- * Configuration options for where to output the transcripts of each file.
- * @type int $processing_strategy
- * Processing strategy to use for this request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getRecognizer()
- {
- return $this->recognizer;
- }
-
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setRecognizer($var)
- {
- GPBUtil::checkString($var, True);
- $this->recognizer = $var;
-
- return $this;
- }
-
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 4;
- * @return \Google\Cloud\Speech\V2\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 4;
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
- * the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all given fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 5;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getConfigMask()
- {
- return $this->config_mask;
- }
-
- public function hasConfigMask()
- {
- return isset($this->config_mask);
- }
-
- public function clearConfigMask()
- {
- unset($this->config_mask);
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
- * the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all given fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 5;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setConfigMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->config_mask = $var;
-
- return $this;
- }
-
- /**
- * Audio files with file metadata for ASR.
- * The maximum number of files allowed to be specified is 15.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.BatchRecognizeFileMetadata files = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getFiles()
- {
- return $this->files;
- }
-
- /**
- * Audio files with file metadata for ASR.
- * The maximum number of files allowed to be specified is 15.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.BatchRecognizeFileMetadata files = 3;
- * @param array<\Google\Cloud\Speech\V2\BatchRecognizeFileMetadata>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setFiles($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\BatchRecognizeFileMetadata::class);
- $this->files = $arr;
-
- return $this;
- }
-
- /**
- * Configuration options for where to output the transcripts of each file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionOutputConfig recognition_output_config = 6;
- * @return \Google\Cloud\Speech\V2\RecognitionOutputConfig|null
- */
- public function getRecognitionOutputConfig()
- {
- return $this->recognition_output_config;
- }
-
- public function hasRecognitionOutputConfig()
- {
- return isset($this->recognition_output_config);
- }
-
- public function clearRecognitionOutputConfig()
- {
- unset($this->recognition_output_config);
- }
-
- /**
- * Configuration options for where to output the transcripts of each file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionOutputConfig recognition_output_config = 6;
- * @param \Google\Cloud\Speech\V2\RecognitionOutputConfig $var
- * @return $this
- */
- public function setRecognitionOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionOutputConfig::class);
- $this->recognition_output_config = $var;
-
- return $this;
- }
-
- /**
- * Processing strategy to use for this request.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy processing_strategy = 7;
- * @return int
- */
- public function getProcessingStrategy()
- {
- return $this->processing_strategy;
- }
-
- /**
- * Processing strategy to use for this request.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy processing_strategy = 7;
- * @param int $var
- * @return $this
- */
- public function setProcessingStrategy($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\BatchRecognizeRequest\ProcessingStrategy::class);
- $this->processing_strategy = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeRequest/ProcessingStrategy.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeRequest/ProcessingStrategy.php
deleted file mode 100644
index b3d7931ff739..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeRequest/ProcessingStrategy.php
+++ /dev/null
@@ -1,59 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeRequest.ProcessingStrategy
- */
-class ProcessingStrategy
-{
- /**
- * Default value for the processing strategy. The request is processed as
- * soon as its received.
- *
- * Generated from protobuf enum PROCESSING_STRATEGY_UNSPECIFIED = 0;
- */
- const PROCESSING_STRATEGY_UNSPECIFIED = 0;
- /**
- * If selected, processes the request during lower utilization periods for a
- * price discount. The request is fulfilled within 24 hours.
- *
- * Generated from protobuf enum DYNAMIC_BATCHING = 1;
- */
- const DYNAMIC_BATCHING = 1;
-
- private static $valueToName = [
- self::PROCESSING_STRATEGY_UNSPECIFIED => 'PROCESSING_STRATEGY_UNSPECIFIED',
- self::DYNAMIC_BATCHING => 'DYNAMIC_BATCHING',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ProcessingStrategy::class, \Google\Cloud\Speech\V2\BatchRecognizeRequest_ProcessingStrategy::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeResponse.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeResponse.php
deleted file mode 100644
index 15208fb3679e..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeResponse.php
+++ /dev/null
@@ -1,113 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeResponse
- */
-class BatchRecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Map from filename to the final result for that file.
- *
- * Generated from protobuf field map results = 1;
- */
- private $results;
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_duration = 2;
- */
- protected $total_billed_duration = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $results
- * Map from filename to the final result for that file.
- * @type \Google\Protobuf\Duration $total_billed_duration
- * When available, billed audio seconds for the corresponding request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Map from filename to the final result for that file.
- *
- * Generated from protobuf field map results = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Map from filename to the final result for that file.
- *
- * Generated from protobuf field map results = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\BatchRecognizeFileResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_duration = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledDuration()
- {
- return $this->total_billed_duration;
- }
-
- public function hasTotalBilledDuration()
- {
- return isset($this->total_billed_duration);
- }
-
- public function clearTotalBilledDuration()
- {
- unset($this->total_billed_duration);
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_duration = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledDuration($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_duration = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeResults.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeResults.php
deleted file mode 100644
index 13eaa4ea4bad..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeResults.php
+++ /dev/null
@@ -1,117 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeResults
- */
-class BatchRecognizeResults extends \Google\Protobuf\Internal\Message
-{
- /**
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 1;
- */
- private $results;
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;
- */
- protected $metadata = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- * @type \Google\Cloud\Speech\V2\RecognitionResponseMetadata $metadata
- * Metadata about the recognition.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 1;
- * @param array<\Google\Cloud\Speech\V2\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\SpeechRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;
- * @return \Google\Cloud\Speech\V2\RecognitionResponseMetadata|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;
- * @param \Google\Cloud\Speech\V2\RecognitionResponseMetadata $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionResponseMetadata::class);
- $this->metadata = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeTranscriptionMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeTranscriptionMetadata.php
deleted file mode 100644
index 1b9a62e2c445..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/BatchRecognizeTranscriptionMetadata.php
+++ /dev/null
@@ -1,146 +0,0 @@
-google.cloud.speech.v2.BatchRecognizeTranscriptionMetadata
- */
-class BatchRecognizeTranscriptionMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * How much of the file has been transcribed so far.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- */
- protected $progress_percent = 0;
- /**
- * Error if one was encountered.
- *
- * Generated from protobuf field .google.rpc.Status error = 2;
- */
- protected $error = null;
- /**
- * The Cloud Storage URI to which recognition results will be written.
- *
- * Generated from protobuf field string uri = 3;
- */
- protected $uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $progress_percent
- * How much of the file has been transcribed so far.
- * @type \Google\Rpc\Status $error
- * Error if one was encountered.
- * @type string $uri
- * The Cloud Storage URI to which recognition results will be written.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * How much of the file has been transcribed so far.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- * @return int
- */
- public function getProgressPercent()
- {
- return $this->progress_percent;
- }
-
- /**
- * How much of the file has been transcribed so far.
- *
- * Generated from protobuf field int32 progress_percent = 1;
- * @param int $var
- * @return $this
- */
- public function setProgressPercent($var)
- {
- GPBUtil::checkInt32($var);
- $this->progress_percent = $var;
-
- return $this;
- }
-
- /**
- * Error if one was encountered.
- *
- * Generated from protobuf field .google.rpc.Status error = 2;
- * @return \Google\Rpc\Status|null
- */
- public function getError()
- {
- return $this->error;
- }
-
- public function hasError()
- {
- return isset($this->error);
- }
-
- public function clearError()
- {
- unset($this->error);
- }
-
- /**
- * Error if one was encountered.
- *
- * Generated from protobuf field .google.rpc.Status error = 2;
- * @param \Google\Rpc\Status $var
- * @return $this
- */
- public function setError($var)
- {
- GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
- $this->error = $var;
-
- return $this;
- }
-
- /**
- * The Cloud Storage URI to which recognition results will be written.
- *
- * Generated from protobuf field string uri = 3;
- * @return string
- */
- public function getUri()
- {
- return $this->uri;
- }
-
- /**
- * The Cloud Storage URI to which recognition results will be written.
- *
- * Generated from protobuf field string uri = 3;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CloudStorageResult.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CloudStorageResult.php
deleted file mode 100644
index 18f7ad197089..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CloudStorageResult.php
+++ /dev/null
@@ -1,143 +0,0 @@
-google.cloud.speech.v2.CloudStorageResult
- */
-class CloudStorageResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * The Cloud Storage URI to which recognition results were written.
- *
- * Generated from protobuf field string uri = 1;
- */
- protected $uri = '';
- /**
- * The Cloud Storage URI to which recognition results were written as VTT
- * formatted captions. This is populated only when `VTT` output is requested.
- *
- * Generated from protobuf field string vtt_format_uri = 2;
- */
- protected $vtt_format_uri = '';
- /**
- * The Cloud Storage URI to which recognition results were written as SRT
- * formatted captions. This is populated only when `SRT` output is requested.
- *
- * Generated from protobuf field string srt_format_uri = 3;
- */
- protected $srt_format_uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $uri
- * The Cloud Storage URI to which recognition results were written.
- * @type string $vtt_format_uri
- * The Cloud Storage URI to which recognition results were written as VTT
- * formatted captions. This is populated only when `VTT` output is requested.
- * @type string $srt_format_uri
- * The Cloud Storage URI to which recognition results were written as SRT
- * formatted captions. This is populated only when `SRT` output is requested.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The Cloud Storage URI to which recognition results were written.
- *
- * Generated from protobuf field string uri = 1;
- * @return string
- */
- public function getUri()
- {
- return $this->uri;
- }
-
- /**
- * The Cloud Storage URI to which recognition results were written.
- *
- * Generated from protobuf field string uri = 1;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->uri = $var;
-
- return $this;
- }
-
- /**
- * The Cloud Storage URI to which recognition results were written as VTT
- * formatted captions. This is populated only when `VTT` output is requested.
- *
- * Generated from protobuf field string vtt_format_uri = 2;
- * @return string
- */
- public function getVttFormatUri()
- {
- return $this->vtt_format_uri;
- }
-
- /**
- * The Cloud Storage URI to which recognition results were written as VTT
- * formatted captions. This is populated only when `VTT` output is requested.
- *
- * Generated from protobuf field string vtt_format_uri = 2;
- * @param string $var
- * @return $this
- */
- public function setVttFormatUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->vtt_format_uri = $var;
-
- return $this;
- }
-
- /**
- * The Cloud Storage URI to which recognition results were written as SRT
- * formatted captions. This is populated only when `SRT` output is requested.
- *
- * Generated from protobuf field string srt_format_uri = 3;
- * @return string
- */
- public function getSrtFormatUri()
- {
- return $this->srt_format_uri;
- }
-
- /**
- * The Cloud Storage URI to which recognition results were written as SRT
- * formatted captions. This is populated only when `SRT` output is requested.
- *
- * Generated from protobuf field string srt_format_uri = 3;
- * @param string $var
- * @return $this
- */
- public function setSrtFormatUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->srt_format_uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Config.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Config.php
deleted file mode 100644
index 019e7262f3c4..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Config.php
+++ /dev/null
@@ -1,175 +0,0 @@
-google.cloud.speech.v2.Config
- */
-class Config extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. Identifier. The name of the config resource. There is exactly
- * one config resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- */
- protected $name = '';
- /**
- * Optional. An optional [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if
- * present, will be used to encrypt Speech-to-Text resources at-rest. Updating
- * this key will not encrypt existing resources using this key; only new
- * resources will be encrypted using this key. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
- */
- protected $kms_key_name = '';
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Output only. Identifier. The name of the config resource. There is exactly
- * one config resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- * @type string $kms_key_name
- * Optional. An optional [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if
- * present, will be used to encrypt Speech-to-Text resources at-rest. Updating
- * this key will not encrypt existing resources using this key; only new
- * resources will be encrypted using this key. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The most recent time this resource was modified.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. Identifier. The name of the config resource. There is exactly
- * one config resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Output only. Identifier. The name of the config resource. There is exactly
- * one config resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Optional. An optional [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if
- * present, will be used to encrypt Speech-to-Text resources at-rest. Updating
- * this key will not encrypt existing resources using this key; only new
- * resources will be encrypted using this key. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyName()
- {
- return $this->kms_key_name;
- }
-
- /**
- * Optional. An optional [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if
- * present, will be used to encrypt Speech-to-Text resources at-rest. Updating
- * this key will not encrypt existing resources using this key; only new
- * resources will be encrypted using this key. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreateCustomClassRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreateCustomClassRequest.php
deleted file mode 100644
index fa3249a8c43f..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreateCustomClassRequest.php
+++ /dev/null
@@ -1,223 +0,0 @@
-google.cloud.speech.v2.CreateCustomClassRequest
- */
-class CreateCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The CustomClass to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class = null;
- /**
- * If set, validate the request and preview the CustomClass, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- */
- protected $validate_only = false;
- /**
- * The ID to use for the CustomClass, which will become the final component of
- * the CustomClass's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string custom_class_id = 3;
- */
- protected $custom_class_id = '';
- /**
- * Required. The project and location where this CustomClass will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
-
- /**
- * @param string $parent Required. The project and location where this CustomClass will be created.
- * The expected format is `projects/{project}/locations/{location}`. Please see
- * {@see SpeechClient::locationName()} for help formatting this field.
- * @param \Google\Cloud\Speech\V2\CustomClass $customClass Required. The CustomClass to create.
- * @param string $customClassId The ID to use for the CustomClass, which will become the final component of
- * the CustomClass's resource name.
- *
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * @return \Google\Cloud\Speech\V2\CreateCustomClassRequest
- *
- * @experimental
- */
- public static function build(string $parent, \Google\Cloud\Speech\V2\CustomClass $customClass, string $customClassId): self
- {
- return (new self())
- ->setParent($parent)
- ->setCustomClass($customClass)
- ->setCustomClassId($customClassId);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\CustomClass $custom_class
- * Required. The CustomClass to create.
- * @type bool $validate_only
- * If set, validate the request and preview the CustomClass, but do not
- * actually create it.
- * @type string $custom_class_id
- * The ID to use for the CustomClass, which will become the final component of
- * the CustomClass's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- * @type string $parent
- * Required. The project and location where this CustomClass will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The CustomClass to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\CustomClass|null
- */
- public function getCustomClass()
- {
- return $this->custom_class;
- }
-
- public function hasCustomClass()
- {
- return isset($this->custom_class);
- }
-
- public function clearCustomClass()
- {
- unset($this->custom_class);
- }
-
- /**
- * Required. The CustomClass to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\CustomClass $var
- * @return $this
- */
- public function setCustomClass($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CustomClass::class);
- $this->custom_class = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the CustomClass, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the CustomClass, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * The ID to use for the CustomClass, which will become the final component of
- * the CustomClass's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string custom_class_id = 3;
- * @return string
- */
- public function getCustomClassId()
- {
- return $this->custom_class_id;
- }
-
- /**
- * The ID to use for the CustomClass, which will become the final component of
- * the CustomClass's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string custom_class_id = 3;
- * @param string $var
- * @return $this
- */
- public function setCustomClassId($var)
- {
- GPBUtil::checkString($var, True);
- $this->custom_class_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The project and location where this CustomClass will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The project and location where this CustomClass will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreatePhraseSetRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreatePhraseSetRequest.php
deleted file mode 100644
index 4abc0e6001ff..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreatePhraseSetRequest.php
+++ /dev/null
@@ -1,223 +0,0 @@
-google.cloud.speech.v2.CreatePhraseSetRequest
- */
-class CreatePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The PhraseSet to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set = null;
- /**
- * If set, validate the request and preview the PhraseSet, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- */
- protected $validate_only = false;
- /**
- * The ID to use for the PhraseSet, which will become the final component of
- * the PhraseSet's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string phrase_set_id = 3;
- */
- protected $phrase_set_id = '';
- /**
- * Required. The project and location where this PhraseSet will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
-
- /**
- * @param string $parent Required. The project and location where this PhraseSet will be created.
- * The expected format is `projects/{project}/locations/{location}`. Please see
- * {@see SpeechClient::locationName()} for help formatting this field.
- * @param \Google\Cloud\Speech\V2\PhraseSet $phraseSet Required. The PhraseSet to create.
- * @param string $phraseSetId The ID to use for the PhraseSet, which will become the final component of
- * the PhraseSet's resource name.
- *
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * @return \Google\Cloud\Speech\V2\CreatePhraseSetRequest
- *
- * @experimental
- */
- public static function build(string $parent, \Google\Cloud\Speech\V2\PhraseSet $phraseSet, string $phraseSetId): self
- {
- return (new self())
- ->setParent($parent)
- ->setPhraseSet($phraseSet)
- ->setPhraseSetId($phraseSetId);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\PhraseSet $phrase_set
- * Required. The PhraseSet to create.
- * @type bool $validate_only
- * If set, validate the request and preview the PhraseSet, but do not
- * actually create it.
- * @type string $phrase_set_id
- * The ID to use for the PhraseSet, which will become the final component of
- * the PhraseSet's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- * @type string $parent
- * Required. The project and location where this PhraseSet will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The PhraseSet to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\PhraseSet|null
- */
- public function getPhraseSet()
- {
- return $this->phrase_set;
- }
-
- public function hasPhraseSet()
- {
- return isset($this->phrase_set);
- }
-
- public function clearPhraseSet()
- {
- unset($this->phrase_set);
- }
-
- /**
- * Required. The PhraseSet to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\PhraseSet $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\PhraseSet::class);
- $this->phrase_set = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the PhraseSet, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the PhraseSet, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * The ID to use for the PhraseSet, which will become the final component of
- * the PhraseSet's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string phrase_set_id = 3;
- * @return string
- */
- public function getPhraseSetId()
- {
- return $this->phrase_set_id;
- }
-
- /**
- * The ID to use for the PhraseSet, which will become the final component of
- * the PhraseSet's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string phrase_set_id = 3;
- * @param string $var
- * @return $this
- */
- public function setPhraseSetId($var)
- {
- GPBUtil::checkString($var, True);
- $this->phrase_set_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The project and location where this PhraseSet will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The project and location where this PhraseSet will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreateRecognizerRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreateRecognizerRequest.php
deleted file mode 100644
index 5b6d1b863c64..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CreateRecognizerRequest.php
+++ /dev/null
@@ -1,223 +0,0 @@
-google.cloud.speech.v2.CreateRecognizerRequest
- */
-class CreateRecognizerRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The Recognizer to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer recognizer = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $recognizer = null;
- /**
- * If set, validate the request and preview the Recognizer, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- */
- protected $validate_only = false;
- /**
- * The ID to use for the Recognizer, which will become the final component of
- * the Recognizer's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string recognizer_id = 3;
- */
- protected $recognizer_id = '';
- /**
- * Required. The project and location where this Recognizer will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
-
- /**
- * @param string $parent Required. The project and location where this Recognizer will be created.
- * The expected format is `projects/{project}/locations/{location}`. Please see
- * {@see SpeechClient::locationName()} for help formatting this field.
- * @param \Google\Cloud\Speech\V2\Recognizer $recognizer Required. The Recognizer to create.
- * @param string $recognizerId The ID to use for the Recognizer, which will become the final component of
- * the Recognizer's resource name.
- *
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * @return \Google\Cloud\Speech\V2\CreateRecognizerRequest
- *
- * @experimental
- */
- public static function build(string $parent, \Google\Cloud\Speech\V2\Recognizer $recognizer, string $recognizerId): self
- {
- return (new self())
- ->setParent($parent)
- ->setRecognizer($recognizer)
- ->setRecognizerId($recognizerId);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\Recognizer $recognizer
- * Required. The Recognizer to create.
- * @type bool $validate_only
- * If set, validate the request and preview the Recognizer, but do not
- * actually create it.
- * @type string $recognizer_id
- * The ID to use for the Recognizer, which will become the final component of
- * the Recognizer's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- * @type string $parent
- * Required. The project and location where this Recognizer will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The Recognizer to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer recognizer = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\Recognizer|null
- */
- public function getRecognizer()
- {
- return $this->recognizer;
- }
-
- public function hasRecognizer()
- {
- return isset($this->recognizer);
- }
-
- public function clearRecognizer()
- {
- unset($this->recognizer);
- }
-
- /**
- * Required. The Recognizer to create.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer recognizer = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\Recognizer $var
- * @return $this
- */
- public function setRecognizer($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\Recognizer::class);
- $this->recognizer = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the Recognizer, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the Recognizer, but do not
- * actually create it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * The ID to use for the Recognizer, which will become the final component of
- * the Recognizer's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string recognizer_id = 3;
- * @return string
- */
- public function getRecognizerId()
- {
- return $this->recognizer_id;
- }
-
- /**
- * The ID to use for the Recognizer, which will become the final component of
- * the Recognizer's resource name.
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- *
- * Generated from protobuf field string recognizer_id = 3;
- * @param string $var
- * @return $this
- */
- public function setRecognizerId($var)
- {
- GPBUtil::checkString($var, True);
- $this->recognizer_id = $var;
-
- return $this;
- }
-
- /**
- * Required. The project and location where this Recognizer will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The project and location where this Recognizer will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass.php
deleted file mode 100644
index d057d52eae75..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass.php
+++ /dev/null
@@ -1,607 +0,0 @@
-google.cloud.speech.v2.CustomClass
- */
-class CustomClass extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. Identifier. The resource name of the CustomClass.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- */
- protected $name = '';
- /**
- * Output only. System-assigned unique identifier for the CustomClass.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
- /**
- * Optional. User-settable, human-readable name for the CustomClass. Must be
- * 63 characters or less.
- *
- * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $display_name = '';
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass.ClassItem items = 5;
- */
- private $items;
- /**
- * Output only. The CustomClass lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * Output only. The time at which this resource was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $delete_time = null;
- /**
- * Output only. The time at which this resource will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $expire_time = null;
- /**
- * Optional. Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 10 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $annotations;
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $etag = '';
- /**
- * Output only. Whether or not this CustomClass is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $reconciling = false;
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $kms_key_name = '';
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $kms_key_version_name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Output only. Identifier. The resource name of the CustomClass.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- * @type string $uid
- * Output only. System-assigned unique identifier for the CustomClass.
- * @type string $display_name
- * Optional. User-settable, human-readable name for the CustomClass. Must be
- * 63 characters or less.
- * @type array<\Google\Cloud\Speech\V2\CustomClass\ClassItem>|\Google\Protobuf\Internal\RepeatedField $items
- * A collection of class items.
- * @type int $state
- * Output only. The CustomClass lifecycle state.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. Creation time.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The most recent time this resource was modified.
- * @type \Google\Protobuf\Timestamp $delete_time
- * Output only. The time at which this resource was requested for deletion.
- * @type \Google\Protobuf\Timestamp $expire_time
- * Output only. The time at which this resource will be purged.
- * @type array|\Google\Protobuf\Internal\MapField $annotations
- * Optional. Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- * @type string $etag
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- * @type bool $reconciling
- * Output only. Whether or not this CustomClass is in the process of being
- * updated.
- * @type string $kms_key_name
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- * @type string $kms_key_version_name
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. Identifier. The resource name of the CustomClass.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Output only. Identifier. The resource name of the CustomClass.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. System-assigned unique identifier for the CustomClass.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. System-assigned unique identifier for the CustomClass.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
- /**
- * Optional. User-settable, human-readable name for the CustomClass. Must be
- * 63 characters or less.
- *
- * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getDisplayName()
- {
- return $this->display_name;
- }
-
- /**
- * Optional. User-settable, human-readable name for the CustomClass. Must be
- * 63 characters or less.
- *
- * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setDisplayName($var)
- {
- GPBUtil::checkString($var, True);
- $this->display_name = $var;
-
- return $this;
- }
-
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass.ClassItem items = 5;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getItems()
- {
- return $this->items;
- }
-
- /**
- * A collection of class items.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass.ClassItem items = 5;
- * @param array<\Google\Cloud\Speech\V2\CustomClass\ClassItem>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setItems($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\CustomClass\ClassItem::class);
- $this->items = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The CustomClass lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The CustomClass lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\CustomClass\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this resource was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getDeleteTime()
- {
- return $this->delete_time;
- }
-
- public function hasDeleteTime()
- {
- return isset($this->delete_time);
- }
-
- public function clearDeleteTime()
- {
- unset($this->delete_time);
- }
-
- /**
- * Output only. The time at which this resource was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setDeleteTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->delete_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this resource will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getExpireTime()
- {
- return $this->expire_time;
- }
-
- public function hasExpireTime()
- {
- return isset($this->expire_time);
- }
-
- public function clearExpireTime()
- {
- unset($this->expire_time);
- }
-
- /**
- * Output only. The time at which this resource will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setExpireTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->expire_time = $var;
-
- return $this;
- }
-
- /**
- * Optional. Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 10 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAnnotations()
- {
- return $this->annotations;
- }
-
- /**
- * Optional. Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 10 [(.google.api.field_behavior) = OPTIONAL];
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAnnotations($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->annotations = $arr;
-
- return $this;
- }
-
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
- /**
- * Output only. Whether or not this CustomClass is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return bool
- */
- public function getReconciling()
- {
- return $this->reconciling;
- }
-
- /**
- * Output only. Whether or not this CustomClass is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param bool $var
- * @return $this
- */
- public function setReconciling($var)
- {
- GPBUtil::checkBool($var);
- $this->reconciling = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyName()
- {
- return $this->kms_key_name;
- }
-
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyVersionName()
- {
- return $this->kms_key_version_name;
- }
-
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the CustomClass is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyVersionName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_version_name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass/ClassItem.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass/ClassItem.php
deleted file mode 100644
index 2d334e99c35a..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass/ClassItem.php
+++ /dev/null
@@ -1,70 +0,0 @@
-google.cloud.speech.v2.CustomClass.ClassItem
- */
-class ClassItem extends \Google\Protobuf\Internal\Message
-{
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- */
- protected $value = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $value
- * The class item's value.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The class item's value.
- *
- * Generated from protobuf field string value = 1;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(ClassItem::class, \Google\Cloud\Speech\V2\CustomClass_ClassItem::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass/State.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass/State.php
deleted file mode 100644
index 52084f79eac4..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/CustomClass/State.php
+++ /dev/null
@@ -1,65 +0,0 @@
-google.cloud.speech.v2.CustomClass.State
- */
-class State
-{
- /**
- * Unspecified state. This is only used/useful for distinguishing
- * unset values.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The normal and active state.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * This CustomClass has been deleted.
- *
- * Generated from protobuf enum DELETED = 4;
- */
- const DELETED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::ACTIVE => 'ACTIVE',
- self::DELETED => 'DELETED',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Speech\V2\CustomClass_State::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeleteCustomClassRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeleteCustomClassRequest.php
deleted file mode 100644
index 6eab8c7f32dd..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeleteCustomClassRequest.php
+++ /dev/null
@@ -1,210 +0,0 @@
-google.cloud.speech.v2.DeleteCustomClassRequest
- */
-class DeleteCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the CustomClass to delete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * If set, validate the request and preview the deleted CustomClass, but do
- * not actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- */
- protected $validate_only = false;
- /**
- * If set to true, and the CustomClass is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- */
- protected $allow_missing = false;
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- */
- protected $etag = '';
-
- /**
- * @param string $name Required. The name of the CustomClass to delete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Please see {@see SpeechClient::customClassName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\DeleteCustomClassRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the CustomClass to delete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * @type bool $validate_only
- * If set, validate the request and preview the deleted CustomClass, but do
- * not actually delete it.
- * @type bool $allow_missing
- * If set to true, and the CustomClass is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the CustomClass to delete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the CustomClass to delete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the deleted CustomClass, but do
- * not actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the deleted CustomClass, but do
- * not actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * If set to true, and the CustomClass is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- * @return bool
- */
- public function getAllowMissing()
- {
- return $this->allow_missing;
- }
-
- /**
- * If set to true, and the CustomClass is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- * @param bool $var
- * @return $this
- */
- public function setAllowMissing($var)
- {
- GPBUtil::checkBool($var);
- $this->allow_missing = $var;
-
- return $this;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeletePhraseSetRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeletePhraseSetRequest.php
deleted file mode 100644
index e9d844590db3..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeletePhraseSetRequest.php
+++ /dev/null
@@ -1,205 +0,0 @@
-google.cloud.speech.v2.DeletePhraseSetRequest
- */
-class DeletePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the PhraseSet to delete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * If set, validate the request and preview the deleted PhraseSet, but do not
- * actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- */
- protected $validate_only = false;
- /**
- * If set to true, and the PhraseSet is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- */
- protected $allow_missing = false;
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- */
- protected $etag = '';
-
- /**
- * @param string $name Required. The name of the PhraseSet to delete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Please see {@see SpeechClient::phraseSetName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\DeletePhraseSetRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the PhraseSet to delete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * @type bool $validate_only
- * If set, validate the request and preview the deleted PhraseSet, but do not
- * actually delete it.
- * @type bool $allow_missing
- * If set to true, and the PhraseSet is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the PhraseSet to delete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the PhraseSet to delete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the deleted PhraseSet, but do not
- * actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the deleted PhraseSet, but do not
- * actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * If set to true, and the PhraseSet is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- * @return bool
- */
- public function getAllowMissing()
- {
- return $this->allow_missing;
- }
-
- /**
- * If set to true, and the PhraseSet is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- * @param bool $var
- * @return $this
- */
- public function setAllowMissing($var)
- {
- GPBUtil::checkBool($var);
- $this->allow_missing = $var;
-
- return $this;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeleteRecognizerRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeleteRecognizerRequest.php
deleted file mode 100644
index cc7d6f743c23..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/DeleteRecognizerRequest.php
+++ /dev/null
@@ -1,205 +0,0 @@
-google.cloud.speech.v2.DeleteRecognizerRequest
- */
-class DeleteRecognizerRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Recognizer to delete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * If set, validate the request and preview the deleted Recognizer, but do not
- * actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- */
- protected $validate_only = false;
- /**
- * If set to true, and the Recognizer is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- */
- protected $allow_missing = false;
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- */
- protected $etag = '';
-
- /**
- * @param string $name Required. The name of the Recognizer to delete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- * Please see {@see SpeechClient::recognizerName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\DeleteRecognizerRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the Recognizer to delete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- * @type bool $validate_only
- * If set, validate the request and preview the deleted Recognizer, but do not
- * actually delete it.
- * @type bool $allow_missing
- * If set to true, and the Recognizer is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Recognizer to delete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the Recognizer to delete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the deleted Recognizer, but do not
- * actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the deleted Recognizer, but do not
- * actually delete it.
- *
- * Generated from protobuf field bool validate_only = 2;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * If set to true, and the Recognizer is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- * @return bool
- */
- public function getAllowMissing()
- {
- return $this->allow_missing;
- }
-
- /**
- * If set to true, and the Recognizer is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- *
- * Generated from protobuf field bool allow_missing = 4;
- * @param bool $var
- * @return $this
- */
- public function setAllowMissing($var)
- {
- GPBUtil::checkBool($var);
- $this->allow_missing = $var;
-
- return $this;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 3;
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ExplicitDecodingConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ExplicitDecodingConfig.php
deleted file mode 100644
index da26dd9f386c..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ExplicitDecodingConfig.php
+++ /dev/null
@@ -1,167 +0,0 @@
-google.cloud.speech.v2.ExplicitDecodingConfig
- */
-class ExplicitDecodingConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Encoding of the audio data sent for recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding encoding = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $encoding = 0;
- /**
- * Optional. Sample rate in Hertz of the audio data sent for recognition.
- * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
- * sampling rate of the audio source to 16000 Hz. If that's not possible, use
- * the native sample rate of the audio source (instead of re-sampling).
- * Note that this field is marked as OPTIONAL for backward compatibility
- * reasons. It is (and has always been) effectively REQUIRED.
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $sample_rate_hertz = 0;
- /**
- * Optional. Number of channels present in the audio data sent for
- * recognition. Note that this field is marked as OPTIONAL for backward
- * compatibility reasons. It is (and has always been) effectively REQUIRED.
- * The maximum allowed value is 8.
- *
- * Generated from protobuf field int32 audio_channel_count = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $audio_channel_count = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $encoding
- * Required. Encoding of the audio data sent for recognition.
- * @type int $sample_rate_hertz
- * Optional. Sample rate in Hertz of the audio data sent for recognition.
- * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
- * sampling rate of the audio source to 16000 Hz. If that's not possible, use
- * the native sample rate of the audio source (instead of re-sampling).
- * Note that this field is marked as OPTIONAL for backward compatibility
- * reasons. It is (and has always been) effectively REQUIRED.
- * @type int $audio_channel_count
- * Optional. Number of channels present in the audio data sent for
- * recognition. Note that this field is marked as OPTIONAL for backward
- * compatibility reasons. It is (and has always been) effectively REQUIRED.
- * The maximum allowed value is 8.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Encoding of the audio data sent for recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding encoding = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getEncoding()
- {
- return $this->encoding;
- }
-
- /**
- * Required. Encoding of the audio data sent for recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding encoding = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setEncoding($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\ExplicitDecodingConfig\AudioEncoding::class);
- $this->encoding = $var;
-
- return $this;
- }
-
- /**
- * Optional. Sample rate in Hertz of the audio data sent for recognition.
- * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
- * sampling rate of the audio source to 16000 Hz. If that's not possible, use
- * the native sample rate of the audio source (instead of re-sampling).
- * Note that this field is marked as OPTIONAL for backward compatibility
- * reasons. It is (and has always been) effectively REQUIRED.
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getSampleRateHertz()
- {
- return $this->sample_rate_hertz;
- }
-
- /**
- * Optional. Sample rate in Hertz of the audio data sent for recognition.
- * Valid values are: 8000-48000. 16000 is optimal. For best results, set the
- * sampling rate of the audio source to 16000 Hz. If that's not possible, use
- * the native sample rate of the audio source (instead of re-sampling).
- * Note that this field is marked as OPTIONAL for backward compatibility
- * reasons. It is (and has always been) effectively REQUIRED.
- *
- * Generated from protobuf field int32 sample_rate_hertz = 2 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setSampleRateHertz($var)
- {
- GPBUtil::checkInt32($var);
- $this->sample_rate_hertz = $var;
-
- return $this;
- }
-
- /**
- * Optional. Number of channels present in the audio data sent for
- * recognition. Note that this field is marked as OPTIONAL for backward
- * compatibility reasons. It is (and has always been) effectively REQUIRED.
- * The maximum allowed value is 8.
- *
- * Generated from protobuf field int32 audio_channel_count = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return int
- */
- public function getAudioChannelCount()
- {
- return $this->audio_channel_count;
- }
-
- /**
- * Optional. Number of channels present in the audio data sent for
- * recognition. Note that this field is marked as OPTIONAL for backward
- * compatibility reasons. It is (and has always been) effectively REQUIRED.
- * The maximum allowed value is 8.
- *
- * Generated from protobuf field int32 audio_channel_count = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param int $var
- * @return $this
- */
- public function setAudioChannelCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->audio_channel_count = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ExplicitDecodingConfig/AudioEncoding.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ExplicitDecodingConfig/AudioEncoding.php
deleted file mode 100644
index d4d99cfe4b9b..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ExplicitDecodingConfig/AudioEncoding.php
+++ /dev/null
@@ -1,134 +0,0 @@
-google.cloud.speech.v2.ExplicitDecodingConfig.AudioEncoding
- */
-class AudioEncoding
-{
- /**
- * Default value. This value is unused.
- *
- * Generated from protobuf enum AUDIO_ENCODING_UNSPECIFIED = 0;
- */
- const AUDIO_ENCODING_UNSPECIFIED = 0;
- /**
- * Headerless 16-bit signed little-endian PCM samples.
- *
- * Generated from protobuf enum LINEAR16 = 1;
- */
- const LINEAR16 = 1;
- /**
- * Headerless 8-bit companded mulaw samples.
- *
- * Generated from protobuf enum MULAW = 2;
- */
- const MULAW = 2;
- /**
- * Headerless 8-bit companded alaw samples.
- *
- * Generated from protobuf enum ALAW = 3;
- */
- const ALAW = 3;
- /**
- * AMR frames with an rfc4867.5 header.
- *
- * Generated from protobuf enum AMR = 4;
- */
- const AMR = 4;
- /**
- * AMR-WB frames with an rfc4867.5 header.
- *
- * Generated from protobuf enum AMR_WB = 5;
- */
- const AMR_WB = 5;
- /**
- * FLAC frames in the "native FLAC" container format.
- *
- * Generated from protobuf enum FLAC = 6;
- */
- const FLAC = 6;
- /**
- * MPEG audio frames with optional (ignored) ID3 metadata.
- *
- * Generated from protobuf enum MP3 = 7;
- */
- const MP3 = 7;
- /**
- * Opus audio frames in an Ogg container.
- *
- * Generated from protobuf enum OGG_OPUS = 8;
- */
- const OGG_OPUS = 8;
- /**
- * Opus audio frames in a WebM container.
- *
- * Generated from protobuf enum WEBM_OPUS = 9;
- */
- const WEBM_OPUS = 9;
- /**
- * AAC audio frames in an MP4 container.
- *
- * Generated from protobuf enum MP4_AAC = 10;
- */
- const MP4_AAC = 10;
- /**
- * AAC audio frames in an M4A container.
- *
- * Generated from protobuf enum M4A_AAC = 11;
- */
- const M4A_AAC = 11;
- /**
- * AAC audio frames in an MOV container.
- *
- * Generated from protobuf enum MOV_AAC = 12;
- */
- const MOV_AAC = 12;
-
- private static $valueToName = [
- self::AUDIO_ENCODING_UNSPECIFIED => 'AUDIO_ENCODING_UNSPECIFIED',
- self::LINEAR16 => 'LINEAR16',
- self::MULAW => 'MULAW',
- self::ALAW => 'ALAW',
- self::AMR => 'AMR',
- self::AMR_WB => 'AMR_WB',
- self::FLAC => 'FLAC',
- self::MP3 => 'MP3',
- self::OGG_OPUS => 'OGG_OPUS',
- self::WEBM_OPUS => 'WEBM_OPUS',
- self::MP4_AAC => 'MP4_AAC',
- self::M4A_AAC => 'M4A_AAC',
- self::MOV_AAC => 'MOV_AAC',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AudioEncoding::class, \Google\Cloud\Speech\V2\ExplicitDecodingConfig_AudioEncoding::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GcsOutputConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GcsOutputConfig.php
deleted file mode 100644
index e06c77d58831..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GcsOutputConfig.php
+++ /dev/null
@@ -1,71 +0,0 @@
-google.cloud.speech.v2.GcsOutputConfig
- */
-class GcsOutputConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * The Cloud Storage URI prefix with which recognition results will be
- * written.
- *
- * Generated from protobuf field string uri = 1;
- */
- protected $uri = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $uri
- * The Cloud Storage URI prefix with which recognition results will be
- * written.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The Cloud Storage URI prefix with which recognition results will be
- * written.
- *
- * Generated from protobuf field string uri = 1;
- * @return string
- */
- public function getUri()
- {
- return $this->uri;
- }
-
- /**
- * The Cloud Storage URI prefix with which recognition results will be
- * written.
- *
- * Generated from protobuf field string uri = 1;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->uri = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetConfigRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetConfigRequest.php
deleted file mode 100644
index f3c3f059af48..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetConfigRequest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-google.cloud.speech.v2.GetConfigRequest
- */
-class GetConfigRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the config to retrieve. There is exactly one config
- * resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * @param string $name Required. The name of the config to retrieve. There is exactly one config
- * resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`. Please see
- * {@see SpeechClient::configName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\GetConfigRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the config to retrieve. There is exactly one config
- * resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the config to retrieve. There is exactly one config
- * resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the config to retrieve. There is exactly one config
- * resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetCustomClassRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetCustomClassRequest.php
deleted file mode 100644
index 65ec28e4bf39..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetCustomClassRequest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-google.cloud.speech.v2.GetCustomClassRequest
- */
-class GetCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the CustomClass to retrieve. The expected format is
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * @param string $name Required. The name of the CustomClass to retrieve. The expected format is
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`. Please see
- * {@see SpeechClient::customClassName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\GetCustomClassRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the CustomClass to retrieve. The expected format is
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the CustomClass to retrieve. The expected format is
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the CustomClass to retrieve. The expected format is
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetPhraseSetRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetPhraseSetRequest.php
deleted file mode 100644
index 37372c8439e0..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetPhraseSetRequest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-google.cloud.speech.v2.GetPhraseSetRequest
- */
-class GetPhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the PhraseSet to retrieve. The expected format is
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * @param string $name Required. The name of the PhraseSet to retrieve. The expected format is
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`. Please see
- * {@see SpeechClient::phraseSetName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\GetPhraseSetRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the PhraseSet to retrieve. The expected format is
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the PhraseSet to retrieve. The expected format is
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the PhraseSet to retrieve. The expected format is
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetRecognizerRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetRecognizerRequest.php
deleted file mode 100644
index 06ffbe0a0800..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/GetRecognizerRequest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-google.cloud.speech.v2.GetRecognizerRequest
- */
-class GetRecognizerRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Recognizer to retrieve. The expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
-
- /**
- * @param string $name Required. The name of the Recognizer to retrieve. The expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. Please see
- * {@see SpeechClient::recognizerName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\GetRecognizerRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the Recognizer to retrieve. The expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Recognizer to retrieve. The expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the Recognizer to retrieve. The expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/InlineOutputConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/InlineOutputConfig.php
deleted file mode 100644
index d5359b1c7052..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/InlineOutputConfig.php
+++ /dev/null
@@ -1,33 +0,0 @@
-google.cloud.speech.v2.InlineOutputConfig
- */
-class InlineOutputConfig extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/InlineResult.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/InlineResult.php
deleted file mode 100644
index 668089d6170d..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/InlineResult.php
+++ /dev/null
@@ -1,153 +0,0 @@
-google.cloud.speech.v2.InlineResult
- */
-class InlineResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * The transcript for the audio file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeResults transcript = 1;
- */
- protected $transcript = null;
- /**
- * The transcript for the audio file as VTT formatted captions. This is
- * populated only when `VTT` output is requested.
- *
- * Generated from protobuf field string vtt_captions = 2;
- */
- protected $vtt_captions = '';
- /**
- * The transcript for the audio file as SRT formatted captions. This is
- * populated only when `SRT` output is requested.
- *
- * Generated from protobuf field string srt_captions = 3;
- */
- protected $srt_captions = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\BatchRecognizeResults $transcript
- * The transcript for the audio file.
- * @type string $vtt_captions
- * The transcript for the audio file as VTT formatted captions. This is
- * populated only when `VTT` output is requested.
- * @type string $srt_captions
- * The transcript for the audio file as SRT formatted captions. This is
- * populated only when `SRT` output is requested.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The transcript for the audio file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeResults transcript = 1;
- * @return \Google\Cloud\Speech\V2\BatchRecognizeResults|null
- */
- public function getTranscript()
- {
- return $this->transcript;
- }
-
- public function hasTranscript()
- {
- return isset($this->transcript);
- }
-
- public function clearTranscript()
- {
- unset($this->transcript);
- }
-
- /**
- * The transcript for the audio file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeResults transcript = 1;
- * @param \Google\Cloud\Speech\V2\BatchRecognizeResults $var
- * @return $this
- */
- public function setTranscript($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\BatchRecognizeResults::class);
- $this->transcript = $var;
-
- return $this;
- }
-
- /**
- * The transcript for the audio file as VTT formatted captions. This is
- * populated only when `VTT` output is requested.
- *
- * Generated from protobuf field string vtt_captions = 2;
- * @return string
- */
- public function getVttCaptions()
- {
- return $this->vtt_captions;
- }
-
- /**
- * The transcript for the audio file as VTT formatted captions. This is
- * populated only when `VTT` output is requested.
- *
- * Generated from protobuf field string vtt_captions = 2;
- * @param string $var
- * @return $this
- */
- public function setVttCaptions($var)
- {
- GPBUtil::checkString($var, True);
- $this->vtt_captions = $var;
-
- return $this;
- }
-
- /**
- * The transcript for the audio file as SRT formatted captions. This is
- * populated only when `SRT` output is requested.
- *
- * Generated from protobuf field string srt_captions = 3;
- * @return string
- */
- public function getSrtCaptions()
- {
- return $this->srt_captions;
- }
-
- /**
- * The transcript for the audio file as SRT formatted captions. This is
- * populated only when `SRT` output is requested.
- *
- * Generated from protobuf field string srt_captions = 3;
- * @param string $var
- * @return $this
- */
- public function setSrtCaptions($var)
- {
- GPBUtil::checkString($var, True);
- $this->srt_captions = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/LanguageMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/LanguageMetadata.php
deleted file mode 100644
index 9262e96ca600..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/LanguageMetadata.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.speech.v2.LanguageMetadata
- */
-class LanguageMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Map of locale (language code) -> models
- *
- * Generated from protobuf field map models = 1;
- */
- private $models;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $models
- * Map of locale (language code) -> models
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\LocationsMetadata::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Map of locale (language code) -> models
- *
- * Generated from protobuf field map models = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getModels()
- {
- return $this->models;
- }
-
- /**
- * Map of locale (language code) -> models
- *
- * Generated from protobuf field map models = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setModels($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\ModelMetadata::class);
- $this->models = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListCustomClassesRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListCustomClassesRequest.php
deleted file mode 100644
index 201fd79bfc62..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListCustomClassesRequest.php
+++ /dev/null
@@ -1,221 +0,0 @@
-google.cloud.speech.v2.ListCustomClassesRequest
- */
-class ListCustomClassesRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The project and location of CustomClass resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * Number of results per requests. A valid page_size ranges from 0 to 100
- * inclusive. If the page_size is zero or unspecified, a page size of 5 will
- * be chosen. If the page size exceeds 100, it will be coerced down to 100.
- * Note that a call might return fewer results than the requested page size.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- */
- protected $show_deleted = false;
-
- /**
- * @param string $parent Required. The project and location of CustomClass resources to list. The
- * expected format is `projects/{project}/locations/{location}`. Please see
- * {@see SpeechClient::locationName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\ListCustomClassesRequest
- *
- * @experimental
- */
- public static function build(string $parent): self
- {
- return (new self())
- ->setParent($parent);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The project and location of CustomClass resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- * @type int $page_size
- * Number of results per requests. A valid page_size ranges from 0 to 100
- * inclusive. If the page_size is zero or unspecified, a page size of 5 will
- * be chosen. If the page size exceeds 100, it will be coerced down to 100.
- * Note that a call might return fewer results than the requested page size.
- * @type string $page_token
- * A page token, received from a previous
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] must
- * match the call that provided the page token.
- * @type bool $show_deleted
- * Whether, or not, to show resources that have been deleted.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The project and location of CustomClass resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The project and location of CustomClass resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * Number of results per requests. A valid page_size ranges from 0 to 100
- * inclusive. If the page_size is zero or unspecified, a page size of 5 will
- * be chosen. If the page size exceeds 100, it will be coerced down to 100.
- * Note that a call might return fewer results than the requested page size.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * Number of results per requests. A valid page_size ranges from 0 to 100
- * inclusive. If the page_size is zero or unspecified, a page size of 5 will
- * be chosen. If the page size exceeds 100, it will be coerced down to 100.
- * Note that a call might return fewer results than the requested page size.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListCustomClasses][google.cloud.speech.v2.Speech.ListCustomClasses] must
- * match the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- * @return bool
- */
- public function getShowDeleted()
- {
- return $this->show_deleted;
- }
-
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- * @param bool $var
- * @return $this
- */
- public function setShowDeleted($var)
- {
- GPBUtil::checkBool($var);
- $this->show_deleted = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListCustomClassesResponse.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListCustomClassesResponse.php
deleted file mode 100644
index 38718bb1ab8f..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListCustomClassesResponse.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.speech.v2.ListCustomClassesResponse
- */
-class ListCustomClassesResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The list of requested CustomClasses.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 1;
- */
- private $custom_classes;
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListCustomClassesRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
- * The list of requested CustomClasses.
- * @type string $next_page_token
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListCustomClassesRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The list of requested CustomClasses.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getCustomClasses()
- {
- return $this->custom_classes;
- }
-
- /**
- * The list of requested CustomClasses.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 1;
- * @param array<\Google\Cloud\Speech\V2\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setCustomClasses($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\CustomClass::class);
- $this->custom_classes = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListCustomClassesRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListCustomClassesRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListPhraseSetsRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListPhraseSetsRequest.php
deleted file mode 100644
index 6e2d406e67e6..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListPhraseSetsRequest.php
+++ /dev/null
@@ -1,217 +0,0 @@
-google.cloud.speech.v2.ListPhraseSetsRequest
- */
-class ListPhraseSetsRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The project and location of PhraseSet resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The maximum number of PhraseSets to return. The service may return fewer
- * than this value. If unspecified, at most 5 PhraseSets will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] must match
- * the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- */
- protected $show_deleted = false;
-
- /**
- * @param string $parent Required. The project and location of PhraseSet resources to list. The
- * expected format is `projects/{project}/locations/{location}`. Please see
- * {@see SpeechClient::locationName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\ListPhraseSetsRequest
- *
- * @experimental
- */
- public static function build(string $parent): self
- {
- return (new self())
- ->setParent($parent);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The project and location of PhraseSet resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- * @type int $page_size
- * The maximum number of PhraseSets to return. The service may return fewer
- * than this value. If unspecified, at most 5 PhraseSets will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- * @type string $page_token
- * A page token, received from a previous
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] must match
- * the call that provided the page token.
- * @type bool $show_deleted
- * Whether, or not, to show resources that have been deleted.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The project and location of PhraseSet resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The project and location of PhraseSet resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of PhraseSets to return. The service may return fewer
- * than this value. If unspecified, at most 5 PhraseSets will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of PhraseSets to return. The service may return fewer
- * than this value. If unspecified, at most 5 PhraseSets will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] must match
- * the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListPhraseSets][google.cloud.speech.v2.Speech.ListPhraseSets] must match
- * the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- * @return bool
- */
- public function getShowDeleted()
- {
- return $this->show_deleted;
- }
-
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- * @param bool $var
- * @return $this
- */
- public function setShowDeleted($var)
- {
- GPBUtil::checkBool($var);
- $this->show_deleted = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListPhraseSetsResponse.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListPhraseSetsResponse.php
deleted file mode 100644
index 5ffe943d36d3..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListPhraseSetsResponse.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.speech.v2.ListPhraseSetsResponse
- */
-class ListPhraseSetsResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The list of requested PhraseSets.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet phrase_sets = 1;
- */
- private $phrase_sets;
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListPhraseSetsRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
- * The list of requested PhraseSets.
- * @type string $next_page_token
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListPhraseSetsRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The list of requested PhraseSets.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet phrase_sets = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSets()
- {
- return $this->phrase_sets;
- }
-
- /**
- * The list of requested PhraseSets.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet phrase_sets = 1;
- * @param array<\Google\Cloud\Speech\V2\PhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSets($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\PhraseSet::class);
- $this->phrase_sets = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListPhraseSetsRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListPhraseSetsRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListRecognizersRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListRecognizersRequest.php
deleted file mode 100644
index ce34f0eb01e0..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListRecognizersRequest.php
+++ /dev/null
@@ -1,217 +0,0 @@
-google.cloud.speech.v2.ListRecognizersRequest
- */
-class ListRecognizersRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The project and location of Recognizers to list. The expected
- * format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $parent = '';
- /**
- * The maximum number of Recognizers to return. The service may return fewer
- * than this value. If unspecified, at most 5 Recognizers will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- *
- * Generated from protobuf field int32 page_size = 2;
- */
- protected $page_size = 0;
- /**
- * A page token, received from a previous
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] must match
- * the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- */
- protected $page_token = '';
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- */
- protected $show_deleted = false;
-
- /**
- * @param string $parent Required. The project and location of Recognizers to list. The expected
- * format is `projects/{project}/locations/{location}`. Please see
- * {@see SpeechClient::locationName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\ListRecognizersRequest
- *
- * @experimental
- */
- public static function build(string $parent): self
- {
- return (new self())
- ->setParent($parent);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $parent
- * Required. The project and location of Recognizers to list. The expected
- * format is `projects/{project}/locations/{location}`.
- * @type int $page_size
- * The maximum number of Recognizers to return. The service may return fewer
- * than this value. If unspecified, at most 5 Recognizers will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- * @type string $page_token
- * A page token, received from a previous
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] must match
- * the call that provided the page token.
- * @type bool $show_deleted
- * Whether, or not, to show resources that have been deleted.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The project and location of Recognizers to list. The expected
- * format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getParent()
- {
- return $this->parent;
- }
-
- /**
- * Required. The project and location of Recognizers to list. The expected
- * format is `projects/{project}/locations/{location}`.
- *
- * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setParent($var)
- {
- GPBUtil::checkString($var, True);
- $this->parent = $var;
-
- return $this;
- }
-
- /**
- * The maximum number of Recognizers to return. The service may return fewer
- * than this value. If unspecified, at most 5 Recognizers will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @return int
- */
- public function getPageSize()
- {
- return $this->page_size;
- }
-
- /**
- * The maximum number of Recognizers to return. The service may return fewer
- * than this value. If unspecified, at most 5 Recognizers will be returned.
- * The maximum value is 100; values above 100 will be coerced to 100.
- *
- * Generated from protobuf field int32 page_size = 2;
- * @param int $var
- * @return $this
- */
- public function setPageSize($var)
- {
- GPBUtil::checkInt32($var);
- $this->page_size = $var;
-
- return $this;
- }
-
- /**
- * A page token, received from a previous
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] must match
- * the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @return string
- */
- public function getPageToken()
- {
- return $this->page_token;
- }
-
- /**
- * A page token, received from a previous
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] call.
- * Provide this to retrieve the subsequent page.
- * When paginating, all other parameters provided to
- * [ListRecognizers][google.cloud.speech.v2.Speech.ListRecognizers] must match
- * the call that provided the page token.
- *
- * Generated from protobuf field string page_token = 3;
- * @param string $var
- * @return $this
- */
- public function setPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->page_token = $var;
-
- return $this;
- }
-
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- * @return bool
- */
- public function getShowDeleted()
- {
- return $this->show_deleted;
- }
-
- /**
- * Whether, or not, to show resources that have been deleted.
- *
- * Generated from protobuf field bool show_deleted = 4;
- * @param bool $var
- * @return $this
- */
- public function setShowDeleted($var)
- {
- GPBUtil::checkBool($var);
- $this->show_deleted = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListRecognizersResponse.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListRecognizersResponse.php
deleted file mode 100644
index a9e03d29ba8f..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ListRecognizersResponse.php
+++ /dev/null
@@ -1,114 +0,0 @@
-google.cloud.speech.v2.ListRecognizersResponse
- */
-class ListRecognizersResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * The list of requested Recognizers.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.Recognizer recognizers = 1;
- */
- private $recognizers;
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListRecognizersRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- */
- protected $next_page_token = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\Recognizer>|\Google\Protobuf\Internal\RepeatedField $recognizers
- * The list of requested Recognizers.
- * @type string $next_page_token
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListRecognizersRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The list of requested Recognizers.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.Recognizer recognizers = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getRecognizers()
- {
- return $this->recognizers;
- }
-
- /**
- * The list of requested Recognizers.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.Recognizer recognizers = 1;
- * @param array<\Google\Cloud\Speech\V2\Recognizer>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setRecognizers($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\Recognizer::class);
- $this->recognizers = $arr;
-
- return $this;
- }
-
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListRecognizersRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @return string
- */
- public function getNextPageToken()
- {
- return $this->next_page_token;
- }
-
- /**
- * A token, which can be sent as
- * [page_token][google.cloud.speech.v2.ListRecognizersRequest.page_token] to
- * retrieve the next page. If this field is omitted, there are no subsequent
- * pages. This token expires after 72 hours.
- *
- * Generated from protobuf field string next_page_token = 2;
- * @param string $var
- * @return $this
- */
- public function setNextPageToken($var)
- {
- GPBUtil::checkString($var, True);
- $this->next_page_token = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/LocationsMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/LocationsMetadata.php
deleted file mode 100644
index 212fe67777e5..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/LocationsMetadata.php
+++ /dev/null
@@ -1,126 +0,0 @@
-google.cloud.speech.v2.LocationsMetadata
- */
-class LocationsMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Information about available locales, models, and features represented in
- * the hierarchical structure of locales -> models -> features
- *
- * Generated from protobuf field .google.cloud.speech.v2.LanguageMetadata languages = 1;
- */
- protected $languages = null;
- /**
- * Information about access metadata for the region and given project.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AccessMetadata access_metadata = 2;
- */
- protected $access_metadata = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\LanguageMetadata $languages
- * Information about available locales, models, and features represented in
- * the hierarchical structure of locales -> models -> features
- * @type \Google\Cloud\Speech\V2\AccessMetadata $access_metadata
- * Information about access metadata for the region and given project.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\LocationsMetadata::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Information about available locales, models, and features represented in
- * the hierarchical structure of locales -> models -> features
- *
- * Generated from protobuf field .google.cloud.speech.v2.LanguageMetadata languages = 1;
- * @return \Google\Cloud\Speech\V2\LanguageMetadata|null
- */
- public function getLanguages()
- {
- return $this->languages;
- }
-
- public function hasLanguages()
- {
- return isset($this->languages);
- }
-
- public function clearLanguages()
- {
- unset($this->languages);
- }
-
- /**
- * Information about available locales, models, and features represented in
- * the hierarchical structure of locales -> models -> features
- *
- * Generated from protobuf field .google.cloud.speech.v2.LanguageMetadata languages = 1;
- * @param \Google\Cloud\Speech\V2\LanguageMetadata $var
- * @return $this
- */
- public function setLanguages($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\LanguageMetadata::class);
- $this->languages = $var;
-
- return $this;
- }
-
- /**
- * Information about access metadata for the region and given project.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AccessMetadata access_metadata = 2;
- * @return \Google\Cloud\Speech\V2\AccessMetadata|null
- */
- public function getAccessMetadata()
- {
- return $this->access_metadata;
- }
-
- public function hasAccessMetadata()
- {
- return isset($this->access_metadata);
- }
-
- public function clearAccessMetadata()
- {
- unset($this->access_metadata);
- }
-
- /**
- * Information about access metadata for the region and given project.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AccessMetadata access_metadata = 2;
- * @param \Google\Cloud\Speech\V2\AccessMetadata $var
- * @return $this
- */
- public function setAccessMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\AccessMetadata::class);
- $this->access_metadata = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelFeature.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelFeature.php
deleted file mode 100644
index ecf07b534e92..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelFeature.php
+++ /dev/null
@@ -1,102 +0,0 @@
-google.cloud.speech.v2.ModelFeature
- */
-class ModelFeature extends \Google\Protobuf\Internal\Message
-{
- /**
- * The name of the feature (Note: the feature can be `recognizer`)
- *
- * Generated from protobuf field string feature = 1;
- */
- protected $feature = '';
- /**
- * The release state of the feature
- *
- * Generated from protobuf field string release_state = 2;
- */
- protected $release_state = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $feature
- * The name of the feature (Note: the feature can be `recognizer`)
- * @type string $release_state
- * The release state of the feature
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\LocationsMetadata::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The name of the feature (Note: the feature can be `recognizer`)
- *
- * Generated from protobuf field string feature = 1;
- * @return string
- */
- public function getFeature()
- {
- return $this->feature;
- }
-
- /**
- * The name of the feature (Note: the feature can be `recognizer`)
- *
- * Generated from protobuf field string feature = 1;
- * @param string $var
- * @return $this
- */
- public function setFeature($var)
- {
- GPBUtil::checkString($var, True);
- $this->feature = $var;
-
- return $this;
- }
-
- /**
- * The release state of the feature
- *
- * Generated from protobuf field string release_state = 2;
- * @return string
- */
- public function getReleaseState()
- {
- return $this->release_state;
- }
-
- /**
- * The release state of the feature
- *
- * Generated from protobuf field string release_state = 2;
- * @param string $var
- * @return $this
- */
- public function setReleaseState($var)
- {
- GPBUtil::checkString($var, True);
- $this->release_state = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelFeatures.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelFeatures.php
deleted file mode 100644
index 72d2b31b363e..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelFeatures.php
+++ /dev/null
@@ -1,67 +0,0 @@
-google.cloud.speech.v2.ModelFeatures
- */
-class ModelFeatures extends \Google\Protobuf\Internal\Message
-{
- /**
- * Repeated field that contains all features of the model
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.ModelFeature model_feature = 1;
- */
- private $model_feature;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\ModelFeature>|\Google\Protobuf\Internal\RepeatedField $model_feature
- * Repeated field that contains all features of the model
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\LocationsMetadata::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Repeated field that contains all features of the model
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.ModelFeature model_feature = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getModelFeature()
- {
- return $this->model_feature;
- }
-
- /**
- * Repeated field that contains all features of the model
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.ModelFeature model_feature = 1;
- * @param array<\Google\Cloud\Speech\V2\ModelFeature>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setModelFeature($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\ModelFeature::class);
- $this->model_feature = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelMetadata.php
deleted file mode 100644
index 6019046e92fe..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/ModelMetadata.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.speech.v2.ModelMetadata
- */
-class ModelMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Map of the model name -> features of that model
- *
- * Generated from protobuf field map model_features = 1;
- */
- private $model_features;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array|\Google\Protobuf\Internal\MapField $model_features
- * Map of the model name -> features of that model
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\LocationsMetadata::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Map of the model name -> features of that model
- *
- * Generated from protobuf field map model_features = 1;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getModelFeatures()
- {
- return $this->model_features;
- }
-
- /**
- * Map of the model name -> features of that model
- *
- * Generated from protobuf field map model_features = 1;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setModelFeatures($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\ModelFeatures::class);
- $this->model_features = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/NativeOutputFileFormatConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/NativeOutputFileFormatConfig.php
deleted file mode 100644
index d48744359a27..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/NativeOutputFileFormatConfig.php
+++ /dev/null
@@ -1,33 +0,0 @@
-google.cloud.speech.v2.NativeOutputFileFormatConfig
- */
-class NativeOutputFileFormatConfig extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/OperationMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/OperationMetadata.php
deleted file mode 100644
index a964eca7ac59..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/OperationMetadata.php
+++ /dev/null
@@ -1,837 +0,0 @@
-google.cloud.speech.v2.OperationMetadata
- */
-class OperationMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
- */
- protected $create_time = null;
- /**
- * The time the operation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 2;
- */
- protected $update_time = null;
- /**
- * The resource path for the target of the operation.
- *
- * Generated from protobuf field string resource = 3;
- */
- protected $resource = '';
- /**
- * The method that triggered the operation.
- *
- * Generated from protobuf field string method = 4;
- */
- protected $method = '';
- /**
- * The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 6 [(.google.api.resource_reference) = {
- */
- protected $kms_key_name = '';
- /**
- * The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 7 [(.google.api.resource_reference) = {
- */
- protected $kms_key_version_name = '';
- /**
- * The percent progress of the Operation. Values can range from 0-100. If the
- * value is 100, then the operation is finished.
- *
- * Generated from protobuf field int32 progress_percent = 22;
- */
- protected $progress_percent = 0;
- protected $request;
- protected $metadata;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Timestamp $create_time
- * The time the operation was created.
- * @type \Google\Protobuf\Timestamp $update_time
- * The time the operation was last updated.
- * @type string $resource
- * The resource path for the target of the operation.
- * @type string $method
- * The method that triggered the operation.
- * @type string $kms_key_name
- * The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- * @type string $kms_key_version_name
- * The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- * @type \Google\Cloud\Speech\V2\BatchRecognizeRequest $batch_recognize_request
- * The BatchRecognizeRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\CreateRecognizerRequest $create_recognizer_request
- * The CreateRecognizerRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UpdateRecognizerRequest $update_recognizer_request
- * The UpdateRecognizerRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\DeleteRecognizerRequest $delete_recognizer_request
- * The DeleteRecognizerRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UndeleteRecognizerRequest $undelete_recognizer_request
- * The UndeleteRecognizerRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\CreateCustomClassRequest $create_custom_class_request
- * The CreateCustomClassRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UpdateCustomClassRequest $update_custom_class_request
- * The UpdateCustomClassRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\DeleteCustomClassRequest $delete_custom_class_request
- * The DeleteCustomClassRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UndeleteCustomClassRequest $undelete_custom_class_request
- * The UndeleteCustomClassRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\CreatePhraseSetRequest $create_phrase_set_request
- * The CreatePhraseSetRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UpdatePhraseSetRequest $update_phrase_set_request
- * The UpdatePhraseSetRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\DeletePhraseSetRequest $delete_phrase_set_request
- * The DeletePhraseSetRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UndeletePhraseSetRequest $undelete_phrase_set_request
- * The UndeletePhraseSetRequest that spawned the Operation.
- * @type \Google\Cloud\Speech\V2\UpdateConfigRequest $update_config_request
- * The UpdateConfigRequest that spawned the Operation.
- * @type int $progress_percent
- * The percent progress of the Operation. Values can range from 0-100. If the
- * value is 100, then the operation is finished.
- * @type \Google\Cloud\Speech\V2\BatchRecognizeMetadata $batch_recognize_metadata
- * Metadata specific to the BatchRecognize method.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * The time the operation was created.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 1;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * The time the operation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 2;
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * The time the operation was last updated.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 2;
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * The resource path for the target of the operation.
- *
- * Generated from protobuf field string resource = 3;
- * @return string
- */
- public function getResource()
- {
- return $this->resource;
- }
-
- /**
- * The resource path for the target of the operation.
- *
- * Generated from protobuf field string resource = 3;
- * @param string $var
- * @return $this
- */
- public function setResource($var)
- {
- GPBUtil::checkString($var, True);
- $this->resource = $var;
-
- return $this;
- }
-
- /**
- * The method that triggered the operation.
- *
- * Generated from protobuf field string method = 4;
- * @return string
- */
- public function getMethod()
- {
- return $this->method;
- }
-
- /**
- * The method that triggered the operation.
- *
- * Generated from protobuf field string method = 4;
- * @param string $var
- * @return $this
- */
- public function setMethod($var)
- {
- GPBUtil::checkString($var, True);
- $this->method = $var;
-
- return $this;
- }
-
- /**
- * The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 6 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyName()
- {
- return $this->kms_key_name;
- }
-
- /**
- * The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 6 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_name = $var;
-
- return $this;
- }
-
- /**
- * The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 7 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyVersionName()
- {
- return $this->kms_key_version_name;
- }
-
- /**
- * The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which content of the Operation is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 7 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyVersionName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_version_name = $var;
-
- return $this;
- }
-
- /**
- * The BatchRecognizeRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeRequest batch_recognize_request = 8;
- * @return \Google\Cloud\Speech\V2\BatchRecognizeRequest|null
- */
- public function getBatchRecognizeRequest()
- {
- return $this->readOneof(8);
- }
-
- public function hasBatchRecognizeRequest()
- {
- return $this->hasOneof(8);
- }
-
- /**
- * The BatchRecognizeRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeRequest batch_recognize_request = 8;
- * @param \Google\Cloud\Speech\V2\BatchRecognizeRequest $var
- * @return $this
- */
- public function setBatchRecognizeRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\BatchRecognizeRequest::class);
- $this->writeOneof(8, $var);
-
- return $this;
- }
-
- /**
- * The CreateRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CreateRecognizerRequest create_recognizer_request = 9;
- * @return \Google\Cloud\Speech\V2\CreateRecognizerRequest|null
- */
- public function getCreateRecognizerRequest()
- {
- return $this->readOneof(9);
- }
-
- public function hasCreateRecognizerRequest()
- {
- return $this->hasOneof(9);
- }
-
- /**
- * The CreateRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CreateRecognizerRequest create_recognizer_request = 9;
- * @param \Google\Cloud\Speech\V2\CreateRecognizerRequest $var
- * @return $this
- */
- public function setCreateRecognizerRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CreateRecognizerRequest::class);
- $this->writeOneof(9, $var);
-
- return $this;
- }
-
- /**
- * The UpdateRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdateRecognizerRequest update_recognizer_request = 10;
- * @return \Google\Cloud\Speech\V2\UpdateRecognizerRequest|null
- */
- public function getUpdateRecognizerRequest()
- {
- return $this->readOneof(10);
- }
-
- public function hasUpdateRecognizerRequest()
- {
- return $this->hasOneof(10);
- }
-
- /**
- * The UpdateRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdateRecognizerRequest update_recognizer_request = 10;
- * @param \Google\Cloud\Speech\V2\UpdateRecognizerRequest $var
- * @return $this
- */
- public function setUpdateRecognizerRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UpdateRecognizerRequest::class);
- $this->writeOneof(10, $var);
-
- return $this;
- }
-
- /**
- * The DeleteRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.DeleteRecognizerRequest delete_recognizer_request = 11;
- * @return \Google\Cloud\Speech\V2\DeleteRecognizerRequest|null
- */
- public function getDeleteRecognizerRequest()
- {
- return $this->readOneof(11);
- }
-
- public function hasDeleteRecognizerRequest()
- {
- return $this->hasOneof(11);
- }
-
- /**
- * The DeleteRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.DeleteRecognizerRequest delete_recognizer_request = 11;
- * @param \Google\Cloud\Speech\V2\DeleteRecognizerRequest $var
- * @return $this
- */
- public function setDeleteRecognizerRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\DeleteRecognizerRequest::class);
- $this->writeOneof(11, $var);
-
- return $this;
- }
-
- /**
- * The UndeleteRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UndeleteRecognizerRequest undelete_recognizer_request = 12;
- * @return \Google\Cloud\Speech\V2\UndeleteRecognizerRequest|null
- */
- public function getUndeleteRecognizerRequest()
- {
- return $this->readOneof(12);
- }
-
- public function hasUndeleteRecognizerRequest()
- {
- return $this->hasOneof(12);
- }
-
- /**
- * The UndeleteRecognizerRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UndeleteRecognizerRequest undelete_recognizer_request = 12;
- * @param \Google\Cloud\Speech\V2\UndeleteRecognizerRequest $var
- * @return $this
- */
- public function setUndeleteRecognizerRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UndeleteRecognizerRequest::class);
- $this->writeOneof(12, $var);
-
- return $this;
- }
-
- /**
- * The CreateCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CreateCustomClassRequest create_custom_class_request = 13;
- * @return \Google\Cloud\Speech\V2\CreateCustomClassRequest|null
- */
- public function getCreateCustomClassRequest()
- {
- return $this->readOneof(13);
- }
-
- public function hasCreateCustomClassRequest()
- {
- return $this->hasOneof(13);
- }
-
- /**
- * The CreateCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CreateCustomClassRequest create_custom_class_request = 13;
- * @param \Google\Cloud\Speech\V2\CreateCustomClassRequest $var
- * @return $this
- */
- public function setCreateCustomClassRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CreateCustomClassRequest::class);
- $this->writeOneof(13, $var);
-
- return $this;
- }
-
- /**
- * The UpdateCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdateCustomClassRequest update_custom_class_request = 14;
- * @return \Google\Cloud\Speech\V2\UpdateCustomClassRequest|null
- */
- public function getUpdateCustomClassRequest()
- {
- return $this->readOneof(14);
- }
-
- public function hasUpdateCustomClassRequest()
- {
- return $this->hasOneof(14);
- }
-
- /**
- * The UpdateCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdateCustomClassRequest update_custom_class_request = 14;
- * @param \Google\Cloud\Speech\V2\UpdateCustomClassRequest $var
- * @return $this
- */
- public function setUpdateCustomClassRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UpdateCustomClassRequest::class);
- $this->writeOneof(14, $var);
-
- return $this;
- }
-
- /**
- * The DeleteCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.DeleteCustomClassRequest delete_custom_class_request = 15;
- * @return \Google\Cloud\Speech\V2\DeleteCustomClassRequest|null
- */
- public function getDeleteCustomClassRequest()
- {
- return $this->readOneof(15);
- }
-
- public function hasDeleteCustomClassRequest()
- {
- return $this->hasOneof(15);
- }
-
- /**
- * The DeleteCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.DeleteCustomClassRequest delete_custom_class_request = 15;
- * @param \Google\Cloud\Speech\V2\DeleteCustomClassRequest $var
- * @return $this
- */
- public function setDeleteCustomClassRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\DeleteCustomClassRequest::class);
- $this->writeOneof(15, $var);
-
- return $this;
- }
-
- /**
- * The UndeleteCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UndeleteCustomClassRequest undelete_custom_class_request = 16;
- * @return \Google\Cloud\Speech\V2\UndeleteCustomClassRequest|null
- */
- public function getUndeleteCustomClassRequest()
- {
- return $this->readOneof(16);
- }
-
- public function hasUndeleteCustomClassRequest()
- {
- return $this->hasOneof(16);
- }
-
- /**
- * The UndeleteCustomClassRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UndeleteCustomClassRequest undelete_custom_class_request = 16;
- * @param \Google\Cloud\Speech\V2\UndeleteCustomClassRequest $var
- * @return $this
- */
- public function setUndeleteCustomClassRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UndeleteCustomClassRequest::class);
- $this->writeOneof(16, $var);
-
- return $this;
- }
-
- /**
- * The CreatePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CreatePhraseSetRequest create_phrase_set_request = 17;
- * @return \Google\Cloud\Speech\V2\CreatePhraseSetRequest|null
- */
- public function getCreatePhraseSetRequest()
- {
- return $this->readOneof(17);
- }
-
- public function hasCreatePhraseSetRequest()
- {
- return $this->hasOneof(17);
- }
-
- /**
- * The CreatePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CreatePhraseSetRequest create_phrase_set_request = 17;
- * @param \Google\Cloud\Speech\V2\CreatePhraseSetRequest $var
- * @return $this
- */
- public function setCreatePhraseSetRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CreatePhraseSetRequest::class);
- $this->writeOneof(17, $var);
-
- return $this;
- }
-
- /**
- * The UpdatePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdatePhraseSetRequest update_phrase_set_request = 18;
- * @return \Google\Cloud\Speech\V2\UpdatePhraseSetRequest|null
- */
- public function getUpdatePhraseSetRequest()
- {
- return $this->readOneof(18);
- }
-
- public function hasUpdatePhraseSetRequest()
- {
- return $this->hasOneof(18);
- }
-
- /**
- * The UpdatePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdatePhraseSetRequest update_phrase_set_request = 18;
- * @param \Google\Cloud\Speech\V2\UpdatePhraseSetRequest $var
- * @return $this
- */
- public function setUpdatePhraseSetRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UpdatePhraseSetRequest::class);
- $this->writeOneof(18, $var);
-
- return $this;
- }
-
- /**
- * The DeletePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.DeletePhraseSetRequest delete_phrase_set_request = 19;
- * @return \Google\Cloud\Speech\V2\DeletePhraseSetRequest|null
- */
- public function getDeletePhraseSetRequest()
- {
- return $this->readOneof(19);
- }
-
- public function hasDeletePhraseSetRequest()
- {
- return $this->hasOneof(19);
- }
-
- /**
- * The DeletePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.DeletePhraseSetRequest delete_phrase_set_request = 19;
- * @param \Google\Cloud\Speech\V2\DeletePhraseSetRequest $var
- * @return $this
- */
- public function setDeletePhraseSetRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\DeletePhraseSetRequest::class);
- $this->writeOneof(19, $var);
-
- return $this;
- }
-
- /**
- * The UndeletePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UndeletePhraseSetRequest undelete_phrase_set_request = 20;
- * @return \Google\Cloud\Speech\V2\UndeletePhraseSetRequest|null
- */
- public function getUndeletePhraseSetRequest()
- {
- return $this->readOneof(20);
- }
-
- public function hasUndeletePhraseSetRequest()
- {
- return $this->hasOneof(20);
- }
-
- /**
- * The UndeletePhraseSetRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UndeletePhraseSetRequest undelete_phrase_set_request = 20;
- * @param \Google\Cloud\Speech\V2\UndeletePhraseSetRequest $var
- * @return $this
- */
- public function setUndeletePhraseSetRequest($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UndeletePhraseSetRequest::class);
- $this->writeOneof(20, $var);
-
- return $this;
- }
-
- /**
- * The UpdateConfigRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdateConfigRequest update_config_request = 21 [deprecated = true];
- * @return \Google\Cloud\Speech\V2\UpdateConfigRequest|null
- * @deprecated
- */
- public function getUpdateConfigRequest()
- {
- @trigger_error('update_config_request is deprecated.', E_USER_DEPRECATED);
- return $this->readOneof(21);
- }
-
- public function hasUpdateConfigRequest()
- {
- @trigger_error('update_config_request is deprecated.', E_USER_DEPRECATED);
- return $this->hasOneof(21);
- }
-
- /**
- * The UpdateConfigRequest that spawned the Operation.
- *
- * Generated from protobuf field .google.cloud.speech.v2.UpdateConfigRequest update_config_request = 21 [deprecated = true];
- * @param \Google\Cloud\Speech\V2\UpdateConfigRequest $var
- * @return $this
- * @deprecated
- */
- public function setUpdateConfigRequest($var)
- {
- @trigger_error('update_config_request is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\UpdateConfigRequest::class);
- $this->writeOneof(21, $var);
-
- return $this;
- }
-
- /**
- * The percent progress of the Operation. Values can range from 0-100. If the
- * value is 100, then the operation is finished.
- *
- * Generated from protobuf field int32 progress_percent = 22;
- * @return int
- */
- public function getProgressPercent()
- {
- return $this->progress_percent;
- }
-
- /**
- * The percent progress of the Operation. Values can range from 0-100. If the
- * value is 100, then the operation is finished.
- *
- * Generated from protobuf field int32 progress_percent = 22;
- * @param int $var
- * @return $this
- */
- public function setProgressPercent($var)
- {
- GPBUtil::checkInt32($var);
- $this->progress_percent = $var;
-
- return $this;
- }
-
- /**
- * Metadata specific to the BatchRecognize method.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeMetadata batch_recognize_metadata = 23;
- * @return \Google\Cloud\Speech\V2\BatchRecognizeMetadata|null
- */
- public function getBatchRecognizeMetadata()
- {
- return $this->readOneof(23);
- }
-
- public function hasBatchRecognizeMetadata()
- {
- return $this->hasOneof(23);
- }
-
- /**
- * Metadata specific to the BatchRecognize method.
- *
- * Generated from protobuf field .google.cloud.speech.v2.BatchRecognizeMetadata batch_recognize_metadata = 23;
- * @param \Google\Cloud\Speech\V2\BatchRecognizeMetadata $var
- * @return $this
- */
- public function setBatchRecognizeMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\BatchRecognizeMetadata::class);
- $this->writeOneof(23, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getRequest()
- {
- return $this->whichOneof("request");
- }
-
- /**
- * @return string
- */
- public function getMetadata()
- {
- return $this->whichOneof("metadata");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/OutputFormatConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/OutputFormatConfig.php
deleted file mode 100644
index 6f0d7a9ab51b..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/OutputFormatConfig.php
+++ /dev/null
@@ -1,181 +0,0 @@
-google.cloud.speech.v2.OutputFormatConfig
- */
-class OutputFormatConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Configuration for the native output format. If this field is set or if no
- * other output format field is set, then transcripts will be written to the
- * sink in the native format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.NativeOutputFileFormatConfig native = 1;
- */
- protected $native = null;
- /**
- * Configuration for the VTT output format. If this field is set, then
- * transcripts will be written to the sink in the VTT format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.VttOutputFileFormatConfig vtt = 2;
- */
- protected $vtt = null;
- /**
- * Configuration for the SRT output format. If this field is set, then
- * transcripts will be written to the sink in the SRT format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SrtOutputFileFormatConfig srt = 3;
- */
- protected $srt = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\NativeOutputFileFormatConfig $native
- * Configuration for the native output format. If this field is set or if no
- * other output format field is set, then transcripts will be written to the
- * sink in the native format.
- * @type \Google\Cloud\Speech\V2\VttOutputFileFormatConfig $vtt
- * Configuration for the VTT output format. If this field is set, then
- * transcripts will be written to the sink in the VTT format.
- * @type \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig $srt
- * Configuration for the SRT output format. If this field is set, then
- * transcripts will be written to the sink in the SRT format.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Configuration for the native output format. If this field is set or if no
- * other output format field is set, then transcripts will be written to the
- * sink in the native format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.NativeOutputFileFormatConfig native = 1;
- * @return \Google\Cloud\Speech\V2\NativeOutputFileFormatConfig|null
- */
- public function getNative()
- {
- return $this->native;
- }
-
- public function hasNative()
- {
- return isset($this->native);
- }
-
- public function clearNative()
- {
- unset($this->native);
- }
-
- /**
- * Configuration for the native output format. If this field is set or if no
- * other output format field is set, then transcripts will be written to the
- * sink in the native format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.NativeOutputFileFormatConfig native = 1;
- * @param \Google\Cloud\Speech\V2\NativeOutputFileFormatConfig $var
- * @return $this
- */
- public function setNative($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\NativeOutputFileFormatConfig::class);
- $this->native = $var;
-
- return $this;
- }
-
- /**
- * Configuration for the VTT output format. If this field is set, then
- * transcripts will be written to the sink in the VTT format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.VttOutputFileFormatConfig vtt = 2;
- * @return \Google\Cloud\Speech\V2\VttOutputFileFormatConfig|null
- */
- public function getVtt()
- {
- return $this->vtt;
- }
-
- public function hasVtt()
- {
- return isset($this->vtt);
- }
-
- public function clearVtt()
- {
- unset($this->vtt);
- }
-
- /**
- * Configuration for the VTT output format. If this field is set, then
- * transcripts will be written to the sink in the VTT format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.VttOutputFileFormatConfig vtt = 2;
- * @param \Google\Cloud\Speech\V2\VttOutputFileFormatConfig $var
- * @return $this
- */
- public function setVtt($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\VttOutputFileFormatConfig::class);
- $this->vtt = $var;
-
- return $this;
- }
-
- /**
- * Configuration for the SRT output format. If this field is set, then
- * transcripts will be written to the sink in the SRT format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SrtOutputFileFormatConfig srt = 3;
- * @return \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig|null
- */
- public function getSrt()
- {
- return $this->srt;
- }
-
- public function hasSrt()
- {
- return isset($this->srt);
- }
-
- public function clearSrt()
- {
- unset($this->srt);
- }
-
- /**
- * Configuration for the SRT output format. If this field is set, then
- * transcripts will be written to the sink in the SRT format.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SrtOutputFileFormatConfig srt = 3;
- * @param \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig $var
- * @return $this
- */
- public function setSrt($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\SrtOutputFileFormatConfig::class);
- $this->srt = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet.php
deleted file mode 100644
index c8380ff65799..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet.php
+++ /dev/null
@@ -1,657 +0,0 @@
-google.cloud.speech.v2.PhraseSet
- */
-class PhraseSet extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. Identifier. The resource name of the PhraseSet.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- */
- protected $name = '';
- /**
- * Output only. System-assigned unique identifier for the PhraseSet.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet.Phrase phrases = 3;
- */
- private $phrases;
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Valid `boost` values are between 0 (exclusive) and 20. We recommend using a
- * binary search approach to finding the optimal value for your use case as
- * well as adding phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- */
- protected $boost = 0.0;
- /**
- * User-settable, human-readable name for the PhraseSet. Must be 63
- * characters or less.
- *
- * Generated from protobuf field string display_name = 5;
- */
- protected $display_name = '';
- /**
- * Output only. The PhraseSet lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * Output only. The time at which this resource was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $delete_time = null;
- /**
- * Output only. The time at which this resource will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $expire_time = null;
- /**
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 10;
- */
- private $annotations;
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $etag = '';
- /**
- * Output only. Whether or not this PhraseSet is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $reconciling = false;
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $kms_key_name = '';
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $kms_key_version_name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Output only. Identifier. The resource name of the PhraseSet.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- * @type string $uid
- * Output only. System-assigned unique identifier for the PhraseSet.
- * @type array<\Google\Cloud\Speech\V2\PhraseSet\Phrase>|\Google\Protobuf\Internal\RepeatedField $phrases
- * A list of word and phrases.
- * @type float $boost
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Valid `boost` values are between 0 (exclusive) and 20. We recommend using a
- * binary search approach to finding the optimal value for your use case as
- * well as adding phrases both with and without boost to your requests.
- * @type string $display_name
- * User-settable, human-readable name for the PhraseSet. Must be 63
- * characters or less.
- * @type int $state
- * Output only. The PhraseSet lifecycle state.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. Creation time.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The most recent time this resource was modified.
- * @type \Google\Protobuf\Timestamp $delete_time
- * Output only. The time at which this resource was requested for deletion.
- * @type \Google\Protobuf\Timestamp $expire_time
- * Output only. The time at which this resource will be purged.
- * @type array|\Google\Protobuf\Internal\MapField $annotations
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- * @type string $etag
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- * @type bool $reconciling
- * Output only. Whether or not this PhraseSet is in the process of being
- * updated.
- * @type string $kms_key_name
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- * @type string $kms_key_version_name
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. Identifier. The resource name of the PhraseSet.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Output only. Identifier. The resource name of the PhraseSet.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. System-assigned unique identifier for the PhraseSet.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. System-assigned unique identifier for the PhraseSet.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet.Phrase phrases = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhrases()
- {
- return $this->phrases;
- }
-
- /**
- * A list of word and phrases.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.PhraseSet.Phrase phrases = 3;
- * @param array<\Google\Cloud\Speech\V2\PhraseSet\Phrase>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhrases($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\PhraseSet\Phrase::class);
- $this->phrases = $arr;
-
- return $this;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Valid `boost` values are between 0 (exclusive) and 20. We recommend using a
- * binary search approach to finding the optimal value for your use case as
- * well as adding phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Positive value will increase the probability that a specific
- * phrase will be recognized over other similar sounding phrases. The higher
- * the boost, the higher the chance of false positive recognition as well.
- * Valid `boost` values are between 0 (exclusive) and 20. We recommend using a
- * binary search approach to finding the optimal value for your use case as
- * well as adding phrases both with and without boost to your requests.
- *
- * Generated from protobuf field float boost = 4;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
- /**
- * User-settable, human-readable name for the PhraseSet. Must be 63
- * characters or less.
- *
- * Generated from protobuf field string display_name = 5;
- * @return string
- */
- public function getDisplayName()
- {
- return $this->display_name;
- }
-
- /**
- * User-settable, human-readable name for the PhraseSet. Must be 63
- * characters or less.
- *
- * Generated from protobuf field string display_name = 5;
- * @param string $var
- * @return $this
- */
- public function setDisplayName($var)
- {
- GPBUtil::checkString($var, True);
- $this->display_name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The PhraseSet lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The PhraseSet lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\PhraseSet\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The most recent time this resource was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this resource was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getDeleteTime()
- {
- return $this->delete_time;
- }
-
- public function hasDeleteTime()
- {
- return isset($this->delete_time);
- }
-
- public function clearDeleteTime()
- {
- unset($this->delete_time);
- }
-
- /**
- * Output only. The time at which this resource was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setDeleteTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->delete_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this resource will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getExpireTime()
- {
- return $this->expire_time;
- }
-
- public function hasExpireTime()
- {
- return isset($this->expire_time);
- }
-
- public function clearExpireTime()
- {
- unset($this->expire_time);
- }
-
- /**
- * Output only. The time at which this resource will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setExpireTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->expire_time = $var;
-
- return $this;
- }
-
- /**
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 10;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAnnotations()
- {
- return $this->annotations;
- }
-
- /**
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 10;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAnnotations($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->annotations = $arr;
-
- return $this;
- }
-
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
- /**
- * Output only. Whether or not this PhraseSet is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return bool
- */
- public function getReconciling()
- {
- return $this->reconciling;
- }
-
- /**
- * Output only. Whether or not this PhraseSet is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param bool $var
- * @return $this
- */
- public function setReconciling($var)
- {
- GPBUtil::checkBool($var);
- $this->reconciling = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyName()
- {
- return $this->kms_key_name;
- }
-
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyVersionName()
- {
- return $this->kms_key_version_name;
- }
-
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the PhraseSet is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 14 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyVersionName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_version_name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet/Phrase.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet/Phrase.php
deleted file mode 100644
index ee3ca7152d91..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet/Phrase.php
+++ /dev/null
@@ -1,146 +0,0 @@
-google.cloud.speech.v2.PhraseSet.Phrase
- */
-class Phrase extends \Google\Protobuf\Internal\Message
-{
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- */
- protected $value = '';
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost values will return an error. Boost values must
- * be between 0 and 20. Any values outside that range will return an error.
- * We recommend using a binary search approach to finding the optimal value
- * for your use case as well as adding phrases both with and without boost
- * to your requests.
- *
- * Generated from protobuf field float boost = 2;
- */
- protected $boost = 0.0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $value
- * The phrase itself.
- * @type float $boost
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost values will return an error. Boost values must
- * be between 0 and 20. Any values outside that range will return an error.
- * We recommend using a binary search approach to finding the optimal value
- * for your use case as well as adding phrases both with and without boost
- * to your requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- * @return string
- */
- public function getValue()
- {
- return $this->value;
- }
-
- /**
- * The phrase itself.
- *
- * Generated from protobuf field string value = 1;
- * @param string $var
- * @return $this
- */
- public function setValue($var)
- {
- GPBUtil::checkString($var, True);
- $this->value = $var;
-
- return $this;
- }
-
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost values will return an error. Boost values must
- * be between 0 and 20. Any values outside that range will return an error.
- * We recommend using a binary search approach to finding the optimal value
- * for your use case as well as adding phrases both with and without boost
- * to your requests.
- *
- * Generated from protobuf field float boost = 2;
- * @return float
- */
- public function getBoost()
- {
- return $this->boost;
- }
-
- /**
- * Hint Boost. Overrides the boost set at the phrase set level.
- * Positive value will increase the probability that a specific phrase will
- * be recognized over other similar sounding phrases. The higher the boost,
- * the higher the chance of false positive recognition as well. Negative
- * boost values would correspond to anti-biasing. Anti-biasing is not
- * enabled, so negative boost values will return an error. Boost values must
- * be between 0 and 20. Any values outside that range will return an error.
- * We recommend using a binary search approach to finding the optimal value
- * for your use case as well as adding phrases both with and without boost
- * to your requests.
- *
- * Generated from protobuf field float boost = 2;
- * @param float $var
- * @return $this
- */
- public function setBoost($var)
- {
- GPBUtil::checkFloat($var);
- $this->boost = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Phrase::class, \Google\Cloud\Speech\V2\PhraseSet_Phrase::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet/State.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet/State.php
deleted file mode 100644
index 9023b4c80b75..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/PhraseSet/State.php
+++ /dev/null
@@ -1,65 +0,0 @@
-google.cloud.speech.v2.PhraseSet.State
- */
-class State
-{
- /**
- * Unspecified state. This is only used/useful for distinguishing
- * unset values.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The normal and active state.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * This PhraseSet has been deleted.
- *
- * Generated from protobuf enum DELETED = 4;
- */
- const DELETED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::ACTIVE => 'ACTIVE',
- self::DELETED => 'DELETED',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Speech\V2\PhraseSet_State::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionConfig.php
deleted file mode 100644
index 61854862d957..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionConfig.php
+++ /dev/null
@@ -1,439 +0,0 @@
-google.cloud.speech.v2.RecognitionConfig
- */
-class RecognitionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Optional. Which model to use for recognition requests. Select the model
- * best suited to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- *
- * Generated from protobuf field string model = 9 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $model = '';
- /**
- * Optional. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Language tags are normalized to BCP-47 before they are used eg "en-us"
- * becomes "en-US".
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- *
- * Generated from protobuf field repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];
- */
- private $language_codes;
- /**
- * Speech recognition features to enable.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures features = 2;
- */
- protected $features = null;
- /**
- * Speech adaptation context that weights recognizer predictions for specific
- * words and phrases.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SpeechAdaptation adaptation = 6;
- */
- protected $adaptation = null;
- /**
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $transcript_normalization = null;
- /**
- * Optional. Optional configuration used to automatically run translation on
- * the given audio to the desired language for supported models.
- *
- * Generated from protobuf field .google.cloud.speech.v2.TranslationConfig translation_config = 15 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $translation_config = null;
- protected $decoding_config;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\AutoDetectDecodingConfig $auto_decoding_config
- * Automatically detect decoding parameters.
- * Preferred for supported formats.
- * @type \Google\Cloud\Speech\V2\ExplicitDecodingConfig $explicit_decoding_config
- * Explicitly specified decoding parameters.
- * Required if using headerless PCM audio (linear16, mulaw, alaw).
- * @type string $model
- * Optional. Which model to use for recognition requests. Select the model
- * best suited to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes
- * Optional. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Language tags are normalized to BCP-47 before they are used eg "en-us"
- * becomes "en-US".
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- * @type \Google\Cloud\Speech\V2\RecognitionFeatures $features
- * Speech recognition features to enable.
- * @type \Google\Cloud\Speech\V2\SpeechAdaptation $adaptation
- * Speech adaptation context that weights recognizer predictions for specific
- * words and phrases.
- * @type \Google\Cloud\Speech\V2\TranscriptNormalization $transcript_normalization
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- * @type \Google\Cloud\Speech\V2\TranslationConfig $translation_config
- * Optional. Optional configuration used to automatically run translation on
- * the given audio to the desired language for supported models.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Automatically detect decoding parameters.
- * Preferred for supported formats.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;
- * @return \Google\Cloud\Speech\V2\AutoDetectDecodingConfig|null
- */
- public function getAutoDecodingConfig()
- {
- return $this->readOneof(7);
- }
-
- public function hasAutoDecodingConfig()
- {
- return $this->hasOneof(7);
- }
-
- /**
- * Automatically detect decoding parameters.
- * Preferred for supported formats.
- *
- * Generated from protobuf field .google.cloud.speech.v2.AutoDetectDecodingConfig auto_decoding_config = 7;
- * @param \Google\Cloud\Speech\V2\AutoDetectDecodingConfig $var
- * @return $this
- */
- public function setAutoDecodingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\AutoDetectDecodingConfig::class);
- $this->writeOneof(7, $var);
-
- return $this;
- }
-
- /**
- * Explicitly specified decoding parameters.
- * Required if using headerless PCM audio (linear16, mulaw, alaw).
- *
- * Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;
- * @return \Google\Cloud\Speech\V2\ExplicitDecodingConfig|null
- */
- public function getExplicitDecodingConfig()
- {
- return $this->readOneof(8);
- }
-
- public function hasExplicitDecodingConfig()
- {
- return $this->hasOneof(8);
- }
-
- /**
- * Explicitly specified decoding parameters.
- * Required if using headerless PCM audio (linear16, mulaw, alaw).
- *
- * Generated from protobuf field .google.cloud.speech.v2.ExplicitDecodingConfig explicit_decoding_config = 8;
- * @param \Google\Cloud\Speech\V2\ExplicitDecodingConfig $var
- * @return $this
- */
- public function setExplicitDecodingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\ExplicitDecodingConfig::class);
- $this->writeOneof(8, $var);
-
- return $this;
- }
-
- /**
- * Optional. Which model to use for recognition requests. Select the model
- * best suited to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- *
- * Generated from protobuf field string model = 9 [(.google.api.field_behavior) = OPTIONAL];
- * @return string
- */
- public function getModel()
- {
- return $this->model;
- }
-
- /**
- * Optional. Which model to use for recognition requests. Select the model
- * best suited to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- *
- * Generated from protobuf field string model = 9 [(.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- */
- public function setModel($var)
- {
- GPBUtil::checkString($var, True);
- $this->model = $var;
-
- return $this;
- }
-
- /**
- * Optional. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Language tags are normalized to BCP-47 before they are used eg "en-us"
- * becomes "en-US".
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- *
- * Generated from protobuf field repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getLanguageCodes()
- {
- return $this->language_codes;
- }
-
- /**
- * Optional. The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Language tags are normalized to BCP-47 before they are used eg "en-us"
- * becomes "en-US".
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- *
- * Generated from protobuf field repeated string language_codes = 10 [(.google.api.field_behavior) = OPTIONAL];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setLanguageCodes($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->language_codes = $arr;
-
- return $this;
- }
-
- /**
- * Speech recognition features to enable.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures features = 2;
- * @return \Google\Cloud\Speech\V2\RecognitionFeatures|null
- */
- public function getFeatures()
- {
- return $this->features;
- }
-
- public function hasFeatures()
- {
- return isset($this->features);
- }
-
- public function clearFeatures()
- {
- unset($this->features);
- }
-
- /**
- * Speech recognition features to enable.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures features = 2;
- * @param \Google\Cloud\Speech\V2\RecognitionFeatures $var
- * @return $this
- */
- public function setFeatures($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionFeatures::class);
- $this->features = $var;
-
- return $this;
- }
-
- /**
- * Speech adaptation context that weights recognizer predictions for specific
- * words and phrases.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SpeechAdaptation adaptation = 6;
- * @return \Google\Cloud\Speech\V2\SpeechAdaptation|null
- */
- public function getAdaptation()
- {
- return $this->adaptation;
- }
-
- public function hasAdaptation()
- {
- return isset($this->adaptation);
- }
-
- public function clearAdaptation()
- {
- unset($this->adaptation);
- }
-
- /**
- * Speech adaptation context that weights recognizer predictions for specific
- * words and phrases.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SpeechAdaptation adaptation = 6;
- * @param \Google\Cloud\Speech\V2\SpeechAdaptation $var
- * @return $this
- */
- public function setAdaptation($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\SpeechAdaptation::class);
- $this->adaptation = $var;
-
- return $this;
- }
-
- /**
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Speech\V2\TranscriptNormalization|null
- */
- public function getTranscriptNormalization()
- {
- return $this->transcript_normalization;
- }
-
- public function hasTranscriptNormalization()
- {
- return isset($this->transcript_normalization);
- }
-
- public function clearTranscriptNormalization()
- {
- unset($this->transcript_normalization);
- }
-
- /**
- * Optional. Use transcription normalization to automatically replace parts of
- * the transcript with phrases of your choosing. For StreamingRecognize, this
- * normalization only applies to stable partial transcripts (stability > 0.8)
- * and final transcripts.
- *
- * Generated from protobuf field .google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Speech\V2\TranscriptNormalization $var
- * @return $this
- */
- public function setTranscriptNormalization($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\TranscriptNormalization::class);
- $this->transcript_normalization = $var;
-
- return $this;
- }
-
- /**
- * Optional. Optional configuration used to automatically run translation on
- * the given audio to the desired language for supported models.
- *
- * Generated from protobuf field .google.cloud.speech.v2.TranslationConfig translation_config = 15 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Speech\V2\TranslationConfig|null
- */
- public function getTranslationConfig()
- {
- return $this->translation_config;
- }
-
- public function hasTranslationConfig()
- {
- return isset($this->translation_config);
- }
-
- public function clearTranslationConfig()
- {
- unset($this->translation_config);
- }
-
- /**
- * Optional. Optional configuration used to automatically run translation on
- * the given audio to the desired language for supported models.
- *
- * Generated from protobuf field .google.cloud.speech.v2.TranslationConfig translation_config = 15 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Speech\V2\TranslationConfig $var
- * @return $this
- */
- public function setTranslationConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\TranslationConfig::class);
- $this->translation_config = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getDecodingConfig()
- {
- return $this->whichOneof("decoding_config");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionFeatures.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionFeatures.php
deleted file mode 100644
index f145c3c6a9c6..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionFeatures.php
+++ /dev/null
@@ -1,453 +0,0 @@
-google.cloud.speech.v2.RecognitionFeatures
- */
-class RecognitionFeatures extends \Google\Protobuf\Internal\Message
-{
- /**
- * If set to `true`, the server will attempt to filter out profanities,
- * replacing all but the initial character in each filtered word with
- * asterisks, for instance, "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 1;
- */
- protected $profanity_filter = false;
- /**
- * If `true`, the top result includes a list of words and the start and end
- * time offsets (timestamps) for those words. If `false`, no word-level time
- * offset information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 2;
- */
- protected $enable_word_time_offsets = false;
- /**
- * If `true`, the top result includes a list of words and the confidence for
- * those words. If `false`, no word-level confidence information is returned.
- * The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 3;
- */
- protected $enable_word_confidence = false;
- /**
- * If `true`, adds punctuation to recognition result hypotheses. This feature
- * is only available in select languages. The default `false` value does not
- * add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 4;
- */
- protected $enable_automatic_punctuation = false;
- /**
- * The spoken punctuation behavior for the call. If `true`, replaces spoken
- * punctuation with the corresponding symbols in the request. For example,
- * "how are you question mark" becomes "how are you?". See
- * https://cloud.google.com/speech-to-text/docs/spoken-punctuation for
- * support. If `false`, spoken punctuation is not replaced.
- *
- * Generated from protobuf field bool enable_spoken_punctuation = 14;
- */
- protected $enable_spoken_punctuation = false;
- /**
- * The spoken emoji behavior for the call. If `true`, adds spoken emoji
- * formatting for the request. This will replace spoken emojis with the
- * corresponding Unicode symbols in the final transcript. If `false`, spoken
- * emojis are not replaced.
- *
- * Generated from protobuf field bool enable_spoken_emojis = 15;
- */
- protected $enable_spoken_emojis = false;
- /**
- * Mode for recognizing multi-channel audio.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- */
- protected $multi_channel_mode = 0;
- /**
- * Configuration to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
- */
- protected $diarization_config = null;
- /**
- * Maximum number of recognition hypotheses to be returned.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 16;
- */
- protected $max_alternatives = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $profanity_filter
- * If set to `true`, the server will attempt to filter out profanities,
- * replacing all but the initial character in each filtered word with
- * asterisks, for instance, "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- * @type bool $enable_word_time_offsets
- * If `true`, the top result includes a list of words and the start and end
- * time offsets (timestamps) for those words. If `false`, no word-level time
- * offset information is returned. The default is `false`.
- * @type bool $enable_word_confidence
- * If `true`, the top result includes a list of words and the confidence for
- * those words. If `false`, no word-level confidence information is returned.
- * The default is `false`.
- * @type bool $enable_automatic_punctuation
- * If `true`, adds punctuation to recognition result hypotheses. This feature
- * is only available in select languages. The default `false` value does not
- * add punctuation to result hypotheses.
- * @type bool $enable_spoken_punctuation
- * The spoken punctuation behavior for the call. If `true`, replaces spoken
- * punctuation with the corresponding symbols in the request. For example,
- * "how are you question mark" becomes "how are you?". See
- * https://cloud.google.com/speech-to-text/docs/spoken-punctuation for
- * support. If `false`, spoken punctuation is not replaced.
- * @type bool $enable_spoken_emojis
- * The spoken emoji behavior for the call. If `true`, adds spoken emoji
- * formatting for the request. This will replace spoken emojis with the
- * corresponding Unicode symbols in the final transcript. If `false`, spoken
- * emojis are not replaced.
- * @type int $multi_channel_mode
- * Mode for recognizing multi-channel audio.
- * @type \Google\Cloud\Speech\V2\SpeakerDiarizationConfig $diarization_config
- * Configuration to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- * @type int $max_alternatives
- * Maximum number of recognition hypotheses to be returned.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If set to `true`, the server will attempt to filter out profanities,
- * replacing all but the initial character in each filtered word with
- * asterisks, for instance, "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 1;
- * @return bool
- */
- public function getProfanityFilter()
- {
- return $this->profanity_filter;
- }
-
- /**
- * If set to `true`, the server will attempt to filter out profanities,
- * replacing all but the initial character in each filtered word with
- * asterisks, for instance, "f***". If set to `false` or omitted, profanities
- * won't be filtered out.
- *
- * Generated from protobuf field bool profanity_filter = 1;
- * @param bool $var
- * @return $this
- */
- public function setProfanityFilter($var)
- {
- GPBUtil::checkBool($var);
- $this->profanity_filter = $var;
-
- return $this;
- }
-
- /**
- * If `true`, the top result includes a list of words and the start and end
- * time offsets (timestamps) for those words. If `false`, no word-level time
- * offset information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 2;
- * @return bool
- */
- public function getEnableWordTimeOffsets()
- {
- return $this->enable_word_time_offsets;
- }
-
- /**
- * If `true`, the top result includes a list of words and the start and end
- * time offsets (timestamps) for those words. If `false`, no word-level time
- * offset information is returned. The default is `false`.
- *
- * Generated from protobuf field bool enable_word_time_offsets = 2;
- * @param bool $var
- * @return $this
- */
- public function setEnableWordTimeOffsets($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_word_time_offsets = $var;
-
- return $this;
- }
-
- /**
- * If `true`, the top result includes a list of words and the confidence for
- * those words. If `false`, no word-level confidence information is returned.
- * The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 3;
- * @return bool
- */
- public function getEnableWordConfidence()
- {
- return $this->enable_word_confidence;
- }
-
- /**
- * If `true`, the top result includes a list of words and the confidence for
- * those words. If `false`, no word-level confidence information is returned.
- * The default is `false`.
- *
- * Generated from protobuf field bool enable_word_confidence = 3;
- * @param bool $var
- * @return $this
- */
- public function setEnableWordConfidence($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_word_confidence = $var;
-
- return $this;
- }
-
- /**
- * If `true`, adds punctuation to recognition result hypotheses. This feature
- * is only available in select languages. The default `false` value does not
- * add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 4;
- * @return bool
- */
- public function getEnableAutomaticPunctuation()
- {
- return $this->enable_automatic_punctuation;
- }
-
- /**
- * If `true`, adds punctuation to recognition result hypotheses. This feature
- * is only available in select languages. The default `false` value does not
- * add punctuation to result hypotheses.
- *
- * Generated from protobuf field bool enable_automatic_punctuation = 4;
- * @param bool $var
- * @return $this
- */
- public function setEnableAutomaticPunctuation($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_automatic_punctuation = $var;
-
- return $this;
- }
-
- /**
- * The spoken punctuation behavior for the call. If `true`, replaces spoken
- * punctuation with the corresponding symbols in the request. For example,
- * "how are you question mark" becomes "how are you?". See
- * https://cloud.google.com/speech-to-text/docs/spoken-punctuation for
- * support. If `false`, spoken punctuation is not replaced.
- *
- * Generated from protobuf field bool enable_spoken_punctuation = 14;
- * @return bool
- */
- public function getEnableSpokenPunctuation()
- {
- return $this->enable_spoken_punctuation;
- }
-
- /**
- * The spoken punctuation behavior for the call. If `true`, replaces spoken
- * punctuation with the corresponding symbols in the request. For example,
- * "how are you question mark" becomes "how are you?". See
- * https://cloud.google.com/speech-to-text/docs/spoken-punctuation for
- * support. If `false`, spoken punctuation is not replaced.
- *
- * Generated from protobuf field bool enable_spoken_punctuation = 14;
- * @param bool $var
- * @return $this
- */
- public function setEnableSpokenPunctuation($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_spoken_punctuation = $var;
-
- return $this;
- }
-
- /**
- * The spoken emoji behavior for the call. If `true`, adds spoken emoji
- * formatting for the request. This will replace spoken emojis with the
- * corresponding Unicode symbols in the final transcript. If `false`, spoken
- * emojis are not replaced.
- *
- * Generated from protobuf field bool enable_spoken_emojis = 15;
- * @return bool
- */
- public function getEnableSpokenEmojis()
- {
- return $this->enable_spoken_emojis;
- }
-
- /**
- * The spoken emoji behavior for the call. If `true`, adds spoken emoji
- * formatting for the request. This will replace spoken emojis with the
- * corresponding Unicode symbols in the final transcript. If `false`, spoken
- * emojis are not replaced.
- *
- * Generated from protobuf field bool enable_spoken_emojis = 15;
- * @param bool $var
- * @return $this
- */
- public function setEnableSpokenEmojis($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_spoken_emojis = $var;
-
- return $this;
- }
-
- /**
- * Mode for recognizing multi-channel audio.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- * @return int
- */
- public function getMultiChannelMode()
- {
- return $this->multi_channel_mode;
- }
-
- /**
- * Mode for recognizing multi-channel audio.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- * @param int $var
- * @return $this
- */
- public function setMultiChannelMode($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\RecognitionFeatures\MultiChannelMode::class);
- $this->multi_channel_mode = $var;
-
- return $this;
- }
-
- /**
- * Configuration to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
- * @return \Google\Cloud\Speech\V2\SpeakerDiarizationConfig|null
- */
- public function getDiarizationConfig()
- {
- return $this->diarization_config;
- }
-
- public function hasDiarizationConfig()
- {
- return isset($this->diarization_config);
- }
-
- public function clearDiarizationConfig()
- {
- unset($this->diarization_config);
- }
-
- /**
- * Configuration to enable speaker diarization and set additional
- * parameters to make diarization better suited for your application.
- * When this is enabled, we send all the words from the beginning of the
- * audio for the top alternative in every consecutive STREAMING responses.
- * This is done in order to improve our speaker tags as our models learn to
- * identify the speakers in the conversation over time.
- * For non-streaming requests, the diarization results will be provided only
- * in the top alternative of the FINAL SpeechRecognitionResult.
- *
- * Generated from protobuf field .google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
- * @param \Google\Cloud\Speech\V2\SpeakerDiarizationConfig $var
- * @return $this
- */
- public function setDiarizationConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\SpeakerDiarizationConfig::class);
- $this->diarization_config = $var;
-
- return $this;
- }
-
- /**
- * Maximum number of recognition hypotheses to be returned.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 16;
- * @return int
- */
- public function getMaxAlternatives()
- {
- return $this->max_alternatives;
- }
-
- /**
- * Maximum number of recognition hypotheses to be returned.
- * The server may return fewer than `max_alternatives`.
- * Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of
- * one. If omitted, will return a maximum of one.
- *
- * Generated from protobuf field int32 max_alternatives = 16;
- * @param int $var
- * @return $this
- */
- public function setMaxAlternatives($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_alternatives = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionFeatures/MultiChannelMode.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionFeatures/MultiChannelMode.php
deleted file mode 100644
index 0f7aafda7c44..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionFeatures/MultiChannelMode.php
+++ /dev/null
@@ -1,61 +0,0 @@
-google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode
- */
-class MultiChannelMode
-{
- /**
- * Default value for the multi-channel mode. If the audio contains
- * multiple channels, only the first channel will be transcribed; other
- * channels will be ignored.
- *
- * Generated from protobuf enum MULTI_CHANNEL_MODE_UNSPECIFIED = 0;
- */
- const MULTI_CHANNEL_MODE_UNSPECIFIED = 0;
- /**
- * If selected, each channel in the provided audio is transcribed
- * independently. This cannot be selected if the selected
- * [model][google.cloud.speech.v2.Recognizer.model] is `latest_short`.
- *
- * Generated from protobuf enum SEPARATE_RECOGNITION_PER_CHANNEL = 1;
- */
- const SEPARATE_RECOGNITION_PER_CHANNEL = 1;
-
- private static $valueToName = [
- self::MULTI_CHANNEL_MODE_UNSPECIFIED => 'MULTI_CHANNEL_MODE_UNSPECIFIED',
- self::SEPARATE_RECOGNITION_PER_CHANNEL => 'SEPARATE_RECOGNITION_PER_CHANNEL',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(MultiChannelMode::class, \Google\Cloud\Speech\V2\RecognitionFeatures_MultiChannelMode::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionOutputConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionOutputConfig.php
deleted file mode 100644
index cc7677450e5a..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionOutputConfig.php
+++ /dev/null
@@ -1,171 +0,0 @@
-google.cloud.speech.v2.RecognitionOutputConfig
- */
-class RecognitionOutputConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Optional. Configuration for the format of the results stored to `output`.
- * If unspecified transcripts will be written in the `NATIVE` format only.
- *
- * Generated from protobuf field .google.cloud.speech.v2.OutputFormatConfig output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL];
- */
- protected $output_format_config = null;
- protected $output;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\GcsOutputConfig $gcs_output_config
- * If this message is populated, recognition results are written to the
- * provided Google Cloud Storage URI.
- * @type \Google\Cloud\Speech\V2\InlineOutputConfig $inline_response_config
- * If this message is populated, recognition results are provided in the
- * [BatchRecognizeResponse][google.cloud.speech.v2.BatchRecognizeResponse]
- * message of the Operation when completed. This is only supported when
- * calling [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize]
- * with just one audio file.
- * @type \Google\Cloud\Speech\V2\OutputFormatConfig $output_format_config
- * Optional. Configuration for the format of the results stored to `output`.
- * If unspecified transcripts will be written in the `NATIVE` format only.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If this message is populated, recognition results are written to the
- * provided Google Cloud Storage URI.
- *
- * Generated from protobuf field .google.cloud.speech.v2.GcsOutputConfig gcs_output_config = 1;
- * @return \Google\Cloud\Speech\V2\GcsOutputConfig|null
- */
- public function getGcsOutputConfig()
- {
- return $this->readOneof(1);
- }
-
- public function hasGcsOutputConfig()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * If this message is populated, recognition results are written to the
- * provided Google Cloud Storage URI.
- *
- * Generated from protobuf field .google.cloud.speech.v2.GcsOutputConfig gcs_output_config = 1;
- * @param \Google\Cloud\Speech\V2\GcsOutputConfig $var
- * @return $this
- */
- public function setGcsOutputConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\GcsOutputConfig::class);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * If this message is populated, recognition results are provided in the
- * [BatchRecognizeResponse][google.cloud.speech.v2.BatchRecognizeResponse]
- * message of the Operation when completed. This is only supported when
- * calling [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize]
- * with just one audio file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.InlineOutputConfig inline_response_config = 2;
- * @return \Google\Cloud\Speech\V2\InlineOutputConfig|null
- */
- public function getInlineResponseConfig()
- {
- return $this->readOneof(2);
- }
-
- public function hasInlineResponseConfig()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * If this message is populated, recognition results are provided in the
- * [BatchRecognizeResponse][google.cloud.speech.v2.BatchRecognizeResponse]
- * message of the Operation when completed. This is only supported when
- * calling [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize]
- * with just one audio file.
- *
- * Generated from protobuf field .google.cloud.speech.v2.InlineOutputConfig inline_response_config = 2;
- * @param \Google\Cloud\Speech\V2\InlineOutputConfig $var
- * @return $this
- */
- public function setInlineResponseConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\InlineOutputConfig::class);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * Optional. Configuration for the format of the results stored to `output`.
- * If unspecified transcripts will be written in the `NATIVE` format only.
- *
- * Generated from protobuf field .google.cloud.speech.v2.OutputFormatConfig output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Cloud\Speech\V2\OutputFormatConfig|null
- */
- public function getOutputFormatConfig()
- {
- return $this->output_format_config;
- }
-
- public function hasOutputFormatConfig()
- {
- return isset($this->output_format_config);
- }
-
- public function clearOutputFormatConfig()
- {
- unset($this->output_format_config);
- }
-
- /**
- * Optional. Configuration for the format of the results stored to `output`.
- * If unspecified transcripts will be written in the `NATIVE` format only.
- *
- * Generated from protobuf field .google.cloud.speech.v2.OutputFormatConfig output_format_config = 3 [(.google.api.field_behavior) = OPTIONAL];
- * @param \Google\Cloud\Speech\V2\OutputFormatConfig $var
- * @return $this
- */
- public function setOutputFormatConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\OutputFormatConfig::class);
- $this->output_format_config = $var;
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getOutput()
- {
- return $this->whichOneof("output");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionResponseMetadata.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionResponseMetadata.php
deleted file mode 100644
index 3dba442ce555..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognitionResponseMetadata.php
+++ /dev/null
@@ -1,111 +0,0 @@
-google.cloud.speech.v2.RecognitionResponseMetadata
- */
-class RecognitionResponseMetadata extends \Google\Protobuf\Internal\Message
-{
- /**
- * Global request identifier auto-generated by the API.
- *
- * Generated from protobuf field string request_id = 9 [(.google.api.field_info) = {
- */
- protected $request_id = '';
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_duration = 6;
- */
- protected $total_billed_duration = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $request_id
- * Global request identifier auto-generated by the API.
- * @type \Google\Protobuf\Duration $total_billed_duration
- * When available, billed audio seconds for the corresponding request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Global request identifier auto-generated by the API.
- *
- * Generated from protobuf field string request_id = 9 [(.google.api.field_info) = {
- * @return string
- */
- public function getRequestId()
- {
- return $this->request_id;
- }
-
- /**
- * Global request identifier auto-generated by the API.
- *
- * Generated from protobuf field string request_id = 9 [(.google.api.field_info) = {
- * @param string $var
- * @return $this
- */
- public function setRequestId($var)
- {
- GPBUtil::checkString($var, True);
- $this->request_id = $var;
-
- return $this;
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_duration = 6;
- * @return \Google\Protobuf\Duration|null
- */
- public function getTotalBilledDuration()
- {
- return $this->total_billed_duration;
- }
-
- public function hasTotalBilledDuration()
- {
- return isset($this->total_billed_duration);
- }
-
- public function clearTotalBilledDuration()
- {
- unset($this->total_billed_duration);
- }
-
- /**
- * When available, billed audio seconds for the corresponding request.
- *
- * Generated from protobuf field .google.protobuf.Duration total_billed_duration = 6;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setTotalBilledDuration($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->total_billed_duration = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognizeRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognizeRequest.php
deleted file mode 100644
index 6fe9603c31a9..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognizeRequest.php
+++ /dev/null
@@ -1,434 +0,0 @@
-google.cloud.speech.v2.RecognizeRequest
- */
-class RecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $recognizer = '';
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 1;
- */
- protected $config = null;
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 8;
- */
- protected $config_mask = null;
- protected $audio_source;
-
- /**
- * @param string $recognizer Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer. Please see
- * {@see SpeechClient::recognizerName()} for help formatting this field.
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $config Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @param \Google\Protobuf\FieldMask $configMask The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @param string $content The audio data bytes encoded as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As
- * with all bytes fields, proto buffers use a pure binary representation,
- * whereas JSON representations use base64.
- *
- * @return \Google\Cloud\Speech\V2\RecognizeRequest
- *
- * @experimental
- */
- public static function build(string $recognizer, \Google\Cloud\Speech\V2\RecognitionConfig $config, \Google\Protobuf\FieldMask $configMask, string $content): self
- {
- return (new self())
- ->setRecognizer($recognizer)
- ->setConfig($config)
- ->setConfigMask($configMask)
- ->setContent($content);
- }
-
- /**
- * @param string $recognizer Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer. Please see
- * {@see SpeechClient::recognizerName()} for help formatting this field.
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $config Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @param \Google\Protobuf\FieldMask $configMask The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @param string $uri URI that points to a file that contains audio data bytes as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file
- * must not be compressed (for example, gzip). Currently, only Google Cloud
- * Storage URIs are supported, which must be specified in the following
- * format: `gs://bucket_name/object_name` (other URI formats return
- * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * @return \Google\Cloud\Speech\V2\RecognizeRequest
- *
- * @experimental
- */
- public static function buildFromRecognizerConfigConfigMaskUri(string $recognizer, \Google\Cloud\Speech\V2\RecognitionConfig $config, \Google\Protobuf\FieldMask $configMask, string $uri): self
- {
- return (new self())
- ->setRecognizer($recognizer)
- ->setConfig($config)
- ->setConfigMask($configMask)
- ->setUri($uri);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $recognizer
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- * @type \Google\Cloud\Speech\V2\RecognitionConfig $config
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @type \Google\Protobuf\FieldMask $config_mask
- * The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @type string $content
- * The audio data bytes encoded as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As
- * with all bytes fields, proto buffers use a pure binary representation,
- * whereas JSON representations use base64.
- * @type string $uri
- * URI that points to a file that contains audio data bytes as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file
- * must not be compressed (for example, gzip). Currently, only Google Cloud
- * Storage URIs are supported, which must be specified in the following
- * format: `gs://bucket_name/object_name` (other URI formats return
- * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getRecognizer()
- {
- return $this->recognizer;
- }
-
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setRecognizer($var)
- {
- GPBUtil::checkString($var, True);
- $this->recognizer = $var;
-
- return $this;
- }
-
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 1;
- * @return \Google\Cloud\Speech\V2\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 1;
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 8;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getConfigMask()
- {
- return $this->config_mask;
- }
-
- public function hasConfigMask()
- {
- return isset($this->config_mask);
- }
-
- public function clearConfigMask()
- {
- unset($this->config_mask);
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 8;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setConfigMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->config_mask = $var;
-
- return $this;
- }
-
- /**
- * The audio data bytes encoded as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As
- * with all bytes fields, proto buffers use a pure binary representation,
- * whereas JSON representations use base64.
- *
- * Generated from protobuf field bytes content = 5;
- * @return string
- */
- public function getContent()
- {
- return $this->readOneof(5);
- }
-
- public function hasContent()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * The audio data bytes encoded as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As
- * with all bytes fields, proto buffers use a pure binary representation,
- * whereas JSON representations use base64.
- *
- * Generated from protobuf field bytes content = 5;
- * @param string $var
- * @return $this
- */
- public function setContent($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * URI that points to a file that contains audio data bytes as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file
- * must not be compressed (for example, gzip). Currently, only Google Cloud
- * Storage URIs are supported, which must be specified in the following
- * format: `gs://bucket_name/object_name` (other URI formats return
- * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * Generated from protobuf field string uri = 6;
- * @return string
- */
- public function getUri()
- {
- return $this->readOneof(6);
- }
-
- public function hasUri()
- {
- return $this->hasOneof(6);
- }
-
- /**
- * URI that points to a file that contains audio data bytes as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file
- * must not be compressed (for example, gzip). Currently, only Google Cloud
- * Storage URIs are supported, which must be specified in the following
- * format: `gs://bucket_name/object_name` (other URI formats return
- * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- *
- * Generated from protobuf field string uri = 6;
- * @param string $var
- * @return $this
- */
- public function setUri($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(6, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getAudioSource()
- {
- return $this->whichOneof("audio_source");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognizeResponse.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognizeResponse.php
deleted file mode 100644
index 7722a8631c80..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/RecognizeResponse.php
+++ /dev/null
@@ -1,116 +0,0 @@
-google.cloud.speech.v2.RecognizeResponse
- */
-class RecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;
- */
- private $results;
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;
- */
- protected $metadata = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- * @type \Google\Cloud\Speech\V2\RecognitionResponseMetadata $metadata
- * Metadata about the recognition.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * Sequential list of transcription results corresponding to sequential
- * portions of audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionResult results = 3;
- * @param array<\Google\Cloud\Speech\V2\SpeechRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\SpeechRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;
- * @return \Google\Cloud\Speech\V2\RecognitionResponseMetadata|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 2;
- * @param \Google\Cloud\Speech\V2\RecognitionResponseMetadata $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionResponseMetadata::class);
- $this->metadata = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Recognizer.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Recognizer.php
deleted file mode 100644
index 2f6595f3747a..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Recognizer.php
+++ /dev/null
@@ -1,793 +0,0 @@
-google.cloud.speech.v2.Recognizer
- */
-class Recognizer extends \Google\Protobuf\Internal\Message
-{
- /**
- * Output only. Identifier. The resource name of the Recognizer.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- */
- protected $name = '';
- /**
- * Output only. System-assigned unique identifier for the Recognizer.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $uid = '';
- /**
- * User-settable, human-readable name for the Recognizer. Must be 63
- * characters or less.
- *
- * Generated from protobuf field string display_name = 3;
- */
- protected $display_name = '';
- /**
- * Optional. This field is now deprecated. Prefer the
- * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * Which model to use for recognition requests. Select the model best suited
- * to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- *
- * Generated from protobuf field string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @deprecated
- */
- protected $model = '';
- /**
- * Optional. This field is now deprecated. Prefer the
- * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
- * field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- * When you create or update a Recognizer, these values are
- * stored in normalized BCP-47 form. For example, "en-us" is stored as
- * "en-US".
- *
- * Generated from protobuf field repeated string language_codes = 17 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @deprecated
- */
- private $language_codes;
- /**
- * Default configuration to use for requests with this Recognizer.
- * This can be overwritten by inline configuration in the
- * [RecognizeRequest.config][google.cloud.speech.v2.RecognizeRequest.config]
- * field.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig default_recognition_config = 6;
- */
- protected $default_recognition_config = null;
- /**
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 7;
- */
- private $annotations;
- /**
- * Output only. The Recognizer lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $state = 0;
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $create_time = null;
- /**
- * Output only. The most recent time this Recognizer was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $update_time = null;
- /**
- * Output only. The time at which this Recognizer was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $delete_time = null;
- /**
- * Output only. The time at which this Recognizer will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $expire_time = null;
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $etag = '';
- /**
- * Output only. Whether or not this Recognizer is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $reconciling = false;
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $kms_key_name = '';
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- */
- protected $kms_key_version_name = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Output only. Identifier. The resource name of the Recognizer.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- * @type string $uid
- * Output only. System-assigned unique identifier for the Recognizer.
- * @type string $display_name
- * User-settable, human-readable name for the Recognizer. Must be 63
- * characters or less.
- * @type string $model
- * Optional. This field is now deprecated. Prefer the
- * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * Which model to use for recognition requests. Select the model best suited
- * to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * @type array|\Google\Protobuf\Internal\RepeatedField $language_codes
- * Optional. This field is now deprecated. Prefer the
- * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
- * field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- * When you create or update a Recognizer, these values are
- * stored in normalized BCP-47 form. For example, "en-us" is stored as
- * "en-US".
- * @type \Google\Cloud\Speech\V2\RecognitionConfig $default_recognition_config
- * Default configuration to use for requests with this Recognizer.
- * This can be overwritten by inline configuration in the
- * [RecognizeRequest.config][google.cloud.speech.v2.RecognizeRequest.config]
- * field.
- * @type array|\Google\Protobuf\Internal\MapField $annotations
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- * @type int $state
- * Output only. The Recognizer lifecycle state.
- * @type \Google\Protobuf\Timestamp $create_time
- * Output only. Creation time.
- * @type \Google\Protobuf\Timestamp $update_time
- * Output only. The most recent time this Recognizer was modified.
- * @type \Google\Protobuf\Timestamp $delete_time
- * Output only. The time at which this Recognizer was requested for deletion.
- * @type \Google\Protobuf\Timestamp $expire_time
- * Output only. The time at which this Recognizer will be purged.
- * @type string $etag
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- * @type bool $reconciling
- * Output only. Whether or not this Recognizer is in the process of being
- * updated.
- * @type string $kms_key_name
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- * @type string $kms_key_version_name
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Output only. Identifier. The resource name of the Recognizer.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Output only. Identifier. The resource name of the Recognizer.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER];
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * Output only. System-assigned unique identifier for the Recognizer.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getUid()
- {
- return $this->uid;
- }
-
- /**
- * Output only. System-assigned unique identifier for the Recognizer.
- *
- * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setUid($var)
- {
- GPBUtil::checkString($var, True);
- $this->uid = $var;
-
- return $this;
- }
-
- /**
- * User-settable, human-readable name for the Recognizer. Must be 63
- * characters or less.
- *
- * Generated from protobuf field string display_name = 3;
- * @return string
- */
- public function getDisplayName()
- {
- return $this->display_name;
- }
-
- /**
- * User-settable, human-readable name for the Recognizer. Must be 63
- * characters or less.
- *
- * Generated from protobuf field string display_name = 3;
- * @param string $var
- * @return $this
- */
- public function setDisplayName($var)
- {
- GPBUtil::checkString($var, True);
- $this->display_name = $var;
-
- return $this;
- }
-
- /**
- * Optional. This field is now deprecated. Prefer the
- * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * Which model to use for recognition requests. Select the model best suited
- * to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- *
- * Generated from protobuf field string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @return string
- * @deprecated
- */
- public function getModel()
- {
- @trigger_error('model is deprecated.', E_USER_DEPRECATED);
- return $this->model;
- }
-
- /**
- * Optional. This field is now deprecated. Prefer the
- * [`model`][google.cloud.speech.v2.RecognitionConfig.model] field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * Which model to use for recognition requests. Select the model best suited
- * to your domain to get best results.
- * Guidance for choosing which model to use can be found in the [Transcription
- * Models
- * Documentation](https://cloud.google.com/speech-to-text/v2/docs/transcription-model)
- * and the models supported in each region can be found in the [Table Of
- * Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- *
- * Generated from protobuf field string model = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @param string $var
- * @return $this
- * @deprecated
- */
- public function setModel($var)
- {
- @trigger_error('model is deprecated.', E_USER_DEPRECATED);
- GPBUtil::checkString($var, True);
- $this->model = $var;
-
- return $this;
- }
-
- /**
- * Optional. This field is now deprecated. Prefer the
- * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
- * field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- * When you create or update a Recognizer, these values are
- * stored in normalized BCP-47 form. For example, "en-us" is stored as
- * "en-US".
- *
- * Generated from protobuf field repeated string language_codes = 17 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @return \Google\Protobuf\Internal\RepeatedField
- * @deprecated
- */
- public function getLanguageCodes()
- {
- @trigger_error('language_codes is deprecated.', E_USER_DEPRECATED);
- return $this->language_codes;
- }
-
- /**
- * Optional. This field is now deprecated. Prefer the
- * [`language_codes`][google.cloud.speech.v2.RecognitionConfig.language_codes]
- * field in the
- * [`RecognitionConfig`][google.cloud.speech.v2.RecognitionConfig] message.
- * The language of the supplied audio as a
- * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
- * Supported languages for each model are listed in the [Table of Supported
- * Models](https://cloud.google.com/speech-to-text/v2/docs/speech-to-text-supported-languages).
- * If additional languages are provided, recognition result will contain
- * recognition in the most likely language detected. The recognition result
- * will include the language tag of the language detected in the audio.
- * When you create or update a Recognizer, these values are
- * stored in normalized BCP-47 form. For example, "en-us" is stored as
- * "en-US".
- *
- * Generated from protobuf field repeated string language_codes = 17 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];
- * @param array|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- * @deprecated
- */
- public function setLanguageCodes($var)
- {
- @trigger_error('language_codes is deprecated.', E_USER_DEPRECATED);
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->language_codes = $arr;
-
- return $this;
- }
-
- /**
- * Default configuration to use for requests with this Recognizer.
- * This can be overwritten by inline configuration in the
- * [RecognizeRequest.config][google.cloud.speech.v2.RecognizeRequest.config]
- * field.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig default_recognition_config = 6;
- * @return \Google\Cloud\Speech\V2\RecognitionConfig|null
- */
- public function getDefaultRecognitionConfig()
- {
- return $this->default_recognition_config;
- }
-
- public function hasDefaultRecognitionConfig()
- {
- return isset($this->default_recognition_config);
- }
-
- public function clearDefaultRecognitionConfig()
- {
- unset($this->default_recognition_config);
- }
-
- /**
- * Default configuration to use for requests with this Recognizer.
- * This can be overwritten by inline configuration in the
- * [RecognizeRequest.config][google.cloud.speech.v2.RecognizeRequest.config]
- * field.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig default_recognition_config = 6;
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $var
- * @return $this
- */
- public function setDefaultRecognitionConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionConfig::class);
- $this->default_recognition_config = $var;
-
- return $this;
- }
-
- /**
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 7;
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAnnotations()
- {
- return $this->annotations;
- }
-
- /**
- * Allows users to store small amounts of arbitrary data.
- * Both the key and the value must be 63 characters or less each.
- * At most 100 annotations.
- *
- * Generated from protobuf field map annotations = 7;
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAnnotations($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->annotations = $arr;
-
- return $this;
- }
-
- /**
- * Output only. The Recognizer lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return int
- */
- public function getState()
- {
- return $this->state;
- }
-
- /**
- * Output only. The Recognizer lifecycle state.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param int $var
- * @return $this
- */
- public function setState($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\Recognizer\State::class);
- $this->state = $var;
-
- return $this;
- }
-
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreateTime()
- {
- return $this->create_time;
- }
-
- public function hasCreateTime()
- {
- return isset($this->create_time);
- }
-
- public function clearCreateTime()
- {
- unset($this->create_time);
- }
-
- /**
- * Output only. Creation time.
- *
- * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->create_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The most recent time this Recognizer was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getUpdateTime()
- {
- return $this->update_time;
- }
-
- public function hasUpdateTime()
- {
- return isset($this->update_time);
- }
-
- public function clearUpdateTime()
- {
- unset($this->update_time);
- }
-
- /**
- * Output only. The most recent time this Recognizer was modified.
- *
- * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setUpdateTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->update_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this Recognizer was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getDeleteTime()
- {
- return $this->delete_time;
- }
-
- public function hasDeleteTime()
- {
- return isset($this->delete_time);
- }
-
- public function clearDeleteTime()
- {
- unset($this->delete_time);
- }
-
- /**
- * Output only. The time at which this Recognizer was requested for deletion.
- *
- * Generated from protobuf field .google.protobuf.Timestamp delete_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setDeleteTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->delete_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. The time at which this Recognizer will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getExpireTime()
- {
- return $this->expire_time;
- }
-
- public function hasExpireTime()
- {
- return isset($this->expire_time);
- }
-
- public function clearExpireTime()
- {
- unset($this->expire_time);
- }
-
- /**
- * Output only. The time at which this Recognizer will be purged.
- *
- * Generated from protobuf field .google.protobuf.Timestamp expire_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setExpireTime($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->expire_time = $var;
-
- return $this;
- }
-
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * Output only. This checksum is computed by the server based on the value of
- * other fields. This may be sent on update, undelete, and delete requests to
- * ensure the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
- /**
- * Output only. Whether or not this Recognizer is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return bool
- */
- public function getReconciling()
- {
- return $this->reconciling;
- }
-
- /**
- * Output only. Whether or not this Recognizer is in the process of being
- * updated.
- *
- * Generated from protobuf field bool reconciling = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param bool $var
- * @return $this
- */
- public function setReconciling($var)
- {
- GPBUtil::checkBool($var);
- $this->reconciling = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyName()
- {
- return $this->kms_key_name;
- }
-
- /**
- * Output only. The [KMS key
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which
- * the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
- *
- * Generated from protobuf field string kms_key_name = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_name = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @return string
- */
- public function getKmsKeyVersionName()
- {
- return $this->kms_key_version_name;
- }
-
- /**
- * Output only. The [KMS key version
- * name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)
- * with which the Recognizer is encrypted. The expected format is
- * `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.
- *
- * Generated from protobuf field string kms_key_version_name = 16 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setKmsKeyVersionName($var)
- {
- GPBUtil::checkString($var, True);
- $this->kms_key_version_name = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Recognizer/State.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Recognizer/State.php
deleted file mode 100644
index 49eb5efb02c6..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/Recognizer/State.php
+++ /dev/null
@@ -1,64 +0,0 @@
-google.cloud.speech.v2.Recognizer.State
- */
-class State
-{
- /**
- * The default value. This value is used if the state is omitted.
- *
- * Generated from protobuf enum STATE_UNSPECIFIED = 0;
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * The Recognizer is active and ready for use.
- *
- * Generated from protobuf enum ACTIVE = 2;
- */
- const ACTIVE = 2;
- /**
- * This Recognizer has been deleted.
- *
- * Generated from protobuf enum DELETED = 4;
- */
- const DELETED = 4;
-
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::ACTIVE => 'ACTIVE',
- self::DELETED => 'DELETED',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(State::class, \Google\Cloud\Speech\V2\Recognizer_State::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeakerDiarizationConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeakerDiarizationConfig.php
deleted file mode 100644
index 0b03174a39a5..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeakerDiarizationConfig.php
+++ /dev/null
@@ -1,129 +0,0 @@
-google.cloud.speech.v2.SpeakerDiarizationConfig
- */
-class SpeakerDiarizationConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Minimum number of speakers in the conversation. This range gives
- * you more flexibility by allowing the system to automatically determine the
- * correct number of speakers.
- * To fix the number of speakers detected in the audio, set
- * `min_speaker_count` = `max_speaker_count`.
- *
- * Generated from protobuf field int32 min_speaker_count = 2 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $min_speaker_count = 0;
- /**
- * Required. Maximum number of speakers in the conversation. Valid values are:
- * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
- * by allowing the system to automatically determine the correct number of
- * speakers.
- *
- * Generated from protobuf field int32 max_speaker_count = 3 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $max_speaker_count = 0;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int $min_speaker_count
- * Required. Minimum number of speakers in the conversation. This range gives
- * you more flexibility by allowing the system to automatically determine the
- * correct number of speakers.
- * To fix the number of speakers detected in the audio, set
- * `min_speaker_count` = `max_speaker_count`.
- * @type int $max_speaker_count
- * Required. Maximum number of speakers in the conversation. Valid values are:
- * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
- * by allowing the system to automatically determine the correct number of
- * speakers.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Minimum number of speakers in the conversation. This range gives
- * you more flexibility by allowing the system to automatically determine the
- * correct number of speakers.
- * To fix the number of speakers detected in the audio, set
- * `min_speaker_count` = `max_speaker_count`.
- *
- * Generated from protobuf field int32 min_speaker_count = 2 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getMinSpeakerCount()
- {
- return $this->min_speaker_count;
- }
-
- /**
- * Required. Minimum number of speakers in the conversation. This range gives
- * you more flexibility by allowing the system to automatically determine the
- * correct number of speakers.
- * To fix the number of speakers detected in the audio, set
- * `min_speaker_count` = `max_speaker_count`.
- *
- * Generated from protobuf field int32 min_speaker_count = 2 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setMinSpeakerCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->min_speaker_count = $var;
-
- return $this;
- }
-
- /**
- * Required. Maximum number of speakers in the conversation. Valid values are:
- * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
- * by allowing the system to automatically determine the correct number of
- * speakers.
- *
- * Generated from protobuf field int32 max_speaker_count = 3 [(.google.api.field_behavior) = REQUIRED];
- * @return int
- */
- public function getMaxSpeakerCount()
- {
- return $this->max_speaker_count;
- }
-
- /**
- * Required. Maximum number of speakers in the conversation. Valid values are:
- * 1-6. Must be >= `min_speaker_count`. This range gives you more flexibility
- * by allowing the system to automatically determine the correct number of
- * speakers.
- *
- * Generated from protobuf field int32 max_speaker_count = 3 [(.google.api.field_behavior) = REQUIRED];
- * @param int $var
- * @return $this
- */
- public function setMaxSpeakerCount($var)
- {
- GPBUtil::checkInt32($var);
- $this->max_speaker_count = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechAdaptation.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechAdaptation.php
deleted file mode 100644
index 960e2d77f289..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechAdaptation.php
+++ /dev/null
@@ -1,107 +0,0 @@
-google.cloud.speech.v2.SpeechAdaptation
- */
-class SpeechAdaptation extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of inline or referenced PhraseSets.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;
- */
- private $phrase_sets;
- /**
- * A list of inline CustomClasses. Existing CustomClass resources can be
- * referenced directly in a PhraseSet.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;
- */
- private $custom_classes;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet>|\Google\Protobuf\Internal\RepeatedField $phrase_sets
- * A list of inline or referenced PhraseSets.
- * @type array<\Google\Cloud\Speech\V2\CustomClass>|\Google\Protobuf\Internal\RepeatedField $custom_classes
- * A list of inline CustomClasses. Existing CustomClass resources can be
- * referenced directly in a PhraseSet.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of inline or referenced PhraseSets.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPhraseSets()
- {
- return $this->phrase_sets;
- }
-
- /**
- * A list of inline or referenced PhraseSets.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet phrase_sets = 1;
- * @param array<\Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPhraseSets($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\SpeechAdaptation\AdaptationPhraseSet::class);
- $this->phrase_sets = $arr;
-
- return $this;
- }
-
- /**
- * A list of inline CustomClasses. Existing CustomClass resources can be
- * referenced directly in a PhraseSet.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getCustomClasses()
- {
- return $this->custom_classes;
- }
-
- /**
- * A list of inline CustomClasses. Existing CustomClass resources can be
- * referenced directly in a PhraseSet.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.CustomClass custom_classes = 2;
- * @param array<\Google\Cloud\Speech\V2\CustomClass>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setCustomClasses($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\CustomClass::class);
- $this->custom_classes = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechAdaptation/AdaptationPhraseSet.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechAdaptation/AdaptationPhraseSet.php
deleted file mode 100644
index 9e8997b76aa1..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechAdaptation/AdaptationPhraseSet.php
+++ /dev/null
@@ -1,115 +0,0 @@
-google.cloud.speech.v2.SpeechAdaptation.AdaptationPhraseSet
- */
-class AdaptationPhraseSet extends \Google\Protobuf\Internal\Message
-{
- protected $value;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $phrase_set
- * The name of an existing PhraseSet resource. The user must have read
- * access to the resource and it must not be deleted.
- * @type \Google\Cloud\Speech\V2\PhraseSet $inline_phrase_set
- * An inline defined PhraseSet.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * The name of an existing PhraseSet resource. The user must have read
- * access to the resource and it must not be deleted.
- *
- * Generated from protobuf field string phrase_set = 1 [(.google.api.resource_reference) = {
- * @return string
- */
- public function getPhraseSet()
- {
- return $this->readOneof(1);
- }
-
- public function hasPhraseSet()
- {
- return $this->hasOneof(1);
- }
-
- /**
- * The name of an existing PhraseSet resource. The user must have read
- * access to the resource and it must not be deleted.
- *
- * Generated from protobuf field string phrase_set = 1 [(.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(1, $var);
-
- return $this;
- }
-
- /**
- * An inline defined PhraseSet.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet inline_phrase_set = 2;
- * @return \Google\Cloud\Speech\V2\PhraseSet|null
- */
- public function getInlinePhraseSet()
- {
- return $this->readOneof(2);
- }
-
- public function hasInlinePhraseSet()
- {
- return $this->hasOneof(2);
- }
-
- /**
- * An inline defined PhraseSet.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet inline_phrase_set = 2;
- * @param \Google\Cloud\Speech\V2\PhraseSet $var
- * @return $this
- */
- public function setInlinePhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\PhraseSet::class);
- $this->writeOneof(2, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getValue()
- {
- return $this->whichOneof("value");
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(AdaptationPhraseSet::class, \Google\Cloud\Speech\V2\SpeechAdaptation_AdaptationPhraseSet::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechRecognitionAlternative.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechRecognitionAlternative.php
deleted file mode 100644
index 543296caae7f..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechRecognitionAlternative.php
+++ /dev/null
@@ -1,175 +0,0 @@
-google.cloud.speech.v2.SpeechRecognitionAlternative
- */
-class SpeechRecognitionAlternative extends \Google\Protobuf\Internal\Message
-{
- /**
- * Transcript text representing the words that the user spoke.
- *
- * Generated from protobuf field string transcript = 1;
- */
- protected $transcript = '';
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- */
- protected $confidence = 0.0;
- /**
- * A list of word-specific information for each recognized word.
- * When the
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is set, you will see all the words from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.WordInfo words = 3;
- */
- private $words;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $transcript
- * Transcript text representing the words that the user spoke.
- * @type float $confidence
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- * @type array<\Google\Cloud\Speech\V2\WordInfo>|\Google\Protobuf\Internal\RepeatedField $words
- * A list of word-specific information for each recognized word.
- * When the
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is set, you will see all the words from the beginning of the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Transcript text representing the words that the user spoke.
- *
- * Generated from protobuf field string transcript = 1;
- * @return string
- */
- public function getTranscript()
- {
- return $this->transcript;
- }
-
- /**
- * Transcript text representing the words that the user spoke.
- *
- * Generated from protobuf field string transcript = 1;
- * @param string $var
- * @return $this
- */
- public function setTranscript($var)
- {
- GPBUtil::checkString($var, True);
- $this->transcript = $var;
-
- return $this;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- * @return float
- */
- public function getConfidence()
- {
- return $this->confidence;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 2;
- * @param float $var
- * @return $this
- */
- public function setConfidence($var)
- {
- GPBUtil::checkFloat($var);
- $this->confidence = $var;
-
- return $this;
- }
-
- /**
- * A list of word-specific information for each recognized word.
- * When the
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is set, you will see all the words from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.WordInfo words = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getWords()
- {
- return $this->words;
- }
-
- /**
- * A list of word-specific information for each recognized word.
- * When the
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is set, you will see all the words from the beginning of the audio.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.WordInfo words = 3;
- * @param array<\Google\Cloud\Speech\V2\WordInfo>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setWords($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\WordInfo::class);
- $this->words = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechRecognitionResult.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechRecognitionResult.php
deleted file mode 100644
index 36e30ff06db3..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SpeechRecognitionResult.php
+++ /dev/null
@@ -1,211 +0,0 @@
-google.cloud.speech.v2.SpeechRecognitionResult
- */
-class SpeechRecognitionResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
- */
- private $alternatives;
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For `audio_channel_count` = `N`, its output values can range from `1` to
- * `N`.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- */
- protected $channel_tag = 0;
- /**
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_offset = 4;
- */
- protected $result_end_offset = null;
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $language_code = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- * @type int $channel_tag
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For `audio_channel_count` = `N`, its output values can range from `1` to
- * `N`.
- * @type \Google\Protobuf\Duration $result_end_offset
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- * @type string $language_code
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-
- /**
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
- * @param array<\Google\Cloud\Speech\V2\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternatives($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\SpeechRecognitionAlternative::class);
- $this->alternatives = $arr;
-
- return $this;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For `audio_channel_count` = `N`, its output values can range from `1` to
- * `N`.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- * @return int
- */
- public function getChannelTag()
- {
- return $this->channel_tag;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For `audio_channel_count` = `N`, its output values can range from `1` to
- * `N`.
- *
- * Generated from protobuf field int32 channel_tag = 2;
- * @param int $var
- * @return $this
- */
- public function setChannelTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->channel_tag = $var;
-
- return $this;
- }
-
- /**
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_offset = 4;
- * @return \Google\Protobuf\Duration|null
- */
- public function getResultEndOffset()
- {
- return $this->result_end_offset;
- }
-
- public function hasResultEndOffset()
- {
- return isset($this->result_end_offset);
- }
-
- public function clearResultEndOffset()
- {
- unset($this->result_end_offset);
- }
-
- /**
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_offset = 4;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setResultEndOffset($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->result_end_offset = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SrtOutputFileFormatConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SrtOutputFileFormatConfig.php
deleted file mode 100644
index 4fbfe9e05863..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/SrtOutputFileFormatConfig.php
+++ /dev/null
@@ -1,35 +0,0 @@
-google.cloud.speech.v2.SrtOutputFileFormatConfig
- */
-class SrtOutputFileFormatConfig extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionConfig.php
deleted file mode 100644
index 0d93fc0200c7..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionConfig.php
+++ /dev/null
@@ -1,237 +0,0 @@
-google.cloud.speech.v2.StreamingRecognitionConfig
- */
-class StreamingRecognitionConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. Features and audio metadata to use for the Automatic Speech
- * Recognition. This field in combination with the
- * [config_mask][google.cloud.speech.v2.StreamingRecognitionConfig.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] override
- * the values in the Recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * Recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 3;
- */
- protected $config_mask = null;
- /**
- * Speech recognition features to enable specific to streaming audio
- * recognition requests.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures streaming_features = 2;
- */
- protected $streaming_features = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\RecognitionConfig $config
- * Required. Features and audio metadata to use for the Automatic Speech
- * Recognition. This field in combination with the
- * [config_mask][google.cloud.speech.v2.StreamingRecognitionConfig.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @type \Google\Protobuf\FieldMask $config_mask
- * The list of fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] override
- * the values in the Recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * Recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- * @type \Google\Cloud\Speech\V2\StreamingRecognitionFeatures $streaming_features
- * Speech recognition features to enable specific to streaming audio
- * recognition requests.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. Features and audio metadata to use for the Automatic Speech
- * Recognition. This field in combination with the
- * [config_mask][google.cloud.speech.v2.StreamingRecognitionConfig.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\RecognitionConfig|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. Features and audio metadata to use for the Automatic Speech
- * Recognition. This field in combination with the
- * [config_mask][google.cloud.speech.v2.StreamingRecognitionConfig.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionConfig config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\RecognitionConfig $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionConfig::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] override
- * the values in the Recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * Recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 3;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getConfigMask()
- {
- return $this->config_mask;
- }
-
- public function hasConfigMask()
- {
- return isset($this->config_mask);
- }
-
- public function clearConfigMask()
- {
- unset($this->config_mask);
- }
-
- /**
- * The list of fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] that
- * override the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config] override
- * the values in the Recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * Recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.StreamingRecognitionConfig.config]
- * completely overrides and replaces the config in the recognizer for this
- * recognition request.
- *
- * Generated from protobuf field .google.protobuf.FieldMask config_mask = 3;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setConfigMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->config_mask = $var;
-
- return $this;
- }
-
- /**
- * Speech recognition features to enable specific to streaming audio
- * recognition requests.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures streaming_features = 2;
- * @return \Google\Cloud\Speech\V2\StreamingRecognitionFeatures|null
- */
- public function getStreamingFeatures()
- {
- return $this->streaming_features;
- }
-
- public function hasStreamingFeatures()
- {
- return isset($this->streaming_features);
- }
-
- public function clearStreamingFeatures()
- {
- unset($this->streaming_features);
- }
-
- /**
- * Speech recognition features to enable specific to streaming audio
- * recognition requests.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures streaming_features = 2;
- * @param \Google\Cloud\Speech\V2\StreamingRecognitionFeatures $var
- * @return $this
- */
- public function setStreamingFeatures($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\StreamingRecognitionFeatures::class);
- $this->streaming_features = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionFeatures.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionFeatures.php
deleted file mode 100644
index c593850afb8b..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionFeatures.php
+++ /dev/null
@@ -1,165 +0,0 @@
-google.cloud.speech.v2.StreamingRecognitionFeatures
- */
-class StreamingRecognitionFeatures extends \Google\Protobuf\Internal\Message
-{
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 1;
- */
- protected $enable_voice_activity_events = false;
- /**
- * Whether or not to stream interim results to the client. If set to true,
- * interim results will be streamed to the client. Otherwise, only the final
- * response will be streamed back.
- *
- * Generated from protobuf field bool interim_results = 2;
- */
- protected $interim_results = false;
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
- */
- protected $voice_activity_timeout = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type bool $enable_voice_activity_events
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- * @type bool $interim_results
- * Whether or not to stream interim results to the client. If set to true,
- * interim results will be streamed to the client. Otherwise, only the final
- * response will be streamed back.
- * @type \Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout $voice_activity_timeout
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 1;
- * @return bool
- */
- public function getEnableVoiceActivityEvents()
- {
- return $this->enable_voice_activity_events;
- }
-
- /**
- * If `true`, responses with voice activity speech events will be returned as
- * they are detected.
- *
- * Generated from protobuf field bool enable_voice_activity_events = 1;
- * @param bool $var
- * @return $this
- */
- public function setEnableVoiceActivityEvents($var)
- {
- GPBUtil::checkBool($var);
- $this->enable_voice_activity_events = $var;
-
- return $this;
- }
-
- /**
- * Whether or not to stream interim results to the client. If set to true,
- * interim results will be streamed to the client. Otherwise, only the final
- * response will be streamed back.
- *
- * Generated from protobuf field bool interim_results = 2;
- * @return bool
- */
- public function getInterimResults()
- {
- return $this->interim_results;
- }
-
- /**
- * Whether or not to stream interim results to the client. If set to true,
- * interim results will be streamed to the client. Otherwise, only the final
- * response will be streamed back.
- *
- * Generated from protobuf field bool interim_results = 2;
- * @param bool $var
- * @return $this
- */
- public function setInterimResults($var)
- {
- GPBUtil::checkBool($var);
- $this->interim_results = $var;
-
- return $this;
- }
-
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
- * @return \Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout|null
- */
- public function getVoiceActivityTimeout()
- {
- return $this->voice_activity_timeout;
- }
-
- public function hasVoiceActivityTimeout()
- {
- return isset($this->voice_activity_timeout);
- }
-
- public function clearVoiceActivityTimeout()
- {
- unset($this->voice_activity_timeout);
- }
-
- /**
- * If set, the server will automatically close the stream after the specified
- * duration has elapsed after the last VOICE_ACTIVITY speech event has been
- * sent. The field `voice_activity_events` must also be set to true.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout voice_activity_timeout = 3;
- * @param \Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout $var
- * @return $this
- */
- public function setVoiceActivityTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\StreamingRecognitionFeatures\VoiceActivityTimeout::class);
- $this->voice_activity_timeout = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionFeatures/VoiceActivityTimeout.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionFeatures/VoiceActivityTimeout.php
deleted file mode 100644
index 461ac701469d..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionFeatures/VoiceActivityTimeout.php
+++ /dev/null
@@ -1,140 +0,0 @@
-google.cloud.speech.v2.StreamingRecognitionFeatures.VoiceActivityTimeout
- */
-class VoiceActivityTimeout extends \Google\Protobuf\Internal\Message
-{
- /**
- * Duration to timeout the stream if no speech begins. If this is set and
- * no speech is detected in this duration at the start of the stream, the
- * server will close the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- */
- protected $speech_start_timeout = null;
- /**
- * Duration to timeout the stream after speech ends. If this is set and no
- * speech is detected in this duration after speech was detected, the server
- * will close the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- */
- protected $speech_end_timeout = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $speech_start_timeout
- * Duration to timeout the stream if no speech begins. If this is set and
- * no speech is detected in this duration at the start of the stream, the
- * server will close the stream.
- * @type \Google\Protobuf\Duration $speech_end_timeout
- * Duration to timeout the stream after speech ends. If this is set and no
- * speech is detected in this duration after speech was detected, the server
- * will close the stream.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Duration to timeout the stream if no speech begins. If this is set and
- * no speech is detected in this duration at the start of the stream, the
- * server will close the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechStartTimeout()
- {
- return $this->speech_start_timeout;
- }
-
- public function hasSpeechStartTimeout()
- {
- return isset($this->speech_start_timeout);
- }
-
- public function clearSpeechStartTimeout()
- {
- unset($this->speech_start_timeout);
- }
-
- /**
- * Duration to timeout the stream if no speech begins. If this is set and
- * no speech is detected in this duration at the start of the stream, the
- * server will close the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_start_timeout = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechStartTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_start_timeout = $var;
-
- return $this;
- }
-
- /**
- * Duration to timeout the stream after speech ends. If this is set and no
- * speech is detected in this duration after speech was detected, the server
- * will close the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechEndTimeout()
- {
- return $this->speech_end_timeout;
- }
-
- public function hasSpeechEndTimeout()
- {
- return isset($this->speech_end_timeout);
- }
-
- public function clearSpeechEndTimeout()
- {
- unset($this->speech_end_timeout);
- }
-
- /**
- * Duration to timeout the stream after speech ends. If this is set and no
- * speech is detected in this duration after speech was detected, the server
- * will close the stream.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_end_timeout = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechEndTimeout($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_end_timeout = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(VoiceActivityTimeout::class, \Google\Cloud\Speech\V2\StreamingRecognitionFeatures_VoiceActivityTimeout::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionResult.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionResult.php
deleted file mode 100644
index 03ffe3ed9089..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognitionResult.php
+++ /dev/null
@@ -1,320 +0,0 @@
-google.cloud.speech.v2.StreamingRecognitionResult
- */
-class StreamingRecognitionResult extends \Google\Protobuf\Internal\Message
-{
- /**
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
- */
- private $alternatives;
- /**
- * If `false`, this
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult]
- * represents an interim result that may change. If `true`, this is the final
- * time the speech service will return this particular
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult],
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- */
- protected $is_final = false;
- /**
- * An estimate of the likelihood that the recognizer will not change its guess
- * about this interim result. Values range from 0.0 (completely unstable)
- * to 1.0 (completely stable). This field is only provided for interim results
- * ([is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- */
- protected $stability = 0.0;
- /**
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_offset = 4;
- */
- protected $result_end_offset = null;
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For
- * `audio_channel_count` = `N`, its output values can range from `1` to `N`.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- */
- protected $channel_tag = 0;
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- */
- protected $language_code = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $alternatives
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- * @type bool $is_final
- * If `false`, this
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult]
- * represents an interim result that may change. If `true`, this is the final
- * time the speech service will return this particular
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult],
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- * @type float $stability
- * An estimate of the likelihood that the recognizer will not change its guess
- * about this interim result. Values range from 0.0 (completely unstable)
- * to 1.0 (completely stable). This field is only provided for interim results
- * ([is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- * @type \Google\Protobuf\Duration $result_end_offset
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- * @type int $channel_tag
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For
- * `audio_channel_count` = `N`, its output values can range from `1` to `N`.
- * @type string $language_code
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getAlternatives()
- {
- return $this->alternatives;
- }
-
- /**
- * May contain one or more recognition hypotheses. These alternatives are
- * ordered in terms of accuracy, with the top (first) alternative being the
- * most probable, as ranked by the recognizer.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.SpeechRecognitionAlternative alternatives = 1;
- * @param array<\Google\Cloud\Speech\V2\SpeechRecognitionAlternative>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setAlternatives($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\SpeechRecognitionAlternative::class);
- $this->alternatives = $arr;
-
- return $this;
- }
-
- /**
- * If `false`, this
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult]
- * represents an interim result that may change. If `true`, this is the final
- * time the speech service will return this particular
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult],
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- * @return bool
- */
- public function getIsFinal()
- {
- return $this->is_final;
- }
-
- /**
- * If `false`, this
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult]
- * represents an interim result that may change. If `true`, this is the final
- * time the speech service will return this particular
- * [StreamingRecognitionResult][google.cloud.speech.v2.StreamingRecognitionResult],
- * the recognizer will not return any further hypotheses for this portion of
- * the transcript and corresponding audio.
- *
- * Generated from protobuf field bool is_final = 2;
- * @param bool $var
- * @return $this
- */
- public function setIsFinal($var)
- {
- GPBUtil::checkBool($var);
- $this->is_final = $var;
-
- return $this;
- }
-
- /**
- * An estimate of the likelihood that the recognizer will not change its guess
- * about this interim result. Values range from 0.0 (completely unstable)
- * to 1.0 (completely stable). This field is only provided for interim results
- * ([is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- * @return float
- */
- public function getStability()
- {
- return $this->stability;
- }
-
- /**
- * An estimate of the likelihood that the recognizer will not change its guess
- * about this interim result. Values range from 0.0 (completely unstable)
- * to 1.0 (completely stable). This field is only provided for interim results
- * ([is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`).
- * The default of 0.0 is a sentinel value indicating `stability` was not set.
- *
- * Generated from protobuf field float stability = 3;
- * @param float $var
- * @return $this
- */
- public function setStability($var)
- {
- GPBUtil::checkFloat($var);
- $this->stability = $var;
-
- return $this;
- }
-
- /**
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_offset = 4;
- * @return \Google\Protobuf\Duration|null
- */
- public function getResultEndOffset()
- {
- return $this->result_end_offset;
- }
-
- public function hasResultEndOffset()
- {
- return isset($this->result_end_offset);
- }
-
- public function clearResultEndOffset()
- {
- unset($this->result_end_offset);
- }
-
- /**
- * Time offset of the end of this result relative to the beginning of the
- * audio.
- *
- * Generated from protobuf field .google.protobuf.Duration result_end_offset = 4;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setResultEndOffset($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->result_end_offset = $var;
-
- return $this;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For
- * `audio_channel_count` = `N`, its output values can range from `1` to `N`.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- * @return int
- */
- public function getChannelTag()
- {
- return $this->channel_tag;
- }
-
- /**
- * For multi-channel audio, this is the channel number corresponding to the
- * recognized result for the audio from that channel.
- * For
- * `audio_channel_count` = `N`, its output values can range from `1` to `N`.
- *
- * Generated from protobuf field int32 channel_tag = 5;
- * @param int $var
- * @return $this
- */
- public function setChannelTag($var)
- {
- GPBUtil::checkInt32($var);
- $this->channel_tag = $var;
-
- return $this;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @return string
- */
- public function getLanguageCode()
- {
- return $this->language_code;
- }
-
- /**
- * Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- * language tag of the language in this result. This language code was
- * detected to have the most likelihood of being spoken in the audio.
- *
- * Generated from protobuf field string language_code = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
- * @param string $var
- * @return $this
- */
- public function setLanguageCode($var)
- {
- GPBUtil::checkString($var, True);
- $this->language_code = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeRequest.php
deleted file mode 100644
index 7b1bc689507d..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeRequest.php
+++ /dev/null
@@ -1,180 +0,0 @@
-google.cloud.speech.v2.StreamingRecognizeRequest
- */
-class StreamingRecognizeRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $recognizer = '';
- protected $streaming_request;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $recognizer
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- * @type \Google\Cloud\Speech\V2\StreamingRecognitionConfig $streaming_config
- * StreamingRecognitionConfig to be used in this recognition attempt.
- * If provided, it will override the default RecognitionConfig stored in the
- * Recognizer.
- * @type string $audio
- * Inline audio bytes to be Recognized.
- * Maximum size for this field is 15 KB per request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getRecognizer()
- {
- return $this->recognizer;
- }
-
- /**
- * Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- *
- * Generated from protobuf field string recognizer = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setRecognizer($var)
- {
- GPBUtil::checkString($var, True);
- $this->recognizer = $var;
-
- return $this;
- }
-
- /**
- * StreamingRecognitionConfig to be used in this recognition attempt.
- * If provided, it will override the default RecognitionConfig stored in the
- * Recognizer.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionConfig streaming_config = 6;
- * @return \Google\Cloud\Speech\V2\StreamingRecognitionConfig|null
- */
- public function getStreamingConfig()
- {
- return $this->readOneof(6);
- }
-
- public function hasStreamingConfig()
- {
- return $this->hasOneof(6);
- }
-
- /**
- * StreamingRecognitionConfig to be used in this recognition attempt.
- * If provided, it will override the default RecognitionConfig stored in the
- * Recognizer.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognitionConfig streaming_config = 6;
- * @param \Google\Cloud\Speech\V2\StreamingRecognitionConfig $var
- * @return $this
- */
- public function setStreamingConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\StreamingRecognitionConfig::class);
- $this->writeOneof(6, $var);
-
- return $this;
- }
-
- /**
- * Inline audio bytes to be Recognized.
- * Maximum size for this field is 15 KB per request.
- *
- * Generated from protobuf field bytes audio = 5;
- * @return string
- */
- public function getAudio()
- {
- return $this->readOneof(5);
- }
-
- public function hasAudio()
- {
- return $this->hasOneof(5);
- }
-
- /**
- * Inline audio bytes to be Recognized.
- * Maximum size for this field is 15 KB per request.
- *
- * Generated from protobuf field bytes audio = 5;
- * @param string $var
- * @return $this
- */
- public function setAudio($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(5, $var);
-
- return $this;
- }
-
- /**
- * @return string
- */
- public function getStreamingRequest()
- {
- return $this->whichOneof("streaming_request");
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeResponse.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeResponse.php
deleted file mode 100644
index 5a75c73e8bc4..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeResponse.php
+++ /dev/null
@@ -1,247 +0,0 @@
-google.cloud.speech.v2.StreamingRecognizeResponse
- */
-class StreamingRecognizeResponse extends \Google\Protobuf\Internal\Message
-{
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`true`
- * result (the newly settled portion), followed by zero or more
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`
- * results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.StreamingRecognitionResult results = 6;
- */
- private $results;
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType speech_event_type = 3;
- */
- protected $speech_event_type = 0;
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_offset = 7;
- */
- protected $speech_event_offset = null;
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 5;
- */
- protected $metadata = null;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\StreamingRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $results
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`true`
- * result (the newly settled portion), followed by zero or more
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`
- * results (the interim results).
- * @type int $speech_event_type
- * Indicates the type of speech event.
- * @type \Google\Protobuf\Duration $speech_event_offset
- * Time offset between the beginning of the audio and event emission.
- * @type \Google\Cloud\Speech\V2\RecognitionResponseMetadata $metadata
- * Metadata about the recognition.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`true`
- * result (the newly settled portion), followed by zero or more
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`
- * results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.StreamingRecognitionResult results = 6;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getResults()
- {
- return $this->results;
- }
-
- /**
- * This repeated list contains zero or more results that
- * correspond to consecutive portions of the audio currently being processed.
- * It contains zero or one
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`true`
- * result (the newly settled portion), followed by zero or more
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final]=`false`
- * results (the interim results).
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.StreamingRecognitionResult results = 6;
- * @param array<\Google\Cloud\Speech\V2\StreamingRecognitionResult>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setResults($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\StreamingRecognitionResult::class);
- $this->results = $arr;
-
- return $this;
- }
-
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType speech_event_type = 3;
- * @return int
- */
- public function getSpeechEventType()
- {
- return $this->speech_event_type;
- }
-
- /**
- * Indicates the type of speech event.
- *
- * Generated from protobuf field .google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType speech_event_type = 3;
- * @param int $var
- * @return $this
- */
- public function setSpeechEventType($var)
- {
- GPBUtil::checkEnum($var, \Google\Cloud\Speech\V2\StreamingRecognizeResponse\SpeechEventType::class);
- $this->speech_event_type = $var;
-
- return $this;
- }
-
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_offset = 7;
- * @return \Google\Protobuf\Duration|null
- */
- public function getSpeechEventOffset()
- {
- return $this->speech_event_offset;
- }
-
- public function hasSpeechEventOffset()
- {
- return isset($this->speech_event_offset);
- }
-
- public function clearSpeechEventOffset()
- {
- unset($this->speech_event_offset);
- }
-
- /**
- * Time offset between the beginning of the audio and event emission.
- *
- * Generated from protobuf field .google.protobuf.Duration speech_event_offset = 7;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setSpeechEventOffset($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->speech_event_offset = $var;
-
- return $this;
- }
-
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 5;
- * @return \Google\Cloud\Speech\V2\RecognitionResponseMetadata|null
- */
- public function getMetadata()
- {
- return $this->metadata;
- }
-
- public function hasMetadata()
- {
- return isset($this->metadata);
- }
-
- public function clearMetadata()
- {
- unset($this->metadata);
- }
-
- /**
- * Metadata about the recognition.
- *
- * Generated from protobuf field .google.cloud.speech.v2.RecognitionResponseMetadata metadata = 5;
- * @param \Google\Cloud\Speech\V2\RecognitionResponseMetadata $var
- * @return $this
- */
- public function setMetadata($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\RecognitionResponseMetadata::class);
- $this->metadata = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeResponse/SpeechEventType.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeResponse/SpeechEventType.php
deleted file mode 100644
index 19686a66794f..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/StreamingRecognizeResponse/SpeechEventType.php
+++ /dev/null
@@ -1,82 +0,0 @@
-google.cloud.speech.v2.StreamingRecognizeResponse.SpeechEventType
- */
-class SpeechEventType
-{
- /**
- * No speech event specified.
- *
- * Generated from protobuf enum SPEECH_EVENT_TYPE_UNSPECIFIED = 0;
- */
- const SPEECH_EVENT_TYPE_UNSPECIFIED = 0;
- /**
- * This event indicates that the server has detected the end of the user's
- * speech utterance and expects no additional speech. Therefore, the server
- * will not process additional audio and will close the gRPC bidirectional
- * stream. This event is only sent if there was a force cutoff due to
- * silence being detected early. This event is only available through the
- * `latest_short` [model][google.cloud.speech.v2.Recognizer.model].
- *
- * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 1;
- */
- const END_OF_SINGLE_UTTERANCE = 1;
- /**
- * This event indicates that the server has detected the beginning of human
- * voice activity in the stream. This event can be returned multiple times
- * if speech starts and stops repeatedly throughout the stream. This event
- * is only sent if `voice_activity_events` is set to true.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_BEGIN = 2;
- */
- const SPEECH_ACTIVITY_BEGIN = 2;
- /**
- * This event indicates that the server has detected the end of human voice
- * activity in the stream. This event can be returned multiple times if
- * speech starts and stops repeatedly throughout the stream. This event is
- * only sent if `voice_activity_events` is set to true.
- *
- * Generated from protobuf enum SPEECH_ACTIVITY_END = 3;
- */
- const SPEECH_ACTIVITY_END = 3;
-
- private static $valueToName = [
- self::SPEECH_EVENT_TYPE_UNSPECIFIED => 'SPEECH_EVENT_TYPE_UNSPECIFIED',
- self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE',
- self::SPEECH_ACTIVITY_BEGIN => 'SPEECH_ACTIVITY_BEGIN',
- self::SPEECH_ACTIVITY_END => 'SPEECH_ACTIVITY_END',
- ];
-
- public static function name($value)
- {
- if (!isset(self::$valueToName[$value])) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no name defined for value %s', __CLASS__, $value));
- }
- return self::$valueToName[$value];
- }
-
-
- public static function value($name)
- {
- $const = __CLASS__ . '::' . strtoupper($name);
- if (!defined($const)) {
- throw new UnexpectedValueException(sprintf(
- 'Enum %s has no value defined for name %s', __CLASS__, $name));
- }
- return constant($const);
- }
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(SpeechEventType::class, \Google\Cloud\Speech\V2\StreamingRecognizeResponse_SpeechEventType::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranscriptNormalization.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranscriptNormalization.php
deleted file mode 100644
index 96b5a58dfba2..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranscriptNormalization.php
+++ /dev/null
@@ -1,82 +0,0 @@
- 0.8) and final transcripts.
- *
- * Generated from protobuf message google.cloud.speech.v2.TranscriptNormalization
- */
-class TranscriptNormalization extends \Google\Protobuf\Internal\Message
-{
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1;
- */
- private $entries;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type array<\Google\Cloud\Speech\V2\TranscriptNormalization\Entry>|\Google\Protobuf\Internal\RepeatedField $entries
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1;
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getEntries()
- {
- return $this->entries;
- }
-
- /**
- * A list of replacement entries. We will perform replacement with one entry
- * at a time. For example, the second entry in ["cat" => "dog", "mountain cat"
- * => "mountain dog"] will never be applied because we will always process the
- * first entry before it. At most 100 entries.
- *
- * Generated from protobuf field repeated .google.cloud.speech.v2.TranscriptNormalization.Entry entries = 1;
- * @param array<\Google\Cloud\Speech\V2\TranscriptNormalization\Entry>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setEntries($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\TranscriptNormalization\Entry::class);
- $this->entries = $arr;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranscriptNormalization/Entry.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranscriptNormalization/Entry.php
deleted file mode 100644
index bc2f78532d5e..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranscriptNormalization/Entry.php
+++ /dev/null
@@ -1,138 +0,0 @@
-google.cloud.speech.v2.TranscriptNormalization.Entry
- */
-class Entry extends \Google\Protobuf\Internal\Message
-{
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- */
- protected $search = '';
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- */
- protected $replace = '';
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- */
- protected $case_sensitive = false;
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $search
- * What to replace. Max length is 100 characters.
- * @type string $replace
- * What to replace with. Max length is 100 characters.
- * @type bool $case_sensitive
- * Whether the search is case sensitive.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- * @return string
- */
- public function getSearch()
- {
- return $this->search;
- }
-
- /**
- * What to replace. Max length is 100 characters.
- *
- * Generated from protobuf field string search = 1;
- * @param string $var
- * @return $this
- */
- public function setSearch($var)
- {
- GPBUtil::checkString($var, True);
- $this->search = $var;
-
- return $this;
- }
-
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- * @return string
- */
- public function getReplace()
- {
- return $this->replace;
- }
-
- /**
- * What to replace with. Max length is 100 characters.
- *
- * Generated from protobuf field string replace = 2;
- * @param string $var
- * @return $this
- */
- public function setReplace($var)
- {
- GPBUtil::checkString($var, True);
- $this->replace = $var;
-
- return $this;
- }
-
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @return bool
- */
- public function getCaseSensitive()
- {
- return $this->case_sensitive;
- }
-
- /**
- * Whether the search is case sensitive.
- *
- * Generated from protobuf field bool case_sensitive = 3;
- * @param bool $var
- * @return $this
- */
- public function setCaseSensitive($var)
- {
- GPBUtil::checkBool($var);
- $this->case_sensitive = $var;
-
- return $this;
- }
-
-}
-
-// Adding a class alias for backwards compatibility with the previous class name.
-class_alias(Entry::class, \Google\Cloud\Speech\V2\TranscriptNormalization_Entry::class);
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranslationConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranslationConfig.php
deleted file mode 100644
index 7940a41bbdf3..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/TranslationConfig.php
+++ /dev/null
@@ -1,68 +0,0 @@
-google.cloud.speech.v2.TranslationConfig
- */
-class TranslationConfig extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The language code to translate to.
- *
- * Generated from protobuf field string target_language = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $target_language = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $target_language
- * Required. The language code to translate to.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The language code to translate to.
- *
- * Generated from protobuf field string target_language = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return string
- */
- public function getTargetLanguage()
- {
- return $this->target_language;
- }
-
- /**
- * Required. The language code to translate to.
- *
- * Generated from protobuf field string target_language = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param string $var
- * @return $this
- */
- public function setTargetLanguage($var)
- {
- GPBUtil::checkString($var, True);
- $this->target_language = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeleteCustomClassRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeleteCustomClassRequest.php
deleted file mode 100644
index 233567da5cb5..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeleteCustomClassRequest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-google.cloud.speech.v2.UndeleteCustomClassRequest
- */
-class UndeleteCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the CustomClass to undelete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * If set, validate the request and preview the undeleted CustomClass, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- */
- protected $validate_only = false;
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- */
- protected $etag = '';
-
- /**
- * @param string $name Required. The name of the CustomClass to undelete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * Please see {@see SpeechClient::customClassName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\UndeleteCustomClassRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the CustomClass to undelete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * @type bool $validate_only
- * If set, validate the request and preview the undeleted CustomClass, but do
- * not actually undelete it.
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the CustomClass to undelete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the CustomClass to undelete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the undeleted CustomClass, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the undeleted CustomClass, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeletePhraseSetRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeletePhraseSetRequest.php
deleted file mode 100644
index affc3d6470fa..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeletePhraseSetRequest.php
+++ /dev/null
@@ -1,168 +0,0 @@
-google.cloud.speech.v2.UndeletePhraseSetRequest
- */
-class UndeletePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the PhraseSet to undelete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * If set, validate the request and preview the undeleted PhraseSet, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- */
- protected $validate_only = false;
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- */
- protected $etag = '';
-
- /**
- * @param string $name Required. The name of the PhraseSet to undelete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * Please see {@see SpeechClient::phraseSetName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\UndeletePhraseSetRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the PhraseSet to undelete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * @type bool $validate_only
- * If set, validate the request and preview the undeleted PhraseSet, but do
- * not actually undelete it.
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the PhraseSet to undelete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the PhraseSet to undelete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the undeleted PhraseSet, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the undeleted PhraseSet, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeleteRecognizerRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeleteRecognizerRequest.php
deleted file mode 100644
index 8298b383d99a..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UndeleteRecognizerRequest.php
+++ /dev/null
@@ -1,168 +0,0 @@
-google.cloud.speech.v2.UndeleteRecognizerRequest
- */
-class UndeleteRecognizerRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The name of the Recognizer to undelete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- */
- protected $name = '';
- /**
- * If set, validate the request and preview the undeleted Recognizer, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- */
- protected $validate_only = false;
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- */
- protected $etag = '';
-
- /**
- * @param string $name Required. The name of the Recognizer to undelete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- * Please see {@see SpeechClient::recognizerName()} for help formatting this field.
- *
- * @return \Google\Cloud\Speech\V2\UndeleteRecognizerRequest
- *
- * @experimental
- */
- public static function build(string $name): self
- {
- return (new self())
- ->setName($name);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Required. The name of the Recognizer to undelete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- * @type bool $validate_only
- * If set, validate the request and preview the undeleted Recognizer, but do
- * not actually undelete it.
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The name of the Recognizer to undelete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
-
- /**
- * Required. The name of the Recognizer to undelete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- *
- * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the undeleted Recognizer, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the undeleted Recognizer, but do
- * not actually undelete it.
- *
- * Generated from protobuf field bool validate_only = 3;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- * @return string
- */
- public function getEtag()
- {
- return $this->etag;
- }
-
- /**
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- *
- * Generated from protobuf field string etag = 4;
- * @param string $var
- * @return $this
- */
- public function setEtag($var)
- {
- GPBUtil::checkString($var, True);
- $this->etag = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateConfigRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateConfigRequest.php
deleted file mode 100644
index 41d2cace7232..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateConfigRequest.php
+++ /dev/null
@@ -1,148 +0,0 @@
-google.cloud.speech.v2.UpdateConfigRequest
- */
-class UpdateConfigRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The config to update.
- * The config's `name` field is used to identify the config to be updated.
- * The expected format is `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Config config = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $config = null;
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
-
- /**
- * @param \Google\Cloud\Speech\V2\Config $config Required. The config to update.
- *
- * The config's `name` field is used to identify the config to be updated.
- * The expected format is `projects/{project}/locations/{location}/config`.
- * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated.
- *
- * @return \Google\Cloud\Speech\V2\UpdateConfigRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\Speech\V2\Config $config, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setConfig($config)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\Config $config
- * Required. The config to update.
- * The config's `name` field is used to identify the config to be updated.
- * The expected format is `projects/{project}/locations/{location}/config`.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The config to update.
- * The config's `name` field is used to identify the config to be updated.
- * The expected format is `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Config config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\Config|null
- */
- public function getConfig()
- {
- return $this->config;
- }
-
- public function hasConfig()
- {
- return isset($this->config);
- }
-
- public function clearConfig()
- {
- unset($this->config);
- }
-
- /**
- * Required. The config to update.
- * The config's `name` field is used to identify the config to be updated.
- * The expected format is `projects/{project}/locations/{location}/config`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Config config = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\Config $var
- * @return $this
- */
- public function setConfig($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\Config::class);
- $this->config = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to be updated.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateCustomClassRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateCustomClassRequest.php
deleted file mode 100644
index 3630b79a9b54..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateCustomClassRequest.php
+++ /dev/null
@@ -1,196 +0,0 @@
-google.cloud.speech.v2.UpdateCustomClassRequest
- */
-class UpdateCustomClassRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The CustomClass to update.
- * The CustomClass's `name` field is used to identify the CustomClass to
- * update. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $custom_class = null;
- /**
- * The list of fields to be updated. If empty, all fields are considered for
- * update.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
- /**
- * If set, validate the request and preview the updated CustomClass, but do
- * not actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- */
- protected $validate_only = false;
-
- /**
- * @param \Google\Cloud\Speech\V2\CustomClass $customClass Required. The CustomClass to update.
- *
- * The CustomClass's `name` field is used to identify the CustomClass to
- * update. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. If empty, all fields are considered for
- * update.
- *
- * @return \Google\Cloud\Speech\V2\UpdateCustomClassRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\Speech\V2\CustomClass $customClass, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setCustomClass($customClass)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\CustomClass $custom_class
- * Required. The CustomClass to update.
- * The CustomClass's `name` field is used to identify the CustomClass to
- * update. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to be updated. If empty, all fields are considered for
- * update.
- * @type bool $validate_only
- * If set, validate the request and preview the updated CustomClass, but do
- * not actually update it.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The CustomClass to update.
- * The CustomClass's `name` field is used to identify the CustomClass to
- * update. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\CustomClass|null
- */
- public function getCustomClass()
- {
- return $this->custom_class;
- }
-
- public function hasCustomClass()
- {
- return isset($this->custom_class);
- }
-
- public function clearCustomClass()
- {
- unset($this->custom_class);
- }
-
- /**
- * Required. The CustomClass to update.
- * The CustomClass's `name` field is used to identify the CustomClass to
- * update. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.CustomClass custom_class = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\CustomClass $var
- * @return $this
- */
- public function setCustomClass($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\CustomClass::class);
- $this->custom_class = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to be updated. If empty, all fields are considered for
- * update.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to be updated. If empty, all fields are considered for
- * update.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the updated CustomClass, but do
- * not actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the updated CustomClass, but do
- * not actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdatePhraseSetRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdatePhraseSetRequest.php
deleted file mode 100644
index 4fc4131bd5ab..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdatePhraseSetRequest.php
+++ /dev/null
@@ -1,191 +0,0 @@
-google.cloud.speech.v2.UpdatePhraseSetRequest
- */
-class UpdatePhraseSetRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The PhraseSet to update.
- * The PhraseSet's `name` field is used to identify the PhraseSet to update.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $phrase_set = null;
- /**
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire PhraseSet resource.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
- /**
- * If set, validate the request and preview the updated PhraseSet, but do not
- * actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- */
- protected $validate_only = false;
-
- /**
- * @param \Google\Cloud\Speech\V2\PhraseSet $phraseSet Required. The PhraseSet to update.
- *
- * The PhraseSet's `name` field is used to identify the PhraseSet to update.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire PhraseSet resource.
- *
- * @return \Google\Cloud\Speech\V2\UpdatePhraseSetRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\Speech\V2\PhraseSet $phraseSet, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setPhraseSet($phraseSet)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\PhraseSet $phrase_set
- * Required. The PhraseSet to update.
- * The PhraseSet's `name` field is used to identify the PhraseSet to update.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire PhraseSet resource.
- * @type bool $validate_only
- * If set, validate the request and preview the updated PhraseSet, but do not
- * actually update it.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The PhraseSet to update.
- * The PhraseSet's `name` field is used to identify the PhraseSet to update.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\PhraseSet|null
- */
- public function getPhraseSet()
- {
- return $this->phrase_set;
- }
-
- public function hasPhraseSet()
- {
- return isset($this->phrase_set);
- }
-
- public function clearPhraseSet()
- {
- unset($this->phrase_set);
- }
-
- /**
- * Required. The PhraseSet to update.
- * The PhraseSet's `name` field is used to identify the PhraseSet to update.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.PhraseSet phrase_set = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\PhraseSet $var
- * @return $this
- */
- public function setPhraseSet($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\PhraseSet::class);
- $this->phrase_set = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire PhraseSet resource.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire PhraseSet resource.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the updated PhraseSet, but do not
- * actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the updated PhraseSet, but do not
- * actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateRecognizerRequest.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateRecognizerRequest.php
deleted file mode 100644
index 469d974ec24a..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/UpdateRecognizerRequest.php
+++ /dev/null
@@ -1,191 +0,0 @@
-google.cloud.speech.v2.UpdateRecognizerRequest
- */
-class UpdateRecognizerRequest extends \Google\Protobuf\Internal\Message
-{
- /**
- * Required. The Recognizer to update.
- * The Recognizer's `name` field is used to identify the Recognizer to update.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer recognizer = 1 [(.google.api.field_behavior) = REQUIRED];
- */
- protected $recognizer = null;
- /**
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire Recognizer resource.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- */
- protected $update_mask = null;
- /**
- * If set, validate the request and preview the updated Recognizer, but do not
- * actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- */
- protected $validate_only = false;
-
- /**
- * @param \Google\Cloud\Speech\V2\Recognizer $recognizer Required. The Recognizer to update.
- *
- * The Recognizer's `name` field is used to identify the Recognizer to update.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- * @param \Google\Protobuf\FieldMask $updateMask The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire Recognizer resource.
- *
- * @return \Google\Cloud\Speech\V2\UpdateRecognizerRequest
- *
- * @experimental
- */
- public static function build(\Google\Cloud\Speech\V2\Recognizer $recognizer, \Google\Protobuf\FieldMask $updateMask): self
- {
- return (new self())
- ->setRecognizer($recognizer)
- ->setUpdateMask($updateMask);
- }
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Cloud\Speech\V2\Recognizer $recognizer
- * Required. The Recognizer to update.
- * The Recognizer's `name` field is used to identify the Recognizer to update.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- * @type \Google\Protobuf\FieldMask $update_mask
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire Recognizer resource.
- * @type bool $validate_only
- * If set, validate the request and preview the updated Recognizer, but do not
- * actually update it.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Required. The Recognizer to update.
- * The Recognizer's `name` field is used to identify the Recognizer to update.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer recognizer = 1 [(.google.api.field_behavior) = REQUIRED];
- * @return \Google\Cloud\Speech\V2\Recognizer|null
- */
- public function getRecognizer()
- {
- return $this->recognizer;
- }
-
- public function hasRecognizer()
- {
- return isset($this->recognizer);
- }
-
- public function clearRecognizer()
- {
- unset($this->recognizer);
- }
-
- /**
- * Required. The Recognizer to update.
- * The Recognizer's `name` field is used to identify the Recognizer to update.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- *
- * Generated from protobuf field .google.cloud.speech.v2.Recognizer recognizer = 1 [(.google.api.field_behavior) = REQUIRED];
- * @param \Google\Cloud\Speech\V2\Recognizer $var
- * @return $this
- */
- public function setRecognizer($var)
- {
- GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\Recognizer::class);
- $this->recognizer = $var;
-
- return $this;
- }
-
- /**
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire Recognizer resource.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @return \Google\Protobuf\FieldMask|null
- */
- public function getUpdateMask()
- {
- return $this->update_mask;
- }
-
- public function hasUpdateMask()
- {
- return isset($this->update_mask);
- }
-
- public function clearUpdateMask()
- {
- unset($this->update_mask);
- }
-
- /**
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire Recognizer resource.
- *
- * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2;
- * @param \Google\Protobuf\FieldMask $var
- * @return $this
- */
- public function setUpdateMask($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
- $this->update_mask = $var;
-
- return $this;
- }
-
- /**
- * If set, validate the request and preview the updated Recognizer, but do not
- * actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- * @return bool
- */
- public function getValidateOnly()
- {
- return $this->validate_only;
- }
-
- /**
- * If set, validate the request and preview the updated Recognizer, but do not
- * actually update it.
- *
- * Generated from protobuf field bool validate_only = 4;
- * @param bool $var
- * @return $this
- */
- public function setValidateOnly($var)
- {
- GPBUtil::checkBool($var);
- $this->validate_only = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/VttOutputFileFormatConfig.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/VttOutputFileFormatConfig.php
deleted file mode 100644
index 1341a2daf044..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/VttOutputFileFormatConfig.php
+++ /dev/null
@@ -1,34 +0,0 @@
-google.cloud.speech.v2.VttOutputFileFormatConfig
- */
-class VttOutputFileFormatConfig extends \Google\Protobuf\Internal\Message
-{
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/WordInfo.php b/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/WordInfo.php
deleted file mode 100644
index 5574aeeface2..000000000000
--- a/owl-bot-staging/Speech/v2/proto/src/Google/Cloud/Speech/V2/WordInfo.php
+++ /dev/null
@@ -1,307 +0,0 @@
-google.cloud.speech.v2.WordInfo
- */
-class WordInfo extends \Google\Protobuf\Internal\Message
-{
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_offset = 1;
- */
- protected $start_offset = null;
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_offset = 2;
- */
- protected $end_offset = null;
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- */
- protected $word = '';
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- */
- protected $confidence = 0.0;
- /**
- * A distinct label is assigned for every speaker within the audio. This field
- * specifies which one of those speakers was detected to have spoken this
- * word. `speaker_label` is set if
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is given and only in the top alternative.
- *
- * Generated from protobuf field string speaker_label = 6;
- */
- protected $speaker_label = '';
-
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Google\Protobuf\Duration $start_offset
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- * @type \Google\Protobuf\Duration $end_offset
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- * @type string $word
- * The word corresponding to this set of information.
- * @type float $confidence
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- * @type string $speaker_label
- * A distinct label is assigned for every speaker within the audio. This field
- * specifies which one of those speakers was detected to have spoken this
- * word. `speaker_label` is set if
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is given and only in the top alternative.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
- parent::__construct($data);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_offset = 1;
- * @return \Google\Protobuf\Duration|null
- */
- public function getStartOffset()
- {
- return $this->start_offset;
- }
-
- public function hasStartOffset()
- {
- return isset($this->start_offset);
- }
-
- public function clearStartOffset()
- {
- unset($this->start_offset);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the start of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- *
- * Generated from protobuf field .google.protobuf.Duration start_offset = 1;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setStartOffset($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->start_offset = $var;
-
- return $this;
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_offset = 2;
- * @return \Google\Protobuf\Duration|null
- */
- public function getEndOffset()
- {
- return $this->end_offset;
- }
-
- public function hasEndOffset()
- {
- return isset($this->end_offset);
- }
-
- public function clearEndOffset()
- {
- unset($this->end_offset);
- }
-
- /**
- * Time offset relative to the beginning of the audio,
- * and corresponding to the end of the spoken word.
- * This field is only set if
- * [enable_word_time_offsets][google.cloud.speech.v2.RecognitionFeatures.enable_word_time_offsets]
- * is `true` and only in the top hypothesis. This is an experimental feature
- * and the accuracy of the time offset can vary.
- *
- * Generated from protobuf field .google.protobuf.Duration end_offset = 2;
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setEndOffset($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->end_offset = $var;
-
- return $this;
- }
-
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- * @return string
- */
- public function getWord()
- {
- return $this->word;
- }
-
- /**
- * The word corresponding to this set of information.
- *
- * Generated from protobuf field string word = 3;
- * @param string $var
- * @return $this
- */
- public function setWord($var)
- {
- GPBUtil::checkString($var, True);
- $this->word = $var;
-
- return $this;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- * @return float
- */
- public function getConfidence()
- {
- return $this->confidence;
- }
-
- /**
- * The confidence estimate between 0.0 and 1.0. A higher number
- * indicates an estimated greater likelihood that the recognized words are
- * correct. This field is set only for the top alternative of a non-streaming
- * result or, of a streaming result where
- * [is_final][google.cloud.speech.v2.StreamingRecognitionResult.is_final] is
- * set to `true`. This field is not guaranteed to be accurate and users should
- * not rely on it to be always provided. The default of 0.0 is a sentinel
- * value indicating `confidence` was not set.
- *
- * Generated from protobuf field float confidence = 4;
- * @param float $var
- * @return $this
- */
- public function setConfidence($var)
- {
- GPBUtil::checkFloat($var);
- $this->confidence = $var;
-
- return $this;
- }
-
- /**
- * A distinct label is assigned for every speaker within the audio. This field
- * specifies which one of those speakers was detected to have spoken this
- * word. `speaker_label` is set if
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is given and only in the top alternative.
- *
- * Generated from protobuf field string speaker_label = 6;
- * @return string
- */
- public function getSpeakerLabel()
- {
- return $this->speaker_label;
- }
-
- /**
- * A distinct label is assigned for every speaker within the audio. This field
- * specifies which one of those speakers was detected to have spoken this
- * word. `speaker_label` is set if
- * [SpeakerDiarizationConfig][google.cloud.speech.v2.SpeakerDiarizationConfig]
- * is given and only in the top alternative.
- *
- * Generated from protobuf field string speaker_label = 6;
- * @param string $var
- * @return $this
- */
- public function setSpeakerLabel($var)
- {
- GPBUtil::checkString($var, True);
- $this->speaker_label = $var;
-
- return $this;
- }
-
-}
-
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/batch_recognize.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/batch_recognize.php
deleted file mode 100644
index 0c4759d6c004..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/batch_recognize.php
+++ /dev/null
@@ -1,88 +0,0 @@
-setRecognizer($formattedRecognizer);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->batchRecognize($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var BatchRecognizeResponse $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
-
- batch_recognize_sample($formattedRecognizer);
-}
-// [END speech_v2_generated_Speech_BatchRecognize_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_custom_class.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_custom_class.php
deleted file mode 100644
index 5b4f59fe0d50..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_custom_class.php
+++ /dev/null
@@ -1,86 +0,0 @@
-setCustomClass($customClass)
- ->setParent($formattedParent);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->createCustomClass($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var CustomClass $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');
-
- create_custom_class_sample($formattedParent);
-}
-// [END speech_v2_generated_Speech_CreateCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_phrase_set.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_phrase_set.php
deleted file mode 100644
index e6f0e79b42a8..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_phrase_set.php
+++ /dev/null
@@ -1,86 +0,0 @@
-setPhraseSet($phraseSet)
- ->setParent($formattedParent);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->createPhraseSet($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var PhraseSet $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');
-
- create_phrase_set_sample($formattedParent);
-}
-// [END speech_v2_generated_Speech_CreatePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_recognizer.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_recognizer.php
deleted file mode 100644
index c0eb9ce11a3c..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/create_recognizer.php
+++ /dev/null
@@ -1,86 +0,0 @@
-setRecognizer($recognizer)
- ->setParent($formattedParent);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->createRecognizer($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var Recognizer $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');
-
- create_recognizer_sample($formattedParent);
-}
-// [END speech_v2_generated_Speech_CreateRecognizer_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_custom_class.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_custom_class.php
deleted file mode 100644
index a21b56ed9a1a..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_custom_class.php
+++ /dev/null
@@ -1,85 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->deleteCustomClass($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var CustomClass $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- delete_custom_class_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_DeleteCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_phrase_set.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_phrase_set.php
deleted file mode 100644
index 430e53c724a8..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_phrase_set.php
+++ /dev/null
@@ -1,84 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->deletePhraseSet($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var PhraseSet $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- delete_phrase_set_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_DeletePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_recognizer.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_recognizer.php
deleted file mode 100644
index ca1c1d80a070..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/delete_recognizer.php
+++ /dev/null
@@ -1,84 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->deleteRecognizer($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var Recognizer $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
-
- delete_recognizer_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_DeleteRecognizer_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_config.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_config.php
deleted file mode 100644
index e36d3b50b929..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_config.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var Config $response */
- $response = $speechClient->getConfig($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::configName('[PROJECT]', '[LOCATION]');
-
- get_config_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_GetConfig_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_custom_class.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_custom_class.php
deleted file mode 100644
index b2563b83f32d..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_custom_class.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var CustomClass $response */
- $response = $speechClient->getCustomClass($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- get_custom_class_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_GetCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_location.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_location.php
deleted file mode 100644
index f19a6f1bb395..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_location.php
+++ /dev/null
@@ -1,57 +0,0 @@
-getLocation($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v2_generated_Speech_GetLocation_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_phrase_set.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_phrase_set.php
deleted file mode 100644
index a88d622c2b19..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_phrase_set.php
+++ /dev/null
@@ -1,73 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var PhraseSet $response */
- $response = $speechClient->getPhraseSet($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- get_phrase_set_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_GetPhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_recognizer.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_recognizer.php
deleted file mode 100644
index c7b5391ae52d..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/get_recognizer.php
+++ /dev/null
@@ -1,75 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var Recognizer $response */
- $response = $speechClient->getRecognizer($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
-
- get_recognizer_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_GetRecognizer_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_custom_classes.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_custom_classes.php
deleted file mode 100644
index 9dba4e1835a8..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_custom_classes.php
+++ /dev/null
@@ -1,77 +0,0 @@
-setParent($formattedParent);
-
- // Call the API and handle any network failures.
- try {
- /** @var PagedListResponse $response */
- $response = $speechClient->listCustomClasses($request);
-
- /** @var CustomClass $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_custom_classes_sample($formattedParent);
-}
-// [END speech_v2_generated_Speech_ListCustomClasses_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_locations.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_locations.php
deleted file mode 100644
index 12e9d2f3f6f1..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_locations.php
+++ /dev/null
@@ -1,62 +0,0 @@
-listLocations($request);
-
- /** @var Location $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v2_generated_Speech_ListLocations_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_phrase_sets.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_phrase_sets.php
deleted file mode 100644
index 5bb792e62f45..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_phrase_sets.php
+++ /dev/null
@@ -1,77 +0,0 @@
-setParent($formattedParent);
-
- // Call the API and handle any network failures.
- try {
- /** @var PagedListResponse $response */
- $response = $speechClient->listPhraseSets($request);
-
- /** @var PhraseSet $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_phrase_sets_sample($formattedParent);
-}
-// [END speech_v2_generated_Speech_ListPhraseSets_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_recognizers.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_recognizers.php
deleted file mode 100644
index 787d6b494d1b..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/list_recognizers.php
+++ /dev/null
@@ -1,77 +0,0 @@
-setParent($formattedParent);
-
- // Call the API and handle any network failures.
- try {
- /** @var PagedListResponse $response */
- $response = $speechClient->listRecognizers($request);
-
- /** @var Recognizer $element */
- foreach ($response as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedParent = SpeechClient::locationName('[PROJECT]', '[LOCATION]');
-
- list_recognizers_sample($formattedParent);
-}
-// [END speech_v2_generated_Speech_ListRecognizers_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/recognize.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/recognize.php
deleted file mode 100644
index ef9098477161..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/recognize.php
+++ /dev/null
@@ -1,75 +0,0 @@
-setRecognizer($formattedRecognizer);
-
- // Call the API and handle any network failures.
- try {
- /** @var RecognizeResponse $response */
- $response = $speechClient->recognize($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
-
- recognize_sample($formattedRecognizer);
-}
-// [END speech_v2_generated_Speech_Recognize_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/streaming_recognize.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/streaming_recognize.php
deleted file mode 100644
index 31ed15f0bf6b..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/streaming_recognize.php
+++ /dev/null
@@ -1,81 +0,0 @@
-setRecognizer($formattedRecognizer);
-
- // Call the API and handle any network failures.
- try {
- /** @var BidiStream $stream */
- $stream = $speechClient->streamingRecognize();
- $stream->writeAll([$request,]);
-
- /** @var StreamingRecognizeResponse $element */
- foreach ($stream->closeWriteAndReadAll() as $element) {
- printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedRecognizer = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
-
- streaming_recognize_sample($formattedRecognizer);
-}
-// [END speech_v2_generated_Speech_StreamingRecognize_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_custom_class.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_custom_class.php
deleted file mode 100644
index 8a1f2d6e2257..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_custom_class.php
+++ /dev/null
@@ -1,85 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->undeleteCustomClass($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var CustomClass $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
-
- undelete_custom_class_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_UndeleteCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_phrase_set.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_phrase_set.php
deleted file mode 100644
index 75e0c8785628..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_phrase_set.php
+++ /dev/null
@@ -1,84 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->undeletePhraseSet($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var PhraseSet $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
-
- undelete_phrase_set_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_UndeletePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_recognizer.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_recognizer.php
deleted file mode 100644
index 79e835380378..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/undelete_recognizer.php
+++ /dev/null
@@ -1,84 +0,0 @@
-setName($formattedName);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->undeleteRecognizer($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var Recognizer $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-
-/**
- * Helper to execute the sample.
- *
- * This sample has been automatically generated and should be regarded as a code
- * template only. It will require modifications to work:
- * - It may require correct/in-range values for request initialization.
- * - It may require specifying regional endpoints when creating the service client,
- * please see the apiEndpoint client configuration option for more details.
- */
-function callSample(): void
-{
- $formattedName = SpeechClient::recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
-
- undelete_recognizer_sample($formattedName);
-}
-// [END speech_v2_generated_Speech_UndeleteRecognizer_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_config.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_config.php
deleted file mode 100644
index bd211b2ddc5f..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_config.php
+++ /dev/null
@@ -1,59 +0,0 @@
-setConfig($config);
-
- // Call the API and handle any network failures.
- try {
- /** @var Config $response */
- $response = $speechClient->updateConfig($request);
- printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v2_generated_Speech_UpdateConfig_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_custom_class.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_custom_class.php
deleted file mode 100644
index 8b495e598071..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_custom_class.php
+++ /dev/null
@@ -1,71 +0,0 @@
-setCustomClass($customClass);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->updateCustomClass($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var CustomClass $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v2_generated_Speech_UpdateCustomClass_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_phrase_set.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_phrase_set.php
deleted file mode 100644
index 32150b8f90bb..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_phrase_set.php
+++ /dev/null
@@ -1,71 +0,0 @@
-setPhraseSet($phraseSet);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->updatePhraseSet($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var PhraseSet $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v2_generated_Speech_UpdatePhraseSet_sync]
diff --git a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_recognizer.php b/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_recognizer.php
deleted file mode 100644
index b05e54f39863..000000000000
--- a/owl-bot-staging/Speech/v2/samples/V2/SpeechClient/update_recognizer.php
+++ /dev/null
@@ -1,71 +0,0 @@
-setRecognizer($recognizer);
-
- // Call the API and handle any network failures.
- try {
- /** @var OperationResponse $response */
- $response = $speechClient->updateRecognizer($request);
- $response->pollUntilComplete();
-
- if ($response->operationSucceeded()) {
- /** @var Recognizer $result */
- $result = $response->getResult();
- printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
- } else {
- /** @var Status $error */
- $error = $response->getError();
- printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
- }
- } catch (ApiException $ex) {
- printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
- }
-}
-// [END speech_v2_generated_Speech_UpdateRecognizer_sync]
diff --git a/owl-bot-staging/Speech/v2/src/V2/Client/SpeechClient.php b/owl-bot-staging/Speech/v2/src/V2/Client/SpeechClient.php
deleted file mode 100644
index 8526e7f6d594..000000000000
--- a/owl-bot-staging/Speech/v2/src/V2/Client/SpeechClient.php
+++ /dev/null
@@ -1,1081 +0,0 @@
- batchRecognizeAsync(BatchRecognizeRequest $request, array $optionalArgs = [])
- * @method PromiseInterface createCustomClassAsync(CreateCustomClassRequest $request, array $optionalArgs = [])
- * @method PromiseInterface createPhraseSetAsync(CreatePhraseSetRequest $request, array $optionalArgs = [])
- * @method PromiseInterface createRecognizerAsync(CreateRecognizerRequest $request, array $optionalArgs = [])
- * @method PromiseInterface deleteCustomClassAsync(DeleteCustomClassRequest $request, array $optionalArgs = [])
- * @method PromiseInterface deletePhraseSetAsync(DeletePhraseSetRequest $request, array $optionalArgs = [])
- * @method PromiseInterface deleteRecognizerAsync(DeleteRecognizerRequest $request, array $optionalArgs = [])
- * @method PromiseInterface getConfigAsync(GetConfigRequest $request, array $optionalArgs = [])
- * @method PromiseInterface getCustomClassAsync(GetCustomClassRequest $request, array $optionalArgs = [])
- * @method PromiseInterface getPhraseSetAsync(GetPhraseSetRequest $request, array $optionalArgs = [])
- * @method PromiseInterface getRecognizerAsync(GetRecognizerRequest $request, array $optionalArgs = [])
- * @method PromiseInterface listCustomClassesAsync(ListCustomClassesRequest $request, array $optionalArgs = [])
- * @method PromiseInterface listPhraseSetsAsync(ListPhraseSetsRequest $request, array $optionalArgs = [])
- * @method PromiseInterface listRecognizersAsync(ListRecognizersRequest $request, array $optionalArgs = [])
- * @method PromiseInterface recognizeAsync(RecognizeRequest $request, array $optionalArgs = [])
- * @method PromiseInterface undeleteCustomClassAsync(UndeleteCustomClassRequest $request, array $optionalArgs = [])
- * @method PromiseInterface undeletePhraseSetAsync(UndeletePhraseSetRequest $request, array $optionalArgs = [])
- * @method PromiseInterface undeleteRecognizerAsync(UndeleteRecognizerRequest $request, array $optionalArgs = [])
- * @method PromiseInterface updateConfigAsync(UpdateConfigRequest $request, array $optionalArgs = [])
- * @method PromiseInterface updateCustomClassAsync(UpdateCustomClassRequest $request, array $optionalArgs = [])
- * @method PromiseInterface updatePhraseSetAsync(UpdatePhraseSetRequest $request, array $optionalArgs = [])
- * @method PromiseInterface updateRecognizerAsync(UpdateRecognizerRequest $request, array $optionalArgs = [])
- * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = [])
- * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = [])
- */
-final class SpeechClient
-{
- use GapicClientTrait;
- use ResourceHelperTrait;
-
- /** The name of the service. */
- private const SERVICE_NAME = 'google.cloud.speech.v2.Speech';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- private const SERVICE_ADDRESS = 'speech.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'speech.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- private const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- private const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/speech_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/speech_rest_client_config.php',
- ],
- ],
- ];
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a config
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted config resource.
- */
- public static function configName(string $project, string $location): string
- {
- return self::getPathTemplate('config')->render([
- 'project' => $project,
- 'location' => $location,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a crypto_key
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $keyRing
- * @param string $cryptoKey
- *
- * @return string The formatted crypto_key resource.
- */
- public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string
- {
- return self::getPathTemplate('cryptoKey')->render([
- 'project' => $project,
- 'location' => $location,
- 'key_ring' => $keyRing,
- 'crypto_key' => $cryptoKey,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * crypto_key_version resource.
- *
- * @param string $project
- * @param string $location
- * @param string $keyRing
- * @param string $cryptoKey
- * @param string $cryptoKeyVersion
- *
- * @return string The formatted crypto_key_version resource.
- */
- public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string
- {
- return self::getPathTemplate('cryptoKeyVersion')->render([
- 'project' => $project,
- 'location' => $location,
- 'key_ring' => $keyRing,
- 'crypto_key' => $cryptoKey,
- 'crypto_key_version' => $cryptoKeyVersion,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a custom_class
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $customClass
- *
- * @return string The formatted custom_class resource.
- */
- public static function customClassName(string $project, string $location, string $customClass): string
- {
- return self::getPathTemplate('customClass')->render([
- 'project' => $project,
- 'location' => $location,
- 'custom_class' => $customClass,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- */
- public static function locationName(string $project, string $location): string
- {
- return self::getPathTemplate('location')->render([
- 'project' => $project,
- 'location' => $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(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 recognizer
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $recognizer
- *
- * @return string The formatted recognizer resource.
- */
- public static function recognizerName(string $project, string $location, string $recognizer): string
- {
- return self::getPathTemplate('recognizer')->render([
- 'project' => $project,
- 'location' => $location,
- 'recognizer' => $recognizer,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - config: projects/{project}/locations/{location}/config
- * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
- * - customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- * - location: projects/{project}/locations/{location}
- * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- * - recognizer: projects/{project}/locations/{location}/recognizers/{recognizer}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param ?string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName(string $formattedName, ?string $template = null): array
- {
- return self::parseFormattedName($formattedName, $template);
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'speech.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * @type false|LoggerInterface $logger
- * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the
- * 'GOOGLE_SDK_PHP_LOGGING' environment flag
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /** Handles execution of the async variants for each documented method. */
- public function __call($method, $args)
- {
- if (substr($method, -5) !== 'Async') {
- trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR);
- }
-
- array_unshift($args, substr($method, 0, -5));
- return call_user_func_array([$this, 'startAsyncCall'], $args);
- }
-
- /**
- * Performs batch asynchronous speech recognition: send a request with N
- * audio files and receive a long running operation that can be polled to see
- * when the transcriptions are finished.
- *
- * The async variant is {@see SpeechClient::batchRecognizeAsync()} .
- *
- * @example samples/V2/SpeechClient/batch_recognize.php
- *
- * @param BatchRecognizeRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function batchRecognize(BatchRecognizeRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('BatchRecognize', $request, $callOptions)->wait();
- }
-
- /**
- * Creates a [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * The async variant is {@see SpeechClient::createCustomClassAsync()} .
- *
- * @example samples/V2/SpeechClient/create_custom_class.php
- *
- * @param CreateCustomClassRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createCustomClass(CreateCustomClassRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('CreateCustomClass', $request, $callOptions)->wait();
- }
-
- /**
- * Creates a [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * The async variant is {@see SpeechClient::createPhraseSetAsync()} .
- *
- * @example samples/V2/SpeechClient/create_phrase_set.php
- *
- * @param CreatePhraseSetRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createPhraseSet(CreatePhraseSetRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('CreatePhraseSet', $request, $callOptions)->wait();
- }
-
- /**
- * Creates a [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * The async variant is {@see SpeechClient::createRecognizerAsync()} .
- *
- * @example samples/V2/SpeechClient/create_recognizer.php
- *
- * @param CreateRecognizerRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function createRecognizer(CreateRecognizerRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('CreateRecognizer', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes the [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * The async variant is {@see SpeechClient::deleteCustomClassAsync()} .
- *
- * @example samples/V2/SpeechClient/delete_custom_class.php
- *
- * @param DeleteCustomClassRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteCustomClass(DeleteCustomClassRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('DeleteCustomClass', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes the [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * The async variant is {@see SpeechClient::deletePhraseSetAsync()} .
- *
- * @example samples/V2/SpeechClient/delete_phrase_set.php
- *
- * @param DeletePhraseSetRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deletePhraseSet(DeletePhraseSetRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('DeletePhraseSet', $request, $callOptions)->wait();
- }
-
- /**
- * Deletes the [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * The async variant is {@see SpeechClient::deleteRecognizerAsync()} .
- *
- * @example samples/V2/SpeechClient/delete_recognizer.php
- *
- * @param DeleteRecognizerRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function deleteRecognizer(DeleteRecognizerRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('DeleteRecognizer', $request, $callOptions)->wait();
- }
-
- /**
- * Returns the requested [Config][google.cloud.speech.v2.Config].
- *
- * The async variant is {@see SpeechClient::getConfigAsync()} .
- *
- * @example samples/V2/SpeechClient/get_config.php
- *
- * @param GetConfigRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return Config
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getConfig(GetConfigRequest $request, array $callOptions = []): Config
- {
- return $this->startApiCall('GetConfig', $request, $callOptions)->wait();
- }
-
- /**
- * Returns the requested
- * [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * The async variant is {@see SpeechClient::getCustomClassAsync()} .
- *
- * @example samples/V2/SpeechClient/get_custom_class.php
- *
- * @param GetCustomClassRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return CustomClass
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getCustomClass(GetCustomClassRequest $request, array $callOptions = []): CustomClass
- {
- return $this->startApiCall('GetCustomClass', $request, $callOptions)->wait();
- }
-
- /**
- * Returns the requested
- * [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * The async variant is {@see SpeechClient::getPhraseSetAsync()} .
- *
- * @example samples/V2/SpeechClient/get_phrase_set.php
- *
- * @param GetPhraseSetRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return PhraseSet
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getPhraseSet(GetPhraseSetRequest $request, array $callOptions = []): PhraseSet
- {
- return $this->startApiCall('GetPhraseSet', $request, $callOptions)->wait();
- }
-
- /**
- * Returns the requested
- * [Recognizer][google.cloud.speech.v2.Recognizer]. Fails with
- * [NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested Recognizer doesn't
- * exist.
- *
- * The async variant is {@see SpeechClient::getRecognizerAsync()} .
- *
- * @example samples/V2/SpeechClient/get_recognizer.php
- *
- * @param GetRecognizerRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return Recognizer
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getRecognizer(GetRecognizerRequest $request, array $callOptions = []): Recognizer
- {
- return $this->startApiCall('GetRecognizer', $request, $callOptions)->wait();
- }
-
- /**
- * Lists CustomClasses.
- *
- * The async variant is {@see SpeechClient::listCustomClassesAsync()} .
- *
- * @example samples/V2/SpeechClient/list_custom_classes.php
- *
- * @param ListCustomClassesRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return PagedListResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function listCustomClasses(ListCustomClassesRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListCustomClasses', $request, $callOptions);
- }
-
- /**
- * Lists PhraseSets.
- *
- * The async variant is {@see SpeechClient::listPhraseSetsAsync()} .
- *
- * @example samples/V2/SpeechClient/list_phrase_sets.php
- *
- * @param ListPhraseSetsRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return PagedListResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function listPhraseSets(ListPhraseSetsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListPhraseSets', $request, $callOptions);
- }
-
- /**
- * Lists Recognizers.
- *
- * The async variant is {@see SpeechClient::listRecognizersAsync()} .
- *
- * @example samples/V2/SpeechClient/list_recognizers.php
- *
- * @param ListRecognizersRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return PagedListResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function listRecognizers(ListRecognizersRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListRecognizers', $request, $callOptions);
- }
-
- /**
- * Performs synchronous Speech recognition: receive results after all audio
- * has been sent and processed.
- *
- * The async variant is {@see SpeechClient::recognizeAsync()} .
- *
- * @example samples/V2/SpeechClient/recognize.php
- *
- * @param RecognizeRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return RecognizeResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function recognize(RecognizeRequest $request, array $callOptions = []): RecognizeResponse
- {
- return $this->startApiCall('Recognize', $request, $callOptions)->wait();
- }
-
- /**
- * Performs bidirectional streaming speech recognition: receive results while
- * sending audio. This method is only available via the gRPC API (not REST).
- *
- * @example samples/V2/SpeechClient/streaming_recognize.php
- *
- * @param array $callOptions {
- * Optional.
- *
- * @type int $timeoutMillis
- * Timeout to use for this call.
- * }
- *
- * @return BidiStream
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function streamingRecognize(array $callOptions = []): BidiStream
- {
- return $this->startApiCall('StreamingRecognize', null, $callOptions);
- }
-
- /**
- * Undeletes the [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * The async variant is {@see SpeechClient::undeleteCustomClassAsync()} .
- *
- * @example samples/V2/SpeechClient/undelete_custom_class.php
- *
- * @param UndeleteCustomClassRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function undeleteCustomClass(UndeleteCustomClassRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('UndeleteCustomClass', $request, $callOptions)->wait();
- }
-
- /**
- * Undeletes the [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * The async variant is {@see SpeechClient::undeletePhraseSetAsync()} .
- *
- * @example samples/V2/SpeechClient/undelete_phrase_set.php
- *
- * @param UndeletePhraseSetRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function undeletePhraseSet(UndeletePhraseSetRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('UndeletePhraseSet', $request, $callOptions)->wait();
- }
-
- /**
- * Undeletes the [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * The async variant is {@see SpeechClient::undeleteRecognizerAsync()} .
- *
- * @example samples/V2/SpeechClient/undelete_recognizer.php
- *
- * @param UndeleteRecognizerRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function undeleteRecognizer(UndeleteRecognizerRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('UndeleteRecognizer', $request, $callOptions)->wait();
- }
-
- /**
- * Updates the [Config][google.cloud.speech.v2.Config].
- *
- * The async variant is {@see SpeechClient::updateConfigAsync()} .
- *
- * @example samples/V2/SpeechClient/update_config.php
- *
- * @param UpdateConfigRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return Config
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updateConfig(UpdateConfigRequest $request, array $callOptions = []): Config
- {
- return $this->startApiCall('UpdateConfig', $request, $callOptions)->wait();
- }
-
- /**
- * Updates the [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * The async variant is {@see SpeechClient::updateCustomClassAsync()} .
- *
- * @example samples/V2/SpeechClient/update_custom_class.php
- *
- * @param UpdateCustomClassRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updateCustomClass(UpdateCustomClassRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('UpdateCustomClass', $request, $callOptions)->wait();
- }
-
- /**
- * Updates the [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * The async variant is {@see SpeechClient::updatePhraseSetAsync()} .
- *
- * @example samples/V2/SpeechClient/update_phrase_set.php
- *
- * @param UpdatePhraseSetRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updatePhraseSet(UpdatePhraseSetRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('UpdatePhraseSet', $request, $callOptions)->wait();
- }
-
- /**
- * Updates the [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * The async variant is {@see SpeechClient::updateRecognizerAsync()} .
- *
- * @example samples/V2/SpeechClient/update_recognizer.php
- *
- * @param UpdateRecognizerRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return OperationResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function updateRecognizer(UpdateRecognizerRequest $request, array $callOptions = []): OperationResponse
- {
- return $this->startApiCall('UpdateRecognizer', $request, $callOptions)->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * The async variant is {@see SpeechClient::getLocationAsync()} .
- *
- * @example samples/V2/SpeechClient/get_location.php
- *
- * @param GetLocationRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return Location
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function getLocation(GetLocationRequest $request, array $callOptions = []): Location
- {
- return $this->startApiCall('GetLocation', $request, $callOptions)->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * The async variant is {@see SpeechClient::listLocationsAsync()} .
- *
- * @example samples/V2/SpeechClient/list_locations.php
- *
- * @param ListLocationsRequest $request A request to house fields associated with the call.
- * @param array $callOptions {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return PagedListResponse
- *
- * @throws ApiException Thrown if the API call fails.
- */
- public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse
- {
- return $this->startApiCall('ListLocations', $request, $callOptions);
- }
-}
diff --git a/owl-bot-staging/Speech/v2/src/V2/Gapic/SpeechGapicClient.php b/owl-bot-staging/Speech/v2/src/V2/Gapic/SpeechGapicClient.php
deleted file mode 100644
index 8f5761932fb8..000000000000
--- a/owl-bot-staging/Speech/v2/src/V2/Gapic/SpeechGapicClient.php
+++ /dev/null
@@ -1,2379 +0,0 @@
-recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- * $operationResponse = $speechClient->batchRecognize($formattedRecognizer);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->batchRecognize($formattedRecognizer);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'batchRecognize');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * Many parameters require resource names to be formatted in a particular way. To
- * assist with these names, this class includes a format method for each type of
- * name, and additionally a parseName method to extract the individual identifiers
- * contained within formatted names that are returned by the API.
- *
- * @deprecated Please use the new service client {@see \Google\Cloud\Speech\V2\Client\SpeechClient}.
- */
-class SpeechGapicClient
-{
- use GapicClientTrait;
-
- /** The name of the service. */
- const SERVICE_NAME = 'google.cloud.speech.v2.Speech';
-
- /**
- * The default address of the service.
- *
- * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead.
- */
- const SERVICE_ADDRESS = 'speech.googleapis.com';
-
- /** The address template of the service. */
- private const SERVICE_ADDRESS_TEMPLATE = 'speech.UNIVERSE_DOMAIN';
-
- /** The default port of the service. */
- const DEFAULT_SERVICE_PORT = 443;
-
- /** The name of the code generator, to be included in the agent header. */
- const CODEGEN_NAME = 'gapic';
-
- /** The default scopes required by the service. */
- public static $serviceScopes = [
- 'https://www.googleapis.com/auth/cloud-platform',
- ];
-
- private static $configNameTemplate;
-
- private static $cryptoKeyNameTemplate;
-
- private static $cryptoKeyVersionNameTemplate;
-
- private static $customClassNameTemplate;
-
- private static $locationNameTemplate;
-
- private static $phraseSetNameTemplate;
-
- private static $recognizerNameTemplate;
-
- private static $pathTemplateMap;
-
- private $operationsClient;
-
- private static function getClientDefaults()
- {
- return [
- 'serviceName' => self::SERVICE_NAME,
- 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT,
- 'clientConfig' => __DIR__ . '/../resources/speech_client_config.json',
- 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_descriptor_config.php',
- 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_grpc_config.json',
- 'credentialsConfig' => [
- 'defaultScopes' => self::$serviceScopes,
- ],
- 'transportConfig' => [
- 'rest' => [
- 'restClientConfigPath' => __DIR__ . '/../resources/speech_rest_client_config.php',
- ],
- ],
- ];
- }
-
- private static function getConfigNameTemplate()
- {
- if (self::$configNameTemplate == null) {
- self::$configNameTemplate = new PathTemplate('projects/{project}/locations/{location}/config');
- }
-
- return self::$configNameTemplate;
- }
-
- private static function getCryptoKeyNameTemplate()
- {
- if (self::$cryptoKeyNameTemplate == null) {
- self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}');
- }
-
- return self::$cryptoKeyNameTemplate;
- }
-
- private static function getCryptoKeyVersionNameTemplate()
- {
- if (self::$cryptoKeyVersionNameTemplate == null) {
- self::$cryptoKeyVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}');
- }
-
- return self::$cryptoKeyVersionNameTemplate;
- }
-
- private static function getCustomClassNameTemplate()
- {
- if (self::$customClassNameTemplate == null) {
- self::$customClassNameTemplate = new PathTemplate('projects/{project}/locations/{location}/customClasses/{custom_class}');
- }
-
- return self::$customClassNameTemplate;
- }
-
- private static function getLocationNameTemplate()
- {
- if (self::$locationNameTemplate == null) {
- self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
- }
-
- 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 getRecognizerNameTemplate()
- {
- if (self::$recognizerNameTemplate == null) {
- self::$recognizerNameTemplate = new PathTemplate('projects/{project}/locations/{location}/recognizers/{recognizer}');
- }
-
- return self::$recognizerNameTemplate;
- }
-
- private static function getPathTemplateMap()
- {
- if (self::$pathTemplateMap == null) {
- self::$pathTemplateMap = [
- 'config' => self::getConfigNameTemplate(),
- 'cryptoKey' => self::getCryptoKeyNameTemplate(),
- 'cryptoKeyVersion' => self::getCryptoKeyVersionNameTemplate(),
- 'customClass' => self::getCustomClassNameTemplate(),
- 'location' => self::getLocationNameTemplate(),
- 'phraseSet' => self::getPhraseSetNameTemplate(),
- 'recognizer' => self::getRecognizerNameTemplate(),
- ];
- }
-
- return self::$pathTemplateMap;
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a config
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted config resource.
- */
- public static function configName($project, $location)
- {
- return self::getConfigNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a crypto_key
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $keyRing
- * @param string $cryptoKey
- *
- * @return string The formatted crypto_key resource.
- */
- public static function cryptoKeyName($project, $location, $keyRing, $cryptoKey)
- {
- return self::getCryptoKeyNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'key_ring' => $keyRing,
- 'crypto_key' => $cryptoKey,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a
- * crypto_key_version resource.
- *
- * @param string $project
- * @param string $location
- * @param string $keyRing
- * @param string $cryptoKey
- * @param string $cryptoKeyVersion
- *
- * @return string The formatted crypto_key_version resource.
- */
- public static function cryptoKeyVersionName($project, $location, $keyRing, $cryptoKey, $cryptoKeyVersion)
- {
- return self::getCryptoKeyVersionNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'key_ring' => $keyRing,
- 'crypto_key' => $cryptoKey,
- 'crypto_key_version' => $cryptoKeyVersion,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a custom_class
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $customClass
- *
- * @return string The formatted custom_class resource.
- */
- public static function customClassName($project, $location, $customClass)
- {
- return self::getCustomClassNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'custom_class' => $customClass,
- ]);
- }
-
- /**
- * Formats a string containing the fully-qualified path to represent a location
- * resource.
- *
- * @param string $project
- * @param string $location
- *
- * @return string The formatted location resource.
- */
- public static function locationName($project, $location)
- {
- return self::getLocationNameTemplate()->render([
- 'project' => $project,
- 'location' => $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 recognizer
- * resource.
- *
- * @param string $project
- * @param string $location
- * @param string $recognizer
- *
- * @return string The formatted recognizer resource.
- */
- public static function recognizerName($project, $location, $recognizer)
- {
- return self::getRecognizerNameTemplate()->render([
- 'project' => $project,
- 'location' => $location,
- 'recognizer' => $recognizer,
- ]);
- }
-
- /**
- * Parses a formatted name string and returns an associative array of the components in the name.
- * The following name formats are supported:
- * Template: Pattern
- * - config: projects/{project}/locations/{location}/config
- * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}
- * - customClass: projects/{project}/locations/{location}/customClasses/{custom_class}
- * - location: projects/{project}/locations/{location}
- * - phraseSet: projects/{project}/locations/{location}/phraseSets/{phrase_set}
- * - recognizer: projects/{project}/locations/{location}/recognizers/{recognizer}
- *
- * The optional $template argument can be supplied to specify a particular pattern,
- * and must match one of the templates listed above. If no $template argument is
- * provided, or if the $template argument does not match one of the templates
- * listed, then parseName will check each of the supported templates, and return
- * the first match.
- *
- * @param string $formattedName The formatted name string
- * @param string $template Optional name of template to match
- *
- * @return array An associative array from name component IDs to component values.
- *
- * @throws ValidationException If $formattedName could not be matched.
- */
- public static function parseName($formattedName, $template = null)
- {
- $templateMap = self::getPathTemplateMap();
- if ($template) {
- if (!isset($templateMap[$template])) {
- throw new ValidationException("Template name $template does not exist");
- }
-
- return $templateMap[$template]->match($formattedName);
- }
-
- foreach ($templateMap as $templateName => $pathTemplate) {
- try {
- return $pathTemplate->match($formattedName);
- } catch (ValidationException $ex) {
- // Swallow the exception to continue trying other path templates
- }
- }
-
- throw new ValidationException("Input did not match any known format. Input: $formattedName");
- }
-
- /**
- * Return an OperationsClient object with the same endpoint as $this.
- *
- * @return OperationsClient
- */
- public function getOperationsClient()
- {
- return $this->operationsClient;
- }
-
- /**
- * Resume an existing long running operation that was previously started by a long
- * running API method. If $methodName is not provided, or does not match a long
- * running API method, then the operation can still be resumed, but the
- * OperationResponse object will not deserialize the final response.
- *
- * @param string $operationName The name of the long running operation
- * @param string $methodName The name of the method used to start the operation
- *
- * @return OperationResponse
- */
- public function resumeOperation($operationName, $methodName = null)
- {
- $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : [];
- $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options);
- $operation->reload();
- return $operation;
- }
-
- /**
- * Constructor.
- *
- * @param array $options {
- * Optional. Options for configuring the service API wrapper.
- *
- * @type string $apiEndpoint
- * The address of the API remote host. May optionally include the port, formatted
- * as ":". Default 'speech.googleapis.com:443'.
- * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials
- * The credentials to be used by the client to authorize API calls. This option
- * accepts either a path to a credentials file, or a decoded credentials file as a
- * PHP array.
- * *Advanced usage*: In addition, this option can also accept a pre-constructed
- * {@see \Google\Auth\FetchAuthTokenInterface} object or
- * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these
- * objects are provided, any settings in $credentialsConfig will be ignored.
- * @type array $credentialsConfig
- * Options used to configure credentials, including auth token caching, for the
- * client. For a full list of supporting configuration options, see
- * {@see \Google\ApiCore\CredentialsWrapper::build()} .
- * @type bool $disableRetries
- * Determines whether or not retries defined by the client configuration should be
- * disabled. Defaults to `false`.
- * @type string|array $clientConfig
- * Client method configuration, including retry settings. This option can be either
- * a path to a JSON file, or a PHP array containing the decoded JSON data. By
- * default this settings points to the default client config file, which is
- * provided in the resources folder.
- * @type string|TransportInterface $transport
- * The transport used for executing network requests. May be either the string
- * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system.
- * *Advanced usage*: Additionally, it is possible to pass in an already
- * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note
- * that when this object is provided, any settings in $transportConfig, and any
- * $apiEndpoint setting, will be ignored.
- * @type array $transportConfig
- * Configuration options that will be used to construct the transport. Options for
- * each supported transport type should be passed in a key for that transport. For
- * example:
- * $transportConfig = [
- * 'grpc' => [...],
- * 'rest' => [...],
- * ];
- * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and
- * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the
- * supported options.
- * @type callable $clientCertSource
- * A callable which returns the client cert as a string. This can be used to
- * provide a certificate and private key to the transport layer for mTLS.
- * }
- *
- * @throws ValidationException
- */
- public function __construct(array $options = [])
- {
- $clientOptions = $this->buildClientOptions($options);
- $this->setClientOptions($clientOptions);
- $this->operationsClient = $this->createOperationsClient($clientOptions);
- }
-
- /**
- * Performs batch asynchronous speech recognition: send a request with N
- * audio files and receive a long running operation that can be polled to see
- * when the transcriptions are finished.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedRecognizer = $speechClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- * $operationResponse = $speechClient->batchRecognize($formattedRecognizer);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->batchRecognize($formattedRecognizer);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'batchRecognize');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $recognizer Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RecognitionConfig $config
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.BatchRecognizeRequest.config_mask]
- * field can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @type FieldMask $configMask
- * The list of fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] that override
- * the values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all given fields in
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.BatchRecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @type BatchRecognizeFileMetadata[] $files
- * Audio files with file metadata for ASR.
- * The maximum number of files allowed to be specified is 15.
- * @type RecognitionOutputConfig $recognitionOutputConfig
- * Configuration options for where to output the transcripts of each file.
- * @type int $processingStrategy
- * Processing strategy to use for this request.
- * For allowed values, use constants defined on {@see \Google\Cloud\Speech\V2\BatchRecognizeRequest\ProcessingStrategy}
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function batchRecognize($recognizer, array $optionalArgs = [])
- {
- $request = new BatchRecognizeRequest();
- $requestParamHeaders = [];
- $request->setRecognizer($recognizer);
- $requestParamHeaders['recognizer'] = $recognizer;
- if (isset($optionalArgs['config'])) {
- $request->setConfig($optionalArgs['config']);
- }
-
- if (isset($optionalArgs['configMask'])) {
- $request->setConfigMask($optionalArgs['configMask']);
- }
-
- if (isset($optionalArgs['files'])) {
- $request->setFiles($optionalArgs['files']);
- }
-
- if (isset($optionalArgs['recognitionOutputConfig'])) {
- $request->setRecognitionOutputConfig($optionalArgs['recognitionOutputConfig']);
- }
-
- if (isset($optionalArgs['processingStrategy'])) {
- $request->setProcessingStrategy($optionalArgs['processingStrategy']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('BatchRecognize', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $customClass = new CustomClass();
- * $formattedParent = $speechClient->locationName('[PROJECT]', '[LOCATION]');
- * $operationResponse = $speechClient->createCustomClass($customClass, $formattedParent);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->createCustomClass($customClass, $formattedParent);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'createCustomClass');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param CustomClass $customClass Required. The CustomClass to create.
- * @param string $parent Required. The project and location where this CustomClass will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the CustomClass, but do not
- * actually create it.
- * @type string $customClassId
- * The ID to use for the CustomClass, which will become the final component of
- * the CustomClass's resource name.
- *
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function createCustomClass($customClass, $parent, array $optionalArgs = [])
- {
- $request = new CreateCustomClassRequest();
- $requestParamHeaders = [];
- $request->setCustomClass($customClass);
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['customClassId'])) {
- $request->setCustomClassId($optionalArgs['customClassId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateCustomClass', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $phraseSet = new PhraseSet();
- * $formattedParent = $speechClient->locationName('[PROJECT]', '[LOCATION]');
- * $operationResponse = $speechClient->createPhraseSet($phraseSet, $formattedParent);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->createPhraseSet($phraseSet, $formattedParent);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'createPhraseSet');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param PhraseSet $phraseSet Required. The PhraseSet to create.
- * @param string $parent Required. The project and location where this PhraseSet will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the PhraseSet, but do not
- * actually create it.
- * @type string $phraseSetId
- * The ID to use for the PhraseSet, which will become the final component of
- * the PhraseSet's resource name.
- *
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function createPhraseSet($phraseSet, $parent, array $optionalArgs = [])
- {
- $request = new CreatePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setPhraseSet($phraseSet);
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['phraseSetId'])) {
- $request->setPhraseSetId($optionalArgs['phraseSetId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreatePhraseSet', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Creates a [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $recognizer = new Recognizer();
- * $formattedParent = $speechClient->locationName('[PROJECT]', '[LOCATION]');
- * $operationResponse = $speechClient->createRecognizer($recognizer, $formattedParent);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->createRecognizer($recognizer, $formattedParent);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'createRecognizer');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param Recognizer $recognizer Required. The Recognizer to create.
- * @param string $parent Required. The project and location where this Recognizer will be created.
- * The expected format is `projects/{project}/locations/{location}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the Recognizer, but do not
- * actually create it.
- * @type string $recognizerId
- * The ID to use for the Recognizer, which will become the final component of
- * the Recognizer's resource name.
- *
- * This value should be 4-63 characters, and valid characters
- * are /[a-z][0-9]-/.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function createRecognizer($recognizer, $parent, array $optionalArgs = [])
- {
- $request = new CreateRecognizerRequest();
- $requestParamHeaders = [];
- $request->setRecognizer($recognizer);
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['recognizerId'])) {
- $request->setRecognizerId($optionalArgs['recognizerId']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('CreateRecognizer', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes the [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $operationResponse = $speechClient->deleteCustomClass($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->deleteCustomClass($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'deleteCustomClass');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the CustomClass to delete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the deleted CustomClass, but do
- * not actually delete it.
- * @type bool $allowMissing
- * If set to true, and the CustomClass is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteCustomClass($name, array $optionalArgs = [])
- {
- $request = new DeleteCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['allowMissing'])) {
- $request->setAllowMissing($optionalArgs['allowMissing']);
- }
-
- if (isset($optionalArgs['etag'])) {
- $request->setEtag($optionalArgs['etag']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteCustomClass', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes the [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $operationResponse = $speechClient->deletePhraseSet($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->deletePhraseSet($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'deletePhraseSet');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the PhraseSet to delete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the deleted PhraseSet, but do not
- * actually delete it.
- * @type bool $allowMissing
- * If set to true, and the PhraseSet is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function deletePhraseSet($name, array $optionalArgs = [])
- {
- $request = new DeletePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['allowMissing'])) {
- $request->setAllowMissing($optionalArgs['allowMissing']);
- }
-
- if (isset($optionalArgs['etag'])) {
- $request->setEtag($optionalArgs['etag']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeletePhraseSet', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Deletes the [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- * $operationResponse = $speechClient->deleteRecognizer($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->deleteRecognizer($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'deleteRecognizer');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the Recognizer to delete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the deleted Recognizer, but do not
- * actually delete it.
- * @type bool $allowMissing
- * If set to true, and the Recognizer is not found, the request will succeed
- * and be a no-op (no Operation is recorded in this case).
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function deleteRecognizer($name, array $optionalArgs = [])
- {
- $request = new DeleteRecognizerRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['allowMissing'])) {
- $request->setAllowMissing($optionalArgs['allowMissing']);
- }
-
- if (isset($optionalArgs['etag'])) {
- $request->setEtag($optionalArgs['etag']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('DeleteRecognizer', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Returns the requested [Config][google.cloud.speech.v2.Config].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->configName('[PROJECT]', '[LOCATION]');
- * $response = $speechClient->getConfig($formattedName);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the config to retrieve. There is exactly one config
- * resource per project per location. The expected format is
- * `projects/{project}/locations/{location}/config`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V2\Config
- *
- * @throws ApiException if the remote call fails
- */
- public function getConfig($name, array $optionalArgs = [])
- {
- $request = new GetConfigRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetConfig', Config::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Returns the requested
- * [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $response = $speechClient->getCustomClass($formattedName);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the CustomClass to retrieve. The expected format is
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V2\CustomClass
- *
- * @throws ApiException if the remote call fails
- */
- public function getCustomClass($name, array $optionalArgs = [])
- {
- $request = new GetCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetCustomClass', CustomClass::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Returns the requested
- * [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $response = $speechClient->getPhraseSet($formattedName);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the PhraseSet to retrieve. The expected format is
- * `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V2\PhraseSet
- *
- * @throws ApiException if the remote call fails
- */
- public function getPhraseSet($name, array $optionalArgs = [])
- {
- $request = new GetPhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetPhraseSet', PhraseSet::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Returns the requested
- * [Recognizer][google.cloud.speech.v2.Recognizer]. Fails with
- * [NOT_FOUND][google.rpc.Code.NOT_FOUND] if the requested Recognizer doesn't
- * exist.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- * $response = $speechClient->getRecognizer($formattedName);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the Recognizer to retrieve. The expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V2\Recognizer
- *
- * @throws ApiException if the remote call fails
- */
- public function getRecognizer($name, array $optionalArgs = [])
- {
- $request = new GetRecognizerRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetRecognizer', Recognizer::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Lists CustomClasses.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedParent = $speechClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $speechClient->listCustomClasses($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $speechClient->listCustomClasses($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The project and location of CustomClass resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type bool $showDeleted
- * Whether, or not, to show resources that have been deleted.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listCustomClasses($parent, array $optionalArgs = [])
- {
- $request = new ListCustomClassesRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['showDeleted'])) {
- $request->setShowDeleted($optionalArgs['showDeleted']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListCustomClasses', $optionalArgs, ListCustomClassesResponse::class, $request);
- }
-
- /**
- * Lists PhraseSets.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedParent = $speechClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $speechClient->listPhraseSets($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $speechClient->listPhraseSets($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The project and location of PhraseSet resources to list. The
- * expected format is `projects/{project}/locations/{location}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type bool $showDeleted
- * Whether, or not, to show resources that have been deleted.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listPhraseSets($parent, array $optionalArgs = [])
- {
- $request = new ListPhraseSetsRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['showDeleted'])) {
- $request->setShowDeleted($optionalArgs['showDeleted']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListPhraseSets', $optionalArgs, ListPhraseSetsResponse::class, $request);
- }
-
- /**
- * Lists Recognizers.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedParent = $speechClient->locationName('[PROJECT]', '[LOCATION]');
- * // Iterate over pages of elements
- * $pagedResponse = $speechClient->listRecognizers($formattedParent);
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $speechClient->listRecognizers($formattedParent);
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $parent Required. The project and location of Recognizers to list. The expected
- * format is `projects/{project}/locations/{location}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type bool $showDeleted
- * Whether, or not, to show resources that have been deleted.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listRecognizers($parent, array $optionalArgs = [])
- {
- $request = new ListRecognizersRequest();
- $requestParamHeaders = [];
- $request->setParent($parent);
- $requestParamHeaders['parent'] = $parent;
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- if (isset($optionalArgs['showDeleted'])) {
- $request->setShowDeleted($optionalArgs['showDeleted']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListRecognizers', $optionalArgs, ListRecognizersResponse::class, $request);
- }
-
- /**
- * Performs synchronous Speech recognition: receive results after all audio
- * has been sent and processed.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedRecognizer = $speechClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- * $response = $speechClient->recognize($formattedRecognizer);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $recognizer Required. The name of the Recognizer to use during recognition. The
- * expected format is
- * `projects/{project}/locations/{location}/recognizers/{recognizer}`. The
- * {recognizer} segment may be set to `_` to use an empty implicit Recognizer.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type RecognitionConfig $config
- * Features and audio metadata to use for the Automatic Speech Recognition.
- * This field in combination with the
- * [config_mask][google.cloud.speech.v2.RecognizeRequest.config_mask] field
- * can be used to override parts of the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the Recognizer resource.
- * @type FieldMask $configMask
- * The list of fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] that override the
- * values in the
- * [default_recognition_config][google.cloud.speech.v2.Recognizer.default_recognition_config]
- * of the recognizer during this recognition request. If no mask is provided,
- * all non-default valued fields in
- * [config][google.cloud.speech.v2.RecognizeRequest.config] override the
- * values in the recognizer for this recognition request. If a mask is
- * provided, only the fields listed in the mask override the config in the
- * recognizer for this recognition request. If a wildcard (`*`) is provided,
- * [config][google.cloud.speech.v2.RecognizeRequest.config] completely
- * overrides and replaces the config in the recognizer for this recognition
- * request.
- * @type string $content
- * The audio data bytes encoded as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. As
- * with all bytes fields, proto buffers use a pure binary representation,
- * whereas JSON representations use base64.
- * @type string $uri
- * URI that points to a file that contains audio data bytes as specified in
- * [RecognitionConfig][google.cloud.speech.v2.RecognitionConfig]. The file
- * must not be compressed (for example, gzip). Currently, only Google Cloud
- * Storage URIs are supported, which must be specified in the following
- * format: `gs://bucket_name/object_name` (other URI formats return
- * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]). For more
- * information, see [Request
- * URIs](https://cloud.google.com/storage/docs/reference-uris).
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V2\RecognizeResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function recognize($recognizer, array $optionalArgs = [])
- {
- $request = new RecognizeRequest();
- $requestParamHeaders = [];
- $request->setRecognizer($recognizer);
- $requestParamHeaders['recognizer'] = $recognizer;
- if (isset($optionalArgs['config'])) {
- $request->setConfig($optionalArgs['config']);
- }
-
- if (isset($optionalArgs['configMask'])) {
- $request->setConfigMask($optionalArgs['configMask']);
- }
-
- if (isset($optionalArgs['content'])) {
- $request->setContent($optionalArgs['content']);
- }
-
- if (isset($optionalArgs['uri'])) {
- $request->setUri($optionalArgs['uri']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('Recognize', RecognizeResponse::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Performs bidirectional streaming speech recognition: receive results while
- * sending audio. This method is only available via the gRPC API (not REST).
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $recognizer = 'recognizer';
- * $request = new StreamingRecognizeRequest();
- * $request->setRecognizer($recognizer);
- * // Write all requests to the server, then read all responses until the
- * // stream is complete
- * $requests = [
- * $request,
- * ];
- * $stream = $speechClient->streamingRecognize();
- * $stream->writeAll($requests);
- * foreach ($stream->closeWriteAndReadAll() as $element) {
- * // doSomethingWith($element);
- * }
- * // Alternatively:
- * // Write requests individually, making read() calls if
- * // required. Call closeWrite() once writes are complete, and read the
- * // remaining responses from the server.
- * $requests = [
- * $request,
- * ];
- * $stream = $speechClient->streamingRecognize();
- * foreach ($requests as $request) {
- * $stream->write($request);
- * // if required, read a single response from the stream
- * $element = $stream->read();
- * // doSomethingWith($element)
- * }
- * $stream->closeWrite();
- * $element = $stream->read();
- * while (!is_null($element)) {
- * // doSomethingWith($element)
- * $element = $stream->read();
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type int $timeoutMillis
- * Timeout to use for this call.
- * }
- *
- * @return \Google\ApiCore\BidiStream
- *
- * @throws ApiException if the remote call fails
- */
- public function streamingRecognize(array $optionalArgs = [])
- {
- return $this->startCall('StreamingRecognize', StreamingRecognizeResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL);
- }
-
- /**
- * Undeletes the [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- * $operationResponse = $speechClient->undeleteCustomClass($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->undeleteCustomClass($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'undeleteCustomClass');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the CustomClass to undelete.
- * Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the undeleted CustomClass, but do
- * not actually undelete it.
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function undeleteCustomClass($name, array $optionalArgs = [])
- {
- $request = new UndeleteCustomClassRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['etag'])) {
- $request->setEtag($optionalArgs['etag']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UndeleteCustomClass', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Undeletes the [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- * $operationResponse = $speechClient->undeletePhraseSet($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->undeletePhraseSet($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'undeletePhraseSet');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the PhraseSet to undelete.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the undeleted PhraseSet, but do
- * not actually undelete it.
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function undeletePhraseSet($name, array $optionalArgs = [])
- {
- $request = new UndeletePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['etag'])) {
- $request->setEtag($optionalArgs['etag']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UndeletePhraseSet', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Undeletes the [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $formattedName = $speechClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- * $operationResponse = $speechClient->undeleteRecognizer($formattedName);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->undeleteRecognizer($formattedName);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'undeleteRecognizer');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param string $name Required. The name of the Recognizer to undelete.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`
- * @param array $optionalArgs {
- * Optional.
- *
- * @type bool $validateOnly
- * If set, validate the request and preview the undeleted Recognizer, but do
- * not actually undelete it.
- * @type string $etag
- * This checksum is computed by the server based on the value of other
- * fields. This may be sent on update, undelete, and delete requests to ensure
- * the client has an up-to-date value before proceeding.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function undeleteRecognizer($name, array $optionalArgs = [])
- {
- $request = new UndeleteRecognizerRequest();
- $requestParamHeaders = [];
- $request->setName($name);
- $requestParamHeaders['name'] = $name;
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- if (isset($optionalArgs['etag'])) {
- $request->setEtag($optionalArgs['etag']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UndeleteRecognizer', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the [Config][google.cloud.speech.v2.Config].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $config = new Config();
- * $response = $speechClient->updateConfig($config);
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param Config $config Required. The config to update.
- *
- * The config's `name` field is used to identify the config to be updated.
- * The expected format is `projects/{project}/locations/{location}/config`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to be updated.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Speech\V2\Config
- *
- * @throws ApiException if the remote call fails
- */
- public function updateConfig($config, array $optionalArgs = [])
- {
- $request = new UpdateConfigRequest();
- $requestParamHeaders = [];
- $request->setConfig($config);
- $requestParamHeaders['config.name'] = $config->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('UpdateConfig', Config::class, $optionalArgs, $request)->wait();
- }
-
- /**
- * Updates the [CustomClass][google.cloud.speech.v2.CustomClass].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $customClass = new CustomClass();
- * $operationResponse = $speechClient->updateCustomClass($customClass);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->updateCustomClass($customClass);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'updateCustomClass');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param CustomClass $customClass Required. The CustomClass to update.
- *
- * The CustomClass's `name` field is used to identify the CustomClass to
- * update. Format:
- * `projects/{project}/locations/{location}/customClasses/{custom_class}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to be updated. If empty, all fields are considered for
- * update.
- * @type bool $validateOnly
- * If set, validate the request and preview the updated CustomClass, but do
- * not actually update it.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function updateCustomClass($customClass, array $optionalArgs = [])
- {
- $request = new UpdateCustomClassRequest();
- $requestParamHeaders = [];
- $request->setCustomClass($customClass);
- $requestParamHeaders['custom_class.name'] = $customClass->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateCustomClass', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the [PhraseSet][google.cloud.speech.v2.PhraseSet].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $phraseSet = new PhraseSet();
- * $operationResponse = $speechClient->updatePhraseSet($phraseSet);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->updatePhraseSet($phraseSet);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'updatePhraseSet');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param PhraseSet $phraseSet Required. The PhraseSet to update.
- *
- * The PhraseSet's `name` field is used to identify the PhraseSet to update.
- * Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire PhraseSet resource.
- * @type bool $validateOnly
- * If set, validate the request and preview the updated PhraseSet, but do not
- * actually update it.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function updatePhraseSet($phraseSet, array $optionalArgs = [])
- {
- $request = new UpdatePhraseSetRequest();
- $requestParamHeaders = [];
- $request->setPhraseSet($phraseSet);
- $requestParamHeaders['phrase_set.name'] = $phraseSet->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdatePhraseSet', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Updates the [Recognizer][google.cloud.speech.v2.Recognizer].
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $recognizer = new Recognizer();
- * $operationResponse = $speechClient->updateRecognizer($recognizer);
- * $operationResponse->pollUntilComplete();
- * if ($operationResponse->operationSucceeded()) {
- * $result = $operationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $operationResponse->getError();
- * // handleError($error)
- * }
- * // Alternatively:
- * // start the operation, keep the operation name, and resume later
- * $operationResponse = $speechClient->updateRecognizer($recognizer);
- * $operationName = $operationResponse->getName();
- * // ... do other work
- * $newOperationResponse = $speechClient->resumeOperation($operationName, 'updateRecognizer');
- * while (!$newOperationResponse->isDone()) {
- * // ... do other work
- * $newOperationResponse->reload();
- * }
- * if ($newOperationResponse->operationSucceeded()) {
- * $result = $newOperationResponse->getResult();
- * // doSomethingWith($result)
- * } else {
- * $error = $newOperationResponse->getError();
- * // handleError($error)
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param Recognizer $recognizer Required. The Recognizer to update.
- *
- * The Recognizer's `name` field is used to identify the Recognizer to update.
- * Format: `projects/{project}/locations/{location}/recognizers/{recognizer}`.
- * @param array $optionalArgs {
- * Optional.
- *
- * @type FieldMask $updateMask
- * The list of fields to update. If empty, all non-default valued fields are
- * considered for update. Use `*` to update the entire Recognizer resource.
- * @type bool $validateOnly
- * If set, validate the request and preview the updated Recognizer, but do not
- * actually update it.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\OperationResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function updateRecognizer($recognizer, array $optionalArgs = [])
- {
- $request = new UpdateRecognizerRequest();
- $requestParamHeaders = [];
- $request->setRecognizer($recognizer);
- $requestParamHeaders['recognizer.name'] = $recognizer->getName();
- if (isset($optionalArgs['updateMask'])) {
- $request->setUpdateMask($optionalArgs['updateMask']);
- }
-
- if (isset($optionalArgs['validateOnly'])) {
- $request->setValidateOnly($optionalArgs['validateOnly']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startOperationsCall('UpdateRecognizer', $optionalArgs, $request, $this->getOperationsClient())->wait();
- }
-
- /**
- * Gets information about a location.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * $response = $speechClient->getLocation();
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * Resource name for the location.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\Cloud\Location\Location
- *
- * @throws ApiException if the remote call fails
- */
- public function getLocation(array $optionalArgs = [])
- {
- $request = new GetLocationRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->startCall('GetLocation', Location::class, $optionalArgs, $request, Call::UNARY_CALL, 'google.cloud.location.Locations')->wait();
- }
-
- /**
- * Lists information about the supported locations for this service.
- *
- * Sample code:
- * ```
- * $speechClient = new SpeechClient();
- * try {
- * // Iterate over pages of elements
- * $pagedResponse = $speechClient->listLocations();
- * foreach ($pagedResponse->iteratePages() as $page) {
- * foreach ($page as $element) {
- * // doSomethingWith($element);
- * }
- * }
- * // Alternatively:
- * // Iterate through all elements
- * $pagedResponse = $speechClient->listLocations();
- * foreach ($pagedResponse->iterateAllElements() as $element) {
- * // doSomethingWith($element);
- * }
- * } finally {
- * $speechClient->close();
- * }
- * ```
- *
- * @param array $optionalArgs {
- * Optional.
- *
- * @type string $name
- * The resource that owns the locations collection, if applicable.
- * @type string $filter
- * The standard list filter.
- * @type int $pageSize
- * The maximum number of resources contained in the underlying API
- * response. The API may return fewer values in a page, even if
- * there are additional values to be retrieved.
- * @type string $pageToken
- * A page token is used to specify a page of values to be returned.
- * If no page token is specified (the default), the first page
- * of values will be returned. Any page token used here must have
- * been generated by a previous call to the API.
- * @type RetrySettings|array $retrySettings
- * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an
- * associative array of retry settings parameters. See the documentation on
- * {@see RetrySettings} for example usage.
- * }
- *
- * @return \Google\ApiCore\PagedListResponse
- *
- * @throws ApiException if the remote call fails
- */
- public function listLocations(array $optionalArgs = [])
- {
- $request = new ListLocationsRequest();
- $requestParamHeaders = [];
- if (isset($optionalArgs['name'])) {
- $request->setName($optionalArgs['name']);
- $requestParamHeaders['name'] = $optionalArgs['name'];
- }
-
- if (isset($optionalArgs['filter'])) {
- $request->setFilter($optionalArgs['filter']);
- }
-
- if (isset($optionalArgs['pageSize'])) {
- $request->setPageSize($optionalArgs['pageSize']);
- }
-
- if (isset($optionalArgs['pageToken'])) {
- $request->setPageToken($optionalArgs['pageToken']);
- }
-
- $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders);
- $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader();
- return $this->getPagedListResponse('ListLocations', $optionalArgs, ListLocationsResponse::class, $request, 'google.cloud.location.Locations');
- }
-}
diff --git a/owl-bot-staging/Speech/v2/src/V2/SpeechClient.php b/owl-bot-staging/Speech/v2/src/V2/SpeechClient.php
deleted file mode 100644
index 7e6c723e5a95..000000000000
--- a/owl-bot-staging/Speech/v2/src/V2/SpeechClient.php
+++ /dev/null
@@ -1,34 +0,0 @@
- [
- 'google.cloud.speech.v2.Speech' => [
- 'BatchRecognize' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\BatchRecognizeResponse',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'recognizer',
- 'fieldAccessors' => [
- 'getRecognizer',
- ],
- ],
- ],
- ],
- 'CreateCustomClass' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\CustomClass',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'CreatePhraseSet' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\PhraseSet',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'CreateRecognizer' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\Recognizer',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'DeleteCustomClass' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\CustomClass',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeletePhraseSet' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\PhraseSet',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteRecognizer' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\Recognizer',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UndeleteCustomClass' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\CustomClass',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UndeletePhraseSet' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\PhraseSet',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UndeleteRecognizer' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\Recognizer',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateCustomClass' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\CustomClass',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'custom_class.name',
- 'fieldAccessors' => [
- 'getCustomClass',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdatePhraseSet' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\PhraseSet',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'phrase_set.name',
- 'fieldAccessors' => [
- 'getPhraseSet',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateRecognizer' => [
- 'longRunning' => [
- 'operationReturnType' => '\Google\Cloud\Speech\V2\Recognizer',
- 'metadataReturnType' => '\Google\Cloud\Speech\V2\OperationMetadata',
- 'initialPollDelayMillis' => '500',
- 'pollDelayMultiplier' => '1.5',
- 'maxPollDelayMillis' => '5000',
- 'totalPollTimeoutMillis' => '300000',
- ],
- 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL,
- 'headerParams' => [
- [
- 'keyName' => 'recognizer.name',
- 'fieldAccessors' => [
- 'getRecognizer',
- 'getName',
- ],
- ],
- ],
- ],
- 'GetConfig' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\Config',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetCustomClass' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\CustomClass',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetPhraseSet' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\PhraseSet',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetRecognizer' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\Recognizer',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListCustomClasses' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getCustomClasses',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\ListCustomClassesResponse',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListPhraseSets' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getPhraseSets',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\ListPhraseSetsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListRecognizers' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getRecognizers',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\ListRecognizersResponse',
- 'headerParams' => [
- [
- 'keyName' => 'parent',
- 'fieldAccessors' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'Recognize' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\RecognizeResponse',
- 'headerParams' => [
- [
- 'keyName' => 'recognizer',
- 'fieldAccessors' => [
- 'getRecognizer',
- ],
- ],
- ],
- ],
- 'StreamingRecognize' => [
- 'grpcStreaming' => [
- 'grpcStreamingType' => 'BidiStreaming',
- ],
- 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\StreamingRecognizeResponse',
- ],
- 'UpdateConfig' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Speech\V2\Config',
- 'headerParams' => [
- [
- 'keyName' => 'config.name',
- 'fieldAccessors' => [
- 'getConfig',
- 'getName',
- ],
- ],
- ],
- ],
- 'GetLocation' => [
- 'callType' => \Google\ApiCore\Call::UNARY_CALL,
- 'responseType' => 'Google\Cloud\Location\Location',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'ListLocations' => [
- 'pageStreaming' => [
- 'requestPageTokenGetMethod' => 'getPageToken',
- 'requestPageTokenSetMethod' => 'setPageToken',
- 'requestPageSizeGetMethod' => 'getPageSize',
- 'requestPageSizeSetMethod' => 'setPageSize',
- 'responsePageTokenGetMethod' => 'getNextPageToken',
- 'resourcesGetMethod' => 'getLocations',
- ],
- 'callType' => \Google\ApiCore\Call::PAGINATED_CALL,
- 'responseType' => 'Google\Cloud\Location\ListLocationsResponse',
- 'headerParams' => [
- [
- 'keyName' => 'name',
- 'fieldAccessors' => [
- 'getName',
- ],
- ],
- ],
- 'interfaceOverride' => 'google.cloud.location.Locations',
- ],
- 'templateMap' => [
- 'config' => 'projects/{project}/locations/{location}/config',
- 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}',
- 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}',
- 'customClass' => 'projects/{project}/locations/{location}/customClasses/{custom_class}',
- 'location' => 'projects/{project}/locations/{location}',
- 'phraseSet' => 'projects/{project}/locations/{location}/phraseSets/{phrase_set}',
- 'recognizer' => 'projects/{project}/locations/{location}/recognizers/{recognizer}',
- ],
- ],
- ],
-];
diff --git a/owl-bot-staging/Speech/v2/src/V2/resources/speech_rest_client_config.php b/owl-bot-staging/Speech/v2/src/V2/resources/speech_rest_client_config.php
deleted file mode 100644
index d54af2818314..000000000000
--- a/owl-bot-staging/Speech/v2/src/V2/resources/speech_rest_client_config.php
+++ /dev/null
@@ -1,358 +0,0 @@
- [
- 'google.cloud.location.Locations' => [
- 'GetLocation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListLocations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*}/locations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.cloud.speech.v2.Speech' => [
- 'BatchRecognize' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{recognizer=projects/*/locations/*/recognizers/*}:batchRecognize',
- 'body' => '*',
- 'placeholders' => [
- 'recognizer' => [
- 'getters' => [
- 'getRecognizer',
- ],
- ],
- ],
- ],
- 'CreateCustomClass' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/customClasses',
- 'body' => 'custom_class',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'CreatePhraseSet' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/phraseSets',
- 'body' => 'phrase_set',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'CreateRecognizer' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/recognizers',
- 'body' => 'recognizer',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'DeleteCustomClass' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/customClasses/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeletePhraseSet' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/phraseSets/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteRecognizer' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/recognizers/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetConfig' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/config}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetCustomClass' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/customClasses/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetPhraseSet' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/phraseSets/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetRecognizer' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/recognizers/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListCustomClasses' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/customClasses',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListPhraseSets' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/phraseSets',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'ListRecognizers' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/recognizers',
- 'placeholders' => [
- 'parent' => [
- 'getters' => [
- 'getParent',
- ],
- ],
- ],
- ],
- 'Recognize' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{recognizer=projects/*/locations/*/recognizers/*}:recognize',
- 'body' => '*',
- 'placeholders' => [
- 'recognizer' => [
- 'getters' => [
- 'getRecognizer',
- ],
- ],
- ],
- ],
- 'UndeleteCustomClass' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/customClasses/*}:undelete',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UndeletePhraseSet' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/phraseSets/*}:undelete',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UndeleteRecognizer' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/recognizers/*}:undelete',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateConfig' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v2/{config.name=projects/*/locations/*/config}',
- 'body' => 'config',
- 'placeholders' => [
- 'config.name' => [
- 'getters' => [
- 'getConfig',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateCustomClass' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v2/{custom_class.name=projects/*/locations/*/customClasses/*}',
- 'body' => 'custom_class',
- 'placeholders' => [
- 'custom_class.name' => [
- 'getters' => [
- 'getCustomClass',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdatePhraseSet' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v2/{phrase_set.name=projects/*/locations/*/phraseSets/*}',
- 'body' => 'phrase_set',
- 'placeholders' => [
- 'phrase_set.name' => [
- 'getters' => [
- 'getPhraseSet',
- 'getName',
- ],
- ],
- ],
- ],
- 'UpdateRecognizer' => [
- 'method' => 'patch',
- 'uriTemplate' => '/v2/{recognizer.name=projects/*/locations/*/recognizers/*}',
- 'body' => 'recognizer',
- 'placeholders' => [
- 'recognizer.name' => [
- 'getters' => [
- 'getRecognizer',
- 'getName',
- ],
- ],
- ],
- ],
- ],
- 'google.longrunning.Operations' => [
- 'CancelOperation' => [
- 'method' => 'post',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel',
- 'body' => '*',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'DeleteOperation' => [
- 'method' => 'delete',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'GetOperation' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- 'ListOperations' => [
- 'method' => 'get',
- 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations',
- 'placeholders' => [
- 'name' => [
- 'getters' => [
- 'getName',
- ],
- ],
- ],
- ],
- ],
- ],
- 'numericEnums' => true,
-];
diff --git a/owl-bot-staging/Speech/v2/tests/Unit/V2/Client/SpeechClientTest.php b/owl-bot-staging/Speech/v2/tests/Unit/V2/Client/SpeechClientTest.php
deleted file mode 100644
index a8639f484e64..000000000000
--- a/owl-bot-staging/Speech/v2/tests/Unit/V2/Client/SpeechClientTest.php
+++ /dev/null
@@ -1,2801 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SpeechClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SpeechClient($options);
- }
-
- /** @test */
- public function batchRecognizeTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/batchRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new BatchRecognizeResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/batchRecognizeTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new BatchRecognizeRequest())
- ->setRecognizer($formattedRecognizer);
- $response = $gapicClient->batchRecognize($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/BatchRecognize', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($formattedRecognizer, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/batchRecognizeTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function batchRecognizeExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/batchRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new BatchRecognizeRequest())
- ->setRecognizer($formattedRecognizer);
- $response = $gapicClient->batchRecognize($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/batchRecognizeTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $customClass = new CustomClass();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new CreateCustomClassRequest())
- ->setCustomClass($customClass)
- ->setParent($formattedParent);
- $response = $gapicClient->createCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/CreateCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $customClass = new CustomClass();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new CreateCustomClassRequest())
- ->setCustomClass($customClass)
- ->setParent($formattedParent);
- $response = $gapicClient->createCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createPhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createPhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $phraseSet = new PhraseSet();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new CreatePhraseSetRequest())
- ->setPhraseSet($phraseSet)
- ->setParent($formattedParent);
- $response = $gapicClient->createPhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/CreatePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createPhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createPhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $phraseSet = new PhraseSet();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new CreatePhraseSetRequest())
- ->setPhraseSet($phraseSet)
- ->setParent($formattedParent);
- $response = $gapicClient->createPhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createPhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $recognizer = new Recognizer();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new CreateRecognizerRequest())
- ->setRecognizer($recognizer)
- ->setParent($formattedParent);
- $response = $gapicClient->createRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/CreateRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($recognizer, $actualValue);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $recognizer = new Recognizer();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new CreateRecognizerRequest())
- ->setRecognizer($recognizer)
- ->setParent($formattedParent);
- $response = $gapicClient->createRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $request = (new DeleteCustomClassRequest())
- ->setName($formattedName);
- $response = $gapicClient->deleteCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/DeleteCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $request = (new DeleteCustomClassRequest())
- ->setName($formattedName);
- $response = $gapicClient->deleteCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deletePhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $request = (new DeletePhraseSetRequest())
- ->setName($formattedName);
- $response = $gapicClient->deletePhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/DeletePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deletePhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $request = (new DeletePhraseSetRequest())
- ->setName($formattedName);
- $response = $gapicClient->deletePhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deletePhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new DeleteRecognizerRequest())
- ->setName($formattedName);
- $response = $gapicClient->deleteRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/DeleteRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new DeleteRecognizerRequest())
- ->setName($formattedName);
- $response = $gapicClient->deleteRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getConfigTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $kmsKeyName = 'kmsKeyName2094986649';
- $expectedResponse = new Config();
- $expectedResponse->setName($name2);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->configName('[PROJECT]', '[LOCATION]');
- $request = (new GetConfigRequest())
- ->setName($formattedName);
- $response = $gapicClient->getConfig($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getConfigExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->configName('[PROJECT]', '[LOCATION]');
- $request = (new GetConfigRequest())
- ->setName($formattedName);
- try {
- $gapicClient->getConfig($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $request = (new GetCustomClassRequest())
- ->setName($formattedName);
- $response = $gapicClient->getCustomClass($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $request = (new GetCustomClassRequest())
- ->setName($formattedName);
- try {
- $gapicClient->getCustomClass($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $request = (new GetPhraseSetRequest())
- ->setName($formattedName);
- $response = $gapicClient->getPhraseSet($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetPhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $request = (new GetPhraseSetRequest())
- ->setName($formattedName);
- try {
- $gapicClient->getPhraseSet($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getRecognizerTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new GetRecognizerRequest())
- ->setName($formattedName);
- $response = $gapicClient->getRecognizer($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetRecognizer', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getRecognizerExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new GetRecognizerRequest())
- ->setName($formattedName);
- try {
- $gapicClient->getRecognizer($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $customClassesElement = new CustomClass();
- $customClasses = [
- $customClassesElement,
- ];
- $expectedResponse = new ListCustomClassesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setCustomClasses($customClasses);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListCustomClassesRequest())
- ->setParent($formattedParent);
- $response = $gapicClient->listCustomClasses($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getCustomClasses()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/ListCustomClasses', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListCustomClassesRequest())
- ->setParent($formattedParent);
- try {
- $gapicClient->listCustomClasses($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $phraseSetsElement = new PhraseSet();
- $phraseSets = [
- $phraseSetsElement,
- ];
- $expectedResponse = new ListPhraseSetsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setPhraseSets($phraseSets);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListPhraseSetsRequest())
- ->setParent($formattedParent);
- $response = $gapicClient->listPhraseSets($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getPhraseSets()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/ListPhraseSets', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListPhraseSetsRequest())
- ->setParent($formattedParent);
- try {
- $gapicClient->listPhraseSets($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listRecognizersTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $recognizersElement = new Recognizer();
- $recognizers = [
- $recognizersElement,
- ];
- $expectedResponse = new ListRecognizersResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setRecognizers($recognizers);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListRecognizersRequest())
- ->setParent($formattedParent);
- $response = $gapicClient->listRecognizers($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getRecognizers()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/ListRecognizers', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listRecognizersExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $request = (new ListRecognizersRequest())
- ->setParent($formattedParent);
- try {
- $gapicClient->listRecognizers($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function recognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new RecognizeResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new RecognizeRequest())
- ->setRecognizer($formattedRecognizer);
- $response = $gapicClient->recognize($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/Recognize', $actualFuncCall);
- $actualValue = $actualRequestObject->getRecognizer();
- $this->assertProtobufEquals($formattedRecognizer, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function recognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new RecognizeRequest())
- ->setRecognizer($formattedRecognizer);
- try {
- $gapicClient->recognize($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new StreamingRecognizeResponse();
- $transport->addResponse($expectedResponse);
- $expectedResponse2 = new StreamingRecognizeResponse();
- $transport->addResponse($expectedResponse2);
- $expectedResponse3 = new StreamingRecognizeResponse();
- $transport->addResponse($expectedResponse3);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = new StreamingRecognizeRequest();
- $request->setRecognizer($formattedRecognizer);
- $formattedRecognizer2 = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request2 = new StreamingRecognizeRequest();
- $request2->setRecognizer($formattedRecognizer2);
- $formattedRecognizer3 = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request3 = new StreamingRecognizeRequest();
- $request3->setRecognizer($formattedRecognizer3);
- $bidi = $gapicClient->streamingRecognize();
- $this->assertInstanceOf(BidiStream::class, $bidi);
- $bidi->write($request);
- $responses = [];
- $responses[] = $bidi->read();
- $bidi->writeAll([
- $request2,
- $request3,
- ]);
- foreach ($bidi->closeWriteAndReadAll() as $response) {
- $responses[] = $response;
- }
-
- $expectedResponses = [];
- $expectedResponses[] = $expectedResponse;
- $expectedResponses[] = $expectedResponse2;
- $expectedResponses[] = $expectedResponse3;
- $this->assertEquals($expectedResponses, $responses);
- $createStreamRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($createStreamRequests));
- $streamFuncCall = $createStreamRequests[0]->getFuncCall();
- $streamRequestObject = $createStreamRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/StreamingRecognize', $streamFuncCall);
- $this->assertNull($streamRequestObject);
- $callObjects = $transport->popCallObjects();
- $this->assertSame(1, count($callObjects));
- $bidiCall = $callObjects[0];
- $writeRequests = $bidiCall->popReceivedCalls();
- $expectedRequests = [];
- $expectedRequests[] = $request;
- $expectedRequests[] = $request2;
- $expectedRequests[] = $request3;
- $this->assertEquals($expectedRequests, $writeRequests);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->setStreamingStatus($status);
- $this->assertTrue($transport->isExhausted());
- $bidi = $gapicClient->streamingRecognize();
- $results = $bidi->closeWriteAndReadAll();
- try {
- iterator_to_array($results);
- // If the close stream method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function undeleteCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/undeleteCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $request = (new UndeleteCustomClassRequest())
- ->setName($formattedName);
- $response = $gapicClient->undeleteCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UndeleteCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeleteCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $request = (new UndeleteCustomClassRequest())
- ->setName($formattedName);
- $response = $gapicClient->undeleteCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeletePhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/undeletePhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $request = (new UndeletePhraseSetRequest())
- ->setName($formattedName);
- $response = $gapicClient->undeletePhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UndeletePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeletePhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeletePhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $request = (new UndeletePhraseSetRequest())
- ->setName($formattedName);
- $response = $gapicClient->undeletePhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeletePhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeleteRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/undeleteRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new UndeleteRecognizerRequest())
- ->setName($formattedName);
- $response = $gapicClient->undeleteRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UndeleteRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeleteRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new UndeleteRecognizerRequest())
- ->setName($formattedName);
- $response = $gapicClient->undeleteRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateConfigTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $kmsKeyName = 'kmsKeyName2094986649';
- $expectedResponse = new Config();
- $expectedResponse->setName($name);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $config = new Config();
- $request = (new UpdateConfigRequest())
- ->setConfig($config);
- $response = $gapicClient->updateConfig($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdateConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getConfig();
- $this->assertProtobufEquals($config, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateConfigExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $config = new Config();
- $request = (new UpdateConfigRequest())
- ->setConfig($config);
- try {
- $gapicClient->updateConfig($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $customClass = new CustomClass();
- $request = (new UpdateCustomClassRequest())
- ->setCustomClass($customClass);
- $response = $gapicClient->updateCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdateCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $customClass = new CustomClass();
- $request = (new UpdateCustomClassRequest())
- ->setCustomClass($customClass);
- $response = $gapicClient->updateCustomClass($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updatePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updatePhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $phraseSet = new PhraseSet();
- $request = (new UpdatePhraseSetRequest())
- ->setPhraseSet($phraseSet);
- $response = $gapicClient->updatePhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdatePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updatePhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updatePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $phraseSet = new PhraseSet();
- $request = (new UpdatePhraseSetRequest())
- ->setPhraseSet($phraseSet);
- $response = $gapicClient->updatePhraseSet($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updatePhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $recognizer = new Recognizer();
- $request = (new UpdateRecognizerRequest())
- ->setRecognizer($recognizer);
- $response = $gapicClient->updateRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdateRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($recognizer, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $recognizer = new Recognizer();
- $request = (new UpdateRecognizerRequest())
- ->setRecognizer($recognizer);
- $response = $gapicClient->updateRecognizer($request);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $request = new GetLocationRequest();
- $response = $gapicClient->getLocation($request);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- $request = new GetLocationRequest();
- try {
- $gapicClient->getLocation($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $request = new ListLocationsRequest();
- $response = $gapicClient->listLocations($request);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- $request = new ListLocationsRequest();
- try {
- $gapicClient->listLocations($request);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function batchRecognizeAsyncTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/batchRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new BatchRecognizeResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/batchRecognizeTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = (new BatchRecognizeRequest())
- ->setRecognizer($formattedRecognizer);
- $response = $gapicClient->batchRecognizeAsync($request)->wait();
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/BatchRecognize', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($formattedRecognizer, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/batchRecognizeTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-}
diff --git a/owl-bot-staging/Speech/v2/tests/Unit/V2/SpeechClientTest.php b/owl-bot-staging/Speech/v2/tests/Unit/V2/SpeechClientTest.php
deleted file mode 100644
index 1408b3b647a1..000000000000
--- a/owl-bot-staging/Speech/v2/tests/Unit/V2/SpeechClientTest.php
+++ /dev/null
@@ -1,2615 +0,0 @@
-getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock();
- }
-
- /** @return SpeechClient */
- private function createClient(array $options = [])
- {
- $options += [
- 'credentials' => $this->createCredentials(),
- ];
- return new SpeechClient($options);
- }
-
- /** @test */
- public function batchRecognizeTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/batchRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $expectedResponse = new BatchRecognizeResponse();
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/batchRecognizeTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->batchRecognize($formattedRecognizer);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/BatchRecognize', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($formattedRecognizer, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/batchRecognizeTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function batchRecognizeExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/batchRecognizeTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->batchRecognize($formattedRecognizer);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/batchRecognizeTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $customClass = new CustomClass();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->createCustomClass($customClass, $formattedParent);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/CreateCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $customClass = new CustomClass();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->createCustomClass($customClass, $formattedParent);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createPhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createPhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $phraseSet = new PhraseSet();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->createPhraseSet($phraseSet, $formattedParent);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/CreatePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createPhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createPhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createPhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $phraseSet = new PhraseSet();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->createPhraseSet($phraseSet, $formattedParent);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createPhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/createRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $recognizer = new Recognizer();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->createRecognizer($recognizer, $formattedParent);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/CreateRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($recognizer, $actualValue);
- $actualValue = $actualApiRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function createRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/createRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $recognizer = new Recognizer();
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->createRecognizer($recognizer, $formattedParent);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/createRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->deleteCustomClass($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/DeleteCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->deleteCustomClass($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deletePhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->deletePhraseSet($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/DeletePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deletePhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deletePhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->deletePhraseSet($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deletePhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/deleteRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->deleteRecognizer($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/DeleteRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function deleteRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/deleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->deleteRecognizer($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/deleteRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getConfigTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $kmsKeyName = 'kmsKeyName2094986649';
- $expectedResponse = new Config();
- $expectedResponse->setName($name2);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->configName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->getConfig($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getConfigExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->configName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->getConfig($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->getCustomClass($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetCustomClass', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getCustomClassExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- try {
- $gapicClient->getCustomClass($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->getPhraseSet($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetPhraseSet', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getPhraseSetExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- try {
- $gapicClient->getPhraseSet($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getRecognizerTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->getRecognizer($formattedName);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/GetRecognizer', $actualFuncCall);
- $actualValue = $actualRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getRecognizerExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- try {
- $gapicClient->getRecognizer($formattedName);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $customClassesElement = new CustomClass();
- $customClasses = [
- $customClassesElement,
- ];
- $expectedResponse = new ListCustomClassesResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setCustomClasses($customClasses);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listCustomClasses($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getCustomClasses()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/ListCustomClasses', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listCustomClassesExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listCustomClasses($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $phraseSetsElement = new PhraseSet();
- $phraseSets = [
- $phraseSetsElement,
- ];
- $expectedResponse = new ListPhraseSetsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setPhraseSets($phraseSets);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listPhraseSets($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getPhraseSets()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/ListPhraseSets', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listPhraseSetsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listPhraseSets($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listRecognizersTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $recognizersElement = new Recognizer();
- $recognizers = [
- $recognizersElement,
- ];
- $expectedResponse = new ListRecognizersResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setRecognizers($recognizers);
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- $response = $gapicClient->listRecognizers($formattedParent);
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getRecognizers()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/ListRecognizers', $actualFuncCall);
- $actualValue = $actualRequestObject->getParent();
- $this->assertProtobufEquals($formattedParent, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listRecognizersExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]');
- try {
- $gapicClient->listRecognizers($formattedParent);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function recognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new RecognizeResponse();
- $transport->addResponse($expectedResponse);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->recognize($formattedRecognizer);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/Recognize', $actualFuncCall);
- $actualValue = $actualRequestObject->getRecognizer();
- $this->assertProtobufEquals($formattedRecognizer, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function recognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- try {
- $gapicClient->recognize($formattedRecognizer);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $expectedResponse = new StreamingRecognizeResponse();
- $transport->addResponse($expectedResponse);
- $expectedResponse2 = new StreamingRecognizeResponse();
- $transport->addResponse($expectedResponse2);
- $expectedResponse3 = new StreamingRecognizeResponse();
- $transport->addResponse($expectedResponse3);
- // Mock request
- $formattedRecognizer = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request = new StreamingRecognizeRequest();
- $request->setRecognizer($formattedRecognizer);
- $formattedRecognizer2 = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request2 = new StreamingRecognizeRequest();
- $request2->setRecognizer($formattedRecognizer2);
- $formattedRecognizer3 = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $request3 = new StreamingRecognizeRequest();
- $request3->setRecognizer($formattedRecognizer3);
- $bidi = $gapicClient->streamingRecognize();
- $this->assertInstanceOf(BidiStream::class, $bidi);
- $bidi->write($request);
- $responses = [];
- $responses[] = $bidi->read();
- $bidi->writeAll([
- $request2,
- $request3,
- ]);
- foreach ($bidi->closeWriteAndReadAll() as $response) {
- $responses[] = $response;
- }
-
- $expectedResponses = [];
- $expectedResponses[] = $expectedResponse;
- $expectedResponses[] = $expectedResponse2;
- $expectedResponses[] = $expectedResponse3;
- $this->assertEquals($expectedResponses, $responses);
- $createStreamRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($createStreamRequests));
- $streamFuncCall = $createStreamRequests[0]->getFuncCall();
- $streamRequestObject = $createStreamRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/StreamingRecognize', $streamFuncCall);
- $this->assertNull($streamRequestObject);
- $callObjects = $transport->popCallObjects();
- $this->assertSame(1, count($callObjects));
- $bidiCall = $callObjects[0];
- $writeRequests = $bidiCall->popReceivedCalls();
- $expectedRequests = [];
- $expectedRequests[] = $request;
- $expectedRequests[] = $request2;
- $expectedRequests[] = $request3;
- $this->assertEquals($expectedRequests, $writeRequests);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function streamingRecognizeExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->setStreamingStatus($status);
- $this->assertTrue($transport->isExhausted());
- $bidi = $gapicClient->streamingRecognize();
- $results = $bidi->closeWriteAndReadAll();
- try {
- iterator_to_array($results);
- // If the close stream method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function undeleteCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/undeleteCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->undeleteCustomClass($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UndeleteCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeleteCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->customClassName('[PROJECT]', '[LOCATION]', '[CUSTOM_CLASS]');
- $response = $gapicClient->undeleteCustomClass($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeletePhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/undeletePhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->undeletePhraseSet($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UndeletePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeletePhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeletePhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeletePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->phraseSetName('[PROJECT]', '[LOCATION]', '[PHRASE_SET]');
- $response = $gapicClient->undeletePhraseSet($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeletePhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeleteRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name2 = 'name2-1052831874';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag2 = 'etag2-1293302904';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name2);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag2);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/undeleteRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->undeleteRecognizer($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UndeleteRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getName();
- $this->assertProtobufEquals($formattedName, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function undeleteRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/undeleteRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $formattedName = $gapicClient->recognizerName('[PROJECT]', '[LOCATION]', '[RECOGNIZER]');
- $response = $gapicClient->undeleteRecognizer($formattedName);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/undeleteRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateConfigTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name = 'name3373707';
- $kmsKeyName = 'kmsKeyName2094986649';
- $expectedResponse = new Config();
- $expectedResponse->setName($name);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $transport->addResponse($expectedResponse);
- // Mock request
- $config = new Config();
- $response = $gapicClient->updateConfig($config);
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdateConfig', $actualFuncCall);
- $actualValue = $actualRequestObject->getConfig();
- $this->assertProtobufEquals($config, $actualValue);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateConfigExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- // Mock request
- $config = new Config();
- try {
- $gapicClient->updateConfig($config);
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new CustomClass();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateCustomClassTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $customClass = new CustomClass();
- $response = $gapicClient->updateCustomClass($customClass);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdateCustomClass', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getCustomClass();
- $this->assertProtobufEquals($customClass, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateCustomClassTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateCustomClassExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateCustomClassTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $customClass = new CustomClass();
- $response = $gapicClient->updateCustomClass($customClass);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateCustomClassTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updatePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $boost = 9392221;
- $displayName = 'displayName1615086568';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new PhraseSet();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setBoost($boost);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updatePhraseSetTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $phraseSet = new PhraseSet();
- $response = $gapicClient->updatePhraseSet($phraseSet);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdatePhraseSet', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getPhraseSet();
- $this->assertProtobufEquals($phraseSet, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updatePhraseSetTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updatePhraseSetExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updatePhraseSetTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $phraseSet = new PhraseSet();
- $response = $gapicClient->updatePhraseSet($phraseSet);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updatePhraseSetTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateRecognizerTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $name = 'name3373707';
- $uid = 'uid115792';
- $displayName = 'displayName1615086568';
- $model = 'model104069929';
- $etag = 'etag3123477';
- $reconciling = false;
- $kmsKeyName = 'kmsKeyName2094986649';
- $kmsKeyVersionName = 'kmsKeyVersionName-1734350176';
- $expectedResponse = new Recognizer();
- $expectedResponse->setName($name);
- $expectedResponse->setUid($uid);
- $expectedResponse->setDisplayName($displayName);
- $expectedResponse->setModel($model);
- $expectedResponse->setEtag($etag);
- $expectedResponse->setReconciling($reconciling);
- $expectedResponse->setKmsKeyName($kmsKeyName);
- $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName);
- $anyResponse = new Any();
- $anyResponse->setValue($expectedResponse->serializeToString());
- $completeOperation = new Operation();
- $completeOperation->setName('operations/updateRecognizerTest');
- $completeOperation->setDone(true);
- $completeOperation->setResponse($anyResponse);
- $operationsTransport->addResponse($completeOperation);
- // Mock request
- $recognizer = new Recognizer();
- $response = $gapicClient->updateRecognizer($recognizer);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $apiRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($apiRequests));
- $operationsRequestsEmpty = $operationsTransport->popReceivedCalls();
- $this->assertSame(0, count($operationsRequestsEmpty));
- $actualApiFuncCall = $apiRequests[0]->getFuncCall();
- $actualApiRequestObject = $apiRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.speech.v2.Speech/UpdateRecognizer', $actualApiFuncCall);
- $actualValue = $actualApiRequestObject->getRecognizer();
- $this->assertProtobufEquals($recognizer, $actualValue);
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateRecognizerTest');
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- $this->assertTrue($response->isDone());
- $this->assertEquals($expectedResponse, $response->getResult());
- $apiRequestsEmpty = $transport->popReceivedCalls();
- $this->assertSame(0, count($apiRequestsEmpty));
- $operationsRequests = $operationsTransport->popReceivedCalls();
- $this->assertSame(1, count($operationsRequests));
- $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall();
- $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject();
- $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall);
- $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function updateRecognizerExceptionTest()
- {
- $operationsTransport = $this->createTransport();
- $operationsClient = new OperationsClient([
- 'apiEndpoint' => '',
- 'transport' => $operationsTransport,
- 'credentials' => $this->createCredentials(),
- ]);
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- 'operationsClient' => $operationsClient,
- ]);
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- // Mock response
- $incompleteOperation = new Operation();
- $incompleteOperation->setName('operations/updateRecognizerTest');
- $incompleteOperation->setDone(false);
- $transport->addResponse($incompleteOperation);
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $operationsTransport->addResponse(null, $status);
- // Mock request
- $recognizer = new Recognizer();
- $response = $gapicClient->updateRecognizer($recognizer);
- $this->assertFalse($response->isDone());
- $this->assertNull($response->getResult());
- $expectedOperationsRequestObject = new GetOperationRequest();
- $expectedOperationsRequestObject->setName('operations/updateRecognizerTest');
- try {
- $response->pollUntilComplete([
- 'initialPollDelayMillis' => 1,
- ]);
- // If the pollUntilComplete() method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stubs are exhausted
- $transport->popReceivedCalls();
- $operationsTransport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- $this->assertTrue($operationsTransport->isExhausted());
- }
-
- /** @test */
- public function getLocationTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $name2 = 'name2-1052831874';
- $locationId = 'locationId552319461';
- $displayName = 'displayName1615086568';
- $expectedResponse = new Location();
- $expectedResponse->setName($name2);
- $expectedResponse->setLocationId($locationId);
- $expectedResponse->setDisplayName($displayName);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->getLocation();
- $this->assertEquals($expectedResponse, $response);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function getLocationExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->getLocation();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- // Mock response
- $nextPageToken = '';
- $locationsElement = new Location();
- $locations = [
- $locationsElement,
- ];
- $expectedResponse = new ListLocationsResponse();
- $expectedResponse->setNextPageToken($nextPageToken);
- $expectedResponse->setLocations($locations);
- $transport->addResponse($expectedResponse);
- $response = $gapicClient->listLocations();
- $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject());
- $resources = iterator_to_array($response->iterateAllElements());
- $this->assertSame(1, count($resources));
- $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]);
- $actualRequests = $transport->popReceivedCalls();
- $this->assertSame(1, count($actualRequests));
- $actualFuncCall = $actualRequests[0]->getFuncCall();
- $actualRequestObject = $actualRequests[0]->getRequestObject();
- $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall);
- $this->assertTrue($transport->isExhausted());
- }
-
- /** @test */
- public function listLocationsExceptionTest()
- {
- $transport = $this->createTransport();
- $gapicClient = $this->createClient([
- 'transport' => $transport,
- ]);
- $this->assertTrue($transport->isExhausted());
- $status = new stdClass();
- $status->code = Code::DATA_LOSS;
- $status->details = 'internal error';
- $expectedExceptionMessage = json_encode([
- 'message' => 'internal error',
- 'code' => Code::DATA_LOSS,
- 'status' => 'DATA_LOSS',
- 'details' => [],
- ], JSON_PRETTY_PRINT);
- $transport->addResponse(null, $status);
- try {
- $gapicClient->listLocations();
- // If the $gapicClient method call did not throw, fail the test
- $this->fail('Expected an ApiException, but no exception was thrown.');
- } catch (ApiException $ex) {
- $this->assertEquals($status->code, $ex->getCode());
- $this->assertEquals($expectedExceptionMessage, $ex->getMessage());
- }
- // Call popReceivedCalls to ensure the stub is exhausted
- $transport->popReceivedCalls();
- $this->assertTrue($transport->isExhausted());
- }
-}