From b46fb41e66b0ae78e11cd782d9818039f5c8f474 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 18:01:19 -0400 Subject: [PATCH] feat: Add adaptation proto for v1 api (#371) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add adaptation proto for v1 api PiperOrigin-RevId: 447561222 Source-Link: https://github.com/googleapis/googleapis/commit/ec9193e2e36c891d76586ed9d9c8c4a61777b8ad Source-Link: https://github.com/googleapis/googleapis-gen/commit/cd279b003e4455c9b805f22fc3b9976ad8639ee6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2QyNzliMDAzZTQ0NTVjOWI4MDVmMjJmYzNiOTk3NmFkODYzOWVlNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../snippet_metadata_speech_v1.json | 1646 +++++++++++++++++ ...ed_adaptation_create_custom_class_async.py | 46 + ...ted_adaptation_create_custom_class_sync.py | 46 + ...ated_adaptation_create_phrase_set_async.py | 46 + ...rated_adaptation_create_phrase_set_sync.py | 46 + ...ed_adaptation_delete_custom_class_async.py | 43 + ...ted_adaptation_delete_custom_class_sync.py | 43 + ...ated_adaptation_delete_phrase_set_async.py | 43 + ...rated_adaptation_delete_phrase_set_sync.py | 43 + ...rated_adaptation_get_custom_class_async.py | 45 + ...erated_adaptation_get_custom_class_sync.py | 45 + ...nerated_adaptation_get_phrase_set_async.py | 45 + ...enerated_adaptation_get_phrase_set_sync.py | 45 + ...ed_adaptation_list_custom_classes_async.py | 46 + ...ted_adaptation_list_custom_classes_sync.py | 46 + ...erated_adaptation_list_phrase_set_async.py | 46 + ...nerated_adaptation_list_phrase_set_sync.py | 46 + ...ed_adaptation_update_custom_class_async.py | 44 + ...ted_adaptation_update_custom_class_sync.py | 44 + ...ated_adaptation_update_phrase_set_async.py | 44 + ...rated_adaptation_update_phrase_set_sync.py | 44 + 21 files changed, 2542 insertions(+) create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_sync.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_async.py create mode 100644 speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_sync.py diff --git a/speech/generated_samples/snippet_metadata_speech_v1.json b/speech/generated_samples/snippet_metadata_speech_v1.json index 6171e66f38bb..f1d0a48495ab 100644 --- a/speech/generated_samples/snippet_metadata_speech_v1.json +++ b/speech/generated_samples/snippet_metadata_speech_v1.json @@ -10,6 +10,1652 @@ "name": "google-cloud-speech" }, "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.create_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.CreateCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "CreateCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.CreateCustomClassRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "custom_class", + "type": "google.cloud.speech_v1.types.CustomClass" + }, + { + "name": "custom_class_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.CustomClass", + "shortName": "create_custom_class" + }, + "description": "Sample for CreateCustomClass", + "file": "speech_v1_generated_adaptation_create_custom_class_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_CreateCustomClass_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_create_custom_class_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.create_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.CreateCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "CreateCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.CreateCustomClassRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "custom_class", + "type": "google.cloud.speech_v1.types.CustomClass" + }, + { + "name": "custom_class_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.CustomClass", + "shortName": "create_custom_class" + }, + "description": "Sample for CreateCustomClass", + "file": "speech_v1_generated_adaptation_create_custom_class_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_CreateCustomClass_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_create_custom_class_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.create_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.CreatePhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "CreatePhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.CreatePhraseSetRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "phrase_set", + "type": "google.cloud.speech_v1.types.PhraseSet" + }, + { + "name": "phrase_set_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.PhraseSet", + "shortName": "create_phrase_set" + }, + "description": "Sample for CreatePhraseSet", + "file": "speech_v1_generated_adaptation_create_phrase_set_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_CreatePhraseSet_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_create_phrase_set_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.create_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.CreatePhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "CreatePhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.CreatePhraseSetRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "phrase_set", + "type": "google.cloud.speech_v1.types.PhraseSet" + }, + { + "name": "phrase_set_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.PhraseSet", + "shortName": "create_phrase_set" + }, + "description": "Sample for CreatePhraseSet", + "file": "speech_v1_generated_adaptation_create_phrase_set_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_CreatePhraseSet_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_create_phrase_set_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.delete_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.DeleteCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "DeleteCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.DeleteCustomClassRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_custom_class" + }, + "description": "Sample for DeleteCustomClass", + "file": "speech_v1_generated_adaptation_delete_custom_class_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_DeleteCustomClass_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_delete_custom_class_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.delete_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.DeleteCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "DeleteCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.DeleteCustomClassRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_custom_class" + }, + "description": "Sample for DeleteCustomClass", + "file": "speech_v1_generated_adaptation_delete_custom_class_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_DeleteCustomClass_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_delete_custom_class_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.delete_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.DeletePhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "DeletePhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.DeletePhraseSetRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_phrase_set" + }, + "description": "Sample for DeletePhraseSet", + "file": "speech_v1_generated_adaptation_delete_phrase_set_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_DeletePhraseSet_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_delete_phrase_set_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.delete_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.DeletePhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "DeletePhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.DeletePhraseSetRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_phrase_set" + }, + "description": "Sample for DeletePhraseSet", + "file": "speech_v1_generated_adaptation_delete_phrase_set_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_DeletePhraseSet_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_delete_phrase_set_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.get_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.GetCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "GetCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.GetCustomClassRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.CustomClass", + "shortName": "get_custom_class" + }, + "description": "Sample for GetCustomClass", + "file": "speech_v1_generated_adaptation_get_custom_class_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_GetCustomClass_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_get_custom_class_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.get_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.GetCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "GetCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.GetCustomClassRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.CustomClass", + "shortName": "get_custom_class" + }, + "description": "Sample for GetCustomClass", + "file": "speech_v1_generated_adaptation_get_custom_class_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_GetCustomClass_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_get_custom_class_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.get_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.GetPhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "GetPhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.GetPhraseSetRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.PhraseSet", + "shortName": "get_phrase_set" + }, + "description": "Sample for GetPhraseSet", + "file": "speech_v1_generated_adaptation_get_phrase_set_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_GetPhraseSet_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_get_phrase_set_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.get_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.GetPhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "GetPhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.GetPhraseSetRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.PhraseSet", + "shortName": "get_phrase_set" + }, + "description": "Sample for GetPhraseSet", + "file": "speech_v1_generated_adaptation_get_phrase_set_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_GetPhraseSet_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_get_phrase_set_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.list_custom_classes", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.ListCustomClasses", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "ListCustomClasses" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.ListCustomClassesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.services.adaptation.pagers.ListCustomClassesAsyncPager", + "shortName": "list_custom_classes" + }, + "description": "Sample for ListCustomClasses", + "file": "speech_v1_generated_adaptation_list_custom_classes_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_ListCustomClasses_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_list_custom_classes_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.list_custom_classes", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.ListCustomClasses", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "ListCustomClasses" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.ListCustomClassesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.services.adaptation.pagers.ListCustomClassesPager", + "shortName": "list_custom_classes" + }, + "description": "Sample for ListCustomClasses", + "file": "speech_v1_generated_adaptation_list_custom_classes_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_ListCustomClasses_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_list_custom_classes_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.list_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.ListPhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "ListPhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.ListPhraseSetRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.services.adaptation.pagers.ListPhraseSetAsyncPager", + "shortName": "list_phrase_set" + }, + "description": "Sample for ListPhraseSet", + "file": "speech_v1_generated_adaptation_list_phrase_set_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_ListPhraseSet_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_list_phrase_set_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.list_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.ListPhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "ListPhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.ListPhraseSetRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.services.adaptation.pagers.ListPhraseSetPager", + "shortName": "list_phrase_set" + }, + "description": "Sample for ListPhraseSet", + "file": "speech_v1_generated_adaptation_list_phrase_set_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_ListPhraseSet_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_list_phrase_set_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.update_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.UpdateCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "UpdateCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.UpdateCustomClassRequest" + }, + { + "name": "custom_class", + "type": "google.cloud.speech_v1.types.CustomClass" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.CustomClass", + "shortName": "update_custom_class" + }, + "description": "Sample for UpdateCustomClass", + "file": "speech_v1_generated_adaptation_update_custom_class_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_UpdateCustomClass_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_update_custom_class_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.update_custom_class", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.UpdateCustomClass", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "UpdateCustomClass" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.UpdateCustomClassRequest" + }, + { + "name": "custom_class", + "type": "google.cloud.speech_v1.types.CustomClass" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.CustomClass", + "shortName": "update_custom_class" + }, + "description": "Sample for UpdateCustomClass", + "file": "speech_v1_generated_adaptation_update_custom_class_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_UpdateCustomClass_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_update_custom_class_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient", + "shortName": "AdaptationAsyncClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationAsyncClient.update_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.UpdatePhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "UpdatePhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.UpdatePhraseSetRequest" + }, + { + "name": "phrase_set", + "type": "google.cloud.speech_v1.types.PhraseSet" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.PhraseSet", + "shortName": "update_phrase_set" + }, + "description": "Sample for UpdatePhraseSet", + "file": "speech_v1_generated_adaptation_update_phrase_set_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_UpdatePhraseSet_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_update_phrase_set_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.speech_v1.AdaptationClient", + "shortName": "AdaptationClient" + }, + "fullName": "google.cloud.speech_v1.AdaptationClient.update_phrase_set", + "method": { + "fullName": "google.cloud.speech.v1.Adaptation.UpdatePhraseSet", + "service": { + "fullName": "google.cloud.speech.v1.Adaptation", + "shortName": "Adaptation" + }, + "shortName": "UpdatePhraseSet" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.speech_v1.types.UpdatePhraseSetRequest" + }, + { + "name": "phrase_set", + "type": "google.cloud.speech_v1.types.PhraseSet" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.speech_v1.types.PhraseSet", + "shortName": "update_phrase_set" + }, + "description": "Sample for UpdatePhraseSet", + "file": "speech_v1_generated_adaptation_update_phrase_set_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "speech_v1_generated_Adaptation_UpdatePhraseSet_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "speech_v1_generated_adaptation_update_phrase_set_sync.py" + }, { "canonical": true, "clientMethod": { diff --git a/speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_async.py b/speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_async.py new file mode 100644 index 000000000000..bcd4a7465f98 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_CreateCustomClass_async] +from google.cloud import speech_v1 + + +async def sample_create_custom_class(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.CreateCustomClassRequest( + parent="parent_value", + custom_class_id="custom_class_id_value", + ) + + # Make the request + response = await client.create_custom_class(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_CreateCustomClass_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_sync.py new file mode 100644 index 000000000000..25de6266d0fe --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_CreateCustomClass_sync] +from google.cloud import speech_v1 + + +def sample_create_custom_class(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.CreateCustomClassRequest( + parent="parent_value", + custom_class_id="custom_class_id_value", + ) + + # Make the request + response = client.create_custom_class(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_CreateCustomClass_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_async.py b/speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_async.py new file mode 100644 index 000000000000..df793036cf7b --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreatePhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_CreatePhraseSet_async] +from google.cloud import speech_v1 + + +async def sample_create_phrase_set(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.CreatePhraseSetRequest( + parent="parent_value", + phrase_set_id="phrase_set_id_value", + ) + + # Make the request + response = await client.create_phrase_set(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_CreatePhraseSet_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_sync.py new file mode 100644 index 000000000000..b09632c19149 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreatePhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_CreatePhraseSet_sync] +from google.cloud import speech_v1 + + +def sample_create_phrase_set(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.CreatePhraseSetRequest( + parent="parent_value", + phrase_set_id="phrase_set_id_value", + ) + + # Make the request + response = client.create_phrase_set(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_CreatePhraseSet_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_async.py b/speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_async.py new file mode 100644 index 000000000000..09e15814fb7f --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_DeleteCustomClass_async] +from google.cloud import speech_v1 + + +async def sample_delete_custom_class(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.DeleteCustomClassRequest( + name="name_value", + ) + + # Make the request + await client.delete_custom_class(request=request) + + +# [END speech_v1_generated_Adaptation_DeleteCustomClass_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_sync.py new file mode 100644 index 000000000000..811d1087eea4 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_DeleteCustomClass_sync] +from google.cloud import speech_v1 + + +def sample_delete_custom_class(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.DeleteCustomClassRequest( + name="name_value", + ) + + # Make the request + client.delete_custom_class(request=request) + + +# [END speech_v1_generated_Adaptation_DeleteCustomClass_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_async.py b/speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_async.py new file mode 100644 index 000000000000..c89ecaf3c8a8 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_DeletePhraseSet_async] +from google.cloud import speech_v1 + + +async def sample_delete_phrase_set(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.DeletePhraseSetRequest( + name="name_value", + ) + + # Make the request + await client.delete_phrase_set(request=request) + + +# [END speech_v1_generated_Adaptation_DeletePhraseSet_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_sync.py new file mode 100644 index 000000000000..f510b7800fe7 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_DeletePhraseSet_sync] +from google.cloud import speech_v1 + + +def sample_delete_phrase_set(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.DeletePhraseSetRequest( + name="name_value", + ) + + # Make the request + client.delete_phrase_set(request=request) + + +# [END speech_v1_generated_Adaptation_DeletePhraseSet_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_async.py b/speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_async.py new file mode 100644 index 000000000000..0307b77f0e84 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_GetCustomClass_async] +from google.cloud import speech_v1 + + +async def sample_get_custom_class(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.GetCustomClassRequest( + name="name_value", + ) + + # Make the request + response = await client.get_custom_class(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_GetCustomClass_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_sync.py new file mode 100644 index 000000000000..93db88968ed3 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_get_custom_class_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_GetCustomClass_sync] +from google.cloud import speech_v1 + + +def sample_get_custom_class(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.GetCustomClassRequest( + name="name_value", + ) + + # Make the request + response = client.get_custom_class(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_GetCustomClass_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_async.py b/speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_async.py new file mode 100644 index 000000000000..cfd9966c91d5 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_GetPhraseSet_async] +from google.cloud import speech_v1 + + +async def sample_get_phrase_set(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.GetPhraseSetRequest( + name="name_value", + ) + + # Make the request + response = await client.get_phrase_set(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_GetPhraseSet_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_sync.py new file mode 100644 index 000000000000..dd9316546e76 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_get_phrase_set_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_GetPhraseSet_sync] +from google.cloud import speech_v1 + + +def sample_get_phrase_set(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.GetPhraseSetRequest( + name="name_value", + ) + + # Make the request + response = client.get_phrase_set(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_GetPhraseSet_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_async.py b/speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_async.py new file mode 100644 index 000000000000..dd7afda5567a --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListCustomClasses +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_ListCustomClasses_async] +from google.cloud import speech_v1 + + +async def sample_list_custom_classes(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.ListCustomClassesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_custom_classes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END speech_v1_generated_Adaptation_ListCustomClasses_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_sync.py new file mode 100644 index 000000000000..422c7bc79d5e --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_list_custom_classes_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListCustomClasses +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_ListCustomClasses_sync] +from google.cloud import speech_v1 + + +def sample_list_custom_classes(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.ListCustomClassesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_custom_classes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END speech_v1_generated_Adaptation_ListCustomClasses_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_async.py b/speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_async.py new file mode 100644 index 000000000000..6bc6e66c2870 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_ListPhraseSet_async] +from google.cloud import speech_v1 + + +async def sample_list_phrase_set(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.ListPhraseSetRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_phrase_set(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END speech_v1_generated_Adaptation_ListPhraseSet_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_sync.py new file mode 100644 index 000000000000..eb1207004f33 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_list_phrase_set_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_ListPhraseSet_sync] +from google.cloud import speech_v1 + + +def sample_list_phrase_set(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.ListPhraseSetRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_phrase_set(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END speech_v1_generated_Adaptation_ListPhraseSet_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_async.py b/speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_async.py new file mode 100644 index 000000000000..eb8d899dd173 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_UpdateCustomClass_async] +from google.cloud import speech_v1 + + +async def sample_update_custom_class(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.UpdateCustomClassRequest( + ) + + # Make the request + response = await client.update_custom_class(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_UpdateCustomClass_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_sync.py new file mode 100644 index 000000000000..3024bf42834c --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_update_custom_class_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateCustomClass +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_UpdateCustomClass_sync] +from google.cloud import speech_v1 + + +def sample_update_custom_class(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.UpdateCustomClassRequest( + ) + + # Make the request + response = client.update_custom_class(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_UpdateCustomClass_sync] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_async.py b/speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_async.py new file mode 100644 index 000000000000..77fe8b84005e --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdatePhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_UpdatePhraseSet_async] +from google.cloud import speech_v1 + + +async def sample_update_phrase_set(): + # Create a client + client = speech_v1.AdaptationAsyncClient() + + # Initialize request argument(s) + request = speech_v1.UpdatePhraseSetRequest( + ) + + # Make the request + response = await client.update_phrase_set(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_UpdatePhraseSet_async] diff --git a/speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_sync.py b/speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_sync.py new file mode 100644 index 000000000000..04418ecb34a4 --- /dev/null +++ b/speech/generated_samples/speech_v1_generated_adaptation_update_phrase_set_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdatePhraseSet +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-speech + + +# [START speech_v1_generated_Adaptation_UpdatePhraseSet_sync] +from google.cloud import speech_v1 + + +def sample_update_phrase_set(): + # Create a client + client = speech_v1.AdaptationClient() + + # Initialize request argument(s) + request = speech_v1.UpdatePhraseSetRequest( + ) + + # Make the request + response = client.update_phrase_set(request=request) + + # Handle the response + print(response) + +# [END speech_v1_generated_Adaptation_UpdatePhraseSet_sync]