From f3023c2cde4b6a443008df597fb29c2a95c511f2 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 17 Dec 2024 21:06:19 +0000 Subject: [PATCH] feat: StreamingSynthesize now supports opus PiperOrigin-RevId: 707168599 Source-Link: https://github.com/googleapis/googleapis/commit/d985436b77cfd0231bb170014e4eadc19392d3ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/3fcc3afbf8c92084cc4a30232a76ca247489c3d0 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuVGV4dFRvU3BlZWNoLlYxQmV0YTEvLk93bEJvdC55YW1sIiwiaCI6IjNmY2MzYWZiZjhjOTIwODRjYzRhMzAyMzJhNzZjYTI0NzQ4OWMzZDAifQ== --- ...tToSpeech.V1Beta1.GeneratedSnippets.csproj | 15 + ...ToSpeechClient.ListVoicesAsyncSnippet.g.cs | 44 + ...t.ListVoicesRequestObjectAsyncSnippet.g.cs | 44 + ...Client.ListVoicesRequestObjectSnippet.g.cs | 43 + .../TextToSpeechClient.ListVoicesSnippet.g.cs | 43 + ...eechClient.StreamingSynthesizeSnippet.g.cs | 79 + ...chClient.SynthesizeSpeechAsyncSnippet.g.cs | 46 + ...hesizeSpeechRequestObjectAsyncSnippet.g.cs | 54 + ....SynthesizeSpeechRequestObjectSnippet.g.cs | 53 + ...oSpeechClient.SynthesizeSpeechSnippet.g.cs | 45 + ...izeLongAudioRequestObjectAsyncSnippet.g.cs | 68 + ...nthesizeLongAudioRequestObjectSnippet.g.cs | 67 + ...ata_google.cloud.texttospeech.v1beta1.json | 559 ++ ...Cloud.TextToSpeech.V1Beta1.Snippets.csproj | 15 + .../TextToSpeechClientSnippets.g.cs | 205 + ...eechLongAudioSynthesizeClientSnippets.g.cs | 99 + .../CloudTts.g.cs | 5966 +++++++++++++++++ .../CloudTtsGrpc.g.cs | 338 + .../CloudTtsLrs.g.cs | 915 +++ .../CloudTtsLrsGrpc.g.cs | 207 + .../CloudTtsResourceNames.g.cs | 273 + .../Google.Cloud.TextToSpeech.V1Beta1.csproj | 48 + .../PackageApiMetadata.g.cs | 53 + .../ServiceCollectionExtensions.g.cs | 99 + .../TextToSpeechClient.g.cs | 625 ++ ...TextToSpeechLongAudioSynthesizeClient.g.cs | 373 ++ .../gapic_metadata.json | 51 + 27 files changed, 10427 insertions(+) create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets.csproj create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.StreamingSynthesizeSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectAsyncSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectSnippet.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/Google.Cloud.TextToSpeech.V1Beta1.Snippets.csproj create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechClientSnippets.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechLongAudioSynthesizeClientSnippets.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTts.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsGrpc.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrs.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrsGrpc.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsResourceNames.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.csproj create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/PackageApiMetadata.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/ServiceCollectionExtensions.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechClient.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechLongAudioSynthesizeClient.g.cs create mode 100755 owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/gapic_metadata.json diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets.csproj b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets.csproj new file mode 100755 index 000000000000..662b178771e6 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets.csproj @@ -0,0 +1,15 @@ + + + + + net6.0;net462 + latest + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesAsyncSnippet.g.cs new file mode 100755 index 000000000000..ae9848434c0e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async_flattened] + using Google.Cloud.TextToSpeech.V1Beta1; + using System.Threading.Tasks; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for ListVoicesAsync + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListVoicesAsync() + { + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + string languageCode = ""; + // Make the request + ListVoicesResponse response = await textToSpeechClient.ListVoicesAsync(languageCode); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..0c642b76c304 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,44 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async] + using Google.Cloud.TextToSpeech.V1Beta1; + using System.Threading.Tasks; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for ListVoicesAsync + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task ListVoicesRequestObjectAsync() + { + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + ListVoicesRequest request = new ListVoicesRequest { LanguageCode = "", }; + // Make the request + ListVoicesResponse response = await textToSpeechClient.ListVoicesAsync(request); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..3e2cc7f369ec --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesRequestObjectSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync] + using Google.Cloud.TextToSpeech.V1Beta1; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for ListVoices + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListVoicesRequestObject() + { + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + ListVoicesRequest request = new ListVoicesRequest { LanguageCode = "", }; + // Make the request + ListVoicesResponse response = textToSpeechClient.ListVoices(request); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesSnippet.g.cs new file mode 100755 index 000000000000..e8ac46d04b73 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.ListVoicesSnippet.g.cs @@ -0,0 +1,43 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync_flattened] + using Google.Cloud.TextToSpeech.V1Beta1; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for ListVoices + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void ListVoices() + { + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + string languageCode = ""; + // Make the request + ListVoicesResponse response = textToSpeechClient.ListVoices(languageCode); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.StreamingSynthesizeSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.StreamingSynthesizeSnippet.g.cs new file mode 100755 index 000000000000..d587ef284f20 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.StreamingSynthesizeSnippet.g.cs @@ -0,0 +1,79 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync] + using Google.Api.Gax.Grpc; + using Google.Cloud.TextToSpeech.V1Beta1; + using System.Threading.Tasks; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for StreamingSynthesize + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task StreamingSynthesize() + { + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize streaming call, retrieving the stream object + using TextToSpeechClient.StreamingSynthesizeStream response = textToSpeechClient.StreamingSynthesize(); + + // Sending requests and retrieving responses can be arbitrarily interleaved + // Exact sequence will depend on client/server behavior + + // Create task to do something with responses from server + Task responseHandlerTask = Task.Run(async () => + { + // Note that C# 8 code can use await foreach + AsyncResponseStream responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + StreamingSynthesizeResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + }); + + // Send requests to the server + bool done = false; + while (!done) + { + // Initialize a request + StreamingSynthesizeRequest request = new StreamingSynthesizeRequest + { + StreamingConfig = new StreamingSynthesizeConfig(), + }; + // Stream a request to the server + await response.WriteAsync(request); + // Set "done" to true when sending requests is complete + } + + // Complete writing requests to the stream + await response.WriteCompleteAsync(); + // Await the response handler + // This will complete once all server responses have been processed + await responseHandlerTask; + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechAsyncSnippet.g.cs new file mode 100755 index 000000000000..425bacab3dbb --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechAsyncSnippet.g.cs @@ -0,0 +1,46 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async_flattened] + using Google.Cloud.TextToSpeech.V1Beta1; + using System.Threading.Tasks; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for SynthesizeSpeechAsync + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task SynthesizeSpeechAsync() + { + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + SynthesisInput input = new SynthesisInput(); + VoiceSelectionParams voice = new VoiceSelectionParams(); + AudioConfig audioConfig = new AudioConfig(); + // Make the request + SynthesizeSpeechResponse response = await textToSpeechClient.SynthesizeSpeechAsync(input, voice, audioConfig); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..9e8ed2bdf6ef --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,54 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async] + using Google.Cloud.TextToSpeech.V1Beta1; + using System.Threading.Tasks; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for SynthesizeSpeechAsync + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task SynthesizeSpeechRequestObjectAsync() + { + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + SynthesizeSpeechRequest request = new SynthesizeSpeechRequest + { + Input = new SynthesisInput(), + Voice = new VoiceSelectionParams(), + AudioConfig = new AudioConfig(), + EnableTimePointing = + { + SynthesizeSpeechRequest.Types.TimepointType.Unspecified, + }, + AdvancedVoiceOptions = new AdvancedVoiceOptions(), + }; + // Make the request + SynthesizeSpeechResponse response = await textToSpeechClient.SynthesizeSpeechAsync(request); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..56f548373e35 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechRequestObjectSnippet.g.cs @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync] + using Google.Cloud.TextToSpeech.V1Beta1; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for SynthesizeSpeech + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void SynthesizeSpeechRequestObject() + { + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + SynthesizeSpeechRequest request = new SynthesizeSpeechRequest + { + Input = new SynthesisInput(), + Voice = new VoiceSelectionParams(), + AudioConfig = new AudioConfig(), + EnableTimePointing = + { + SynthesizeSpeechRequest.Types.TimepointType.Unspecified, + }, + AdvancedVoiceOptions = new AdvancedVoiceOptions(), + }; + // Make the request + SynthesizeSpeechResponse response = textToSpeechClient.SynthesizeSpeech(request); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechSnippet.g.cs new file mode 100755 index 000000000000..784c14626b2b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechClient.SynthesizeSpeechSnippet.g.cs @@ -0,0 +1,45 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync_flattened] + using Google.Cloud.TextToSpeech.V1Beta1; + + public sealed partial class GeneratedTextToSpeechClientSnippets + { + /// Snippet for SynthesizeSpeech + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void SynthesizeSpeech() + { + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + SynthesisInput input = new SynthesisInput(); + VoiceSelectionParams voice = new VoiceSelectionParams(); + AudioConfig audioConfig = new AudioConfig(); + // Make the request + SynthesizeSpeechResponse response = textToSpeechClient.SynthesizeSpeech(input, voice, audioConfig); + } + } + // [END texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync_flattened] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectAsyncSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectAsyncSnippet.g.cs new file mode 100755 index 000000000000..aa115422ce1e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectAsyncSnippet.g.cs @@ -0,0 +1,68 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async] + using Google.Cloud.TextToSpeech.V1Beta1; + using Google.LongRunning; + using System.Threading.Tasks; + + public sealed partial class GeneratedTextToSpeechLongAudioSynthesizeClientSnippets + { + /// Snippet for SynthesizeLongAudioAsync + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public async Task SynthesizeLongAudioRequestObjectAsync() + { + // Create client + TextToSpeechLongAudioSynthesizeClient textToSpeechLongAudioSynthesizeClient = await TextToSpeechLongAudioSynthesizeClient.CreateAsync(); + // Initialize request argument(s) + SynthesizeLongAudioRequest request = new SynthesizeLongAudioRequest + { + Parent = "", + Input = new SynthesisInput(), + AudioConfig = new AudioConfig(), + OutputGcsUri = "", + Voice = new VoiceSelectionParams(), + }; + // Make the request + Operation response = await textToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + SynthesizeLongAudioResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await textToSpeechLongAudioSynthesizeClient.PollOnceSynthesizeLongAudioAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + SynthesizeLongAudioResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectSnippet.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectSnippet.g.cs new file mode 100755 index 000000000000..a541915818da --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectSnippet.g.cs @@ -0,0 +1,67 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + // [START texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] + using Google.Cloud.TextToSpeech.V1Beta1; + using Google.LongRunning; + + public sealed partial class GeneratedTextToSpeechLongAudioSynthesizeClientSnippets + { + /// Snippet for SynthesizeLongAudio + /// + /// This snippet 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 as shown in + /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. + /// + public void SynthesizeLongAudioRequestObject() + { + // Create client + TextToSpeechLongAudioSynthesizeClient textToSpeechLongAudioSynthesizeClient = TextToSpeechLongAudioSynthesizeClient.Create(); + // Initialize request argument(s) + SynthesizeLongAudioRequest request = new SynthesizeLongAudioRequest + { + Parent = "", + Input = new SynthesisInput(), + AudioConfig = new AudioConfig(), + OutputGcsUri = "", + Voice = new VoiceSelectionParams(), + }; + // Make the request + Operation response = textToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + SynthesizeLongAudioResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = textToSpeechLongAudioSynthesizeClient.PollOnceSynthesizeLongAudio(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + SynthesizeLongAudioResponse retrievedResult = retrievedResponse.Result; + } + } + } + // [END texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json new file mode 100755 index 000000000000..93ce19329991 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.GeneratedSnippets/snippet_metadata_google.cloud.texttospeech.v1beta1.json @@ -0,0 +1,559 @@ +{ + "clientLibrary": { + "name": "Google.Cloud.TextToSpeech.V1Beta1", + "language": "C_SHARP", + "apis": [ + { + "id": "google.cloud.texttospeech.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync", + "title": "ListVoicesRequestObject", + "description": "Snippet for ListVoices", + "file": "TextToSpeechClient.ListVoicesRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListVoices", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.ListVoices", + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "ListVoices", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async", + "title": "ListVoicesRequestObjectAsync", + "description": "Snippet for ListVoicesAsync", + "file": "TextToSpeechClient.ListVoicesRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListVoicesAsync", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.ListVoicesAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "ListVoices", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_sync_flattened", + "title": "ListVoices", + "description": "Snippet for ListVoices", + "file": "TextToSpeechClient.ListVoicesSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListVoices", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.ListVoices", + "parameters": [ + { + "type": "System.String", + "name": "languageCode" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "ListVoices", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 41, + "type": "FULL" + }, + { + "start": 34, + "end": 39, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async_flattened", + "title": "ListVoicesAsync", + "description": "Snippet for ListVoicesAsync", + "file": "TextToSpeechClient.ListVoicesAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "ListVoicesAsync", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.ListVoicesAsync", + "async": true, + "parameters": [ + { + "type": "System.String", + "name": "languageCode" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "ListVoices", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 42, + "type": "FULL" + }, + { + "start": 35, + "end": 40, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync", + "title": "SynthesizeSpeechRequestObject", + "description": "Snippet for SynthesizeSpeech", + "file": "TextToSpeechClient.SynthesizeSpeechRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "SynthesizeSpeech", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.SynthesizeSpeech", + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "SynthesizeSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 51, + "type": "FULL" + }, + { + "start": 34, + "end": 49, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async", + "title": "SynthesizeSpeechRequestObjectAsync", + "description": "Snippet for SynthesizeSpeechAsync", + "file": "TextToSpeechClient.SynthesizeSpeechRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "SynthesizeSpeechAsync", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.SynthesizeSpeechAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "SynthesizeSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 52, + "type": "FULL" + }, + { + "start": 35, + "end": 50, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_sync_flattened", + "title": "SynthesizeSpeech", + "description": "Snippet for SynthesizeSpeech", + "file": "TextToSpeechClient.SynthesizeSpeechSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "SynthesizeSpeech", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.SynthesizeSpeech", + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput", + "name": "input" + }, + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams", + "name": "voice" + }, + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.AudioConfig", + "name": "audioConfig" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "SynthesizeSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 43, + "type": "FULL" + }, + { + "start": 34, + "end": 41, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async_flattened", + "title": "SynthesizeSpeechAsync", + "description": "Snippet for SynthesizeSpeechAsync", + "file": "TextToSpeechClient.SynthesizeSpeechAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "SynthesizeSpeechAsync", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.SynthesizeSpeechAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput", + "name": "input" + }, + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams", + "name": "voice" + }, + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.AudioConfig", + "name": "audioConfig" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "SynthesizeSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 44, + "type": "FULL" + }, + { + "start": 35, + "end": 42, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeech_StreamingSynthesize_sync", + "title": "StreamingSynthesize", + "description": "Snippet for StreamingSynthesize", + "file": "TextToSpeechClient.StreamingSynthesizeSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "StreamingSynthesize", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient.StreamingSynthesize", + "parameters": [ + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + }, + { + "type": "Google.Api.Gax.Grpc.BidirectionalStreamingSettings", + "name": "streamingSettings" + } + ], + "resultType": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient+StreamingSynthesizeStream", + "client": { + "shortName": "TextToSpeechClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechClient" + }, + "method": { + "shortName": "StreamingSynthesize", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.StreamingSynthesize", + "service": { + "shortName": "TextToSpeech", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 77, + "type": "FULL" + }, + { + "start": 36, + "end": 75, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_sync", + "title": "SynthesizeLongAudioRequestObject", + "description": "Snippet for SynthesizeLongAudio", + "file": "TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "SynthesizeLongAudio", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio", + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "Google.LongRunning.Operation", + "client": { + "shortName": "TextToSpeechLongAudioSynthesizeClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechLongAudioSynthesizeClient" + }, + "method": { + "shortName": "SynthesizeLongAudio", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize.SynthesizeLongAudio", + "service": { + "shortName": "TextToSpeechLongAudioSynthesize", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 65, + "type": "FULL" + }, + { + "start": 35, + "end": 63, + "type": "SHORT" + } + ] + }, + { + "regionTag": "texttospeech_v1beta1_generated_TextToSpeechLongAudioSynthesize_SynthesizeLongAudio_async", + "title": "SynthesizeLongAudioRequestObjectAsync", + "description": "Snippet for SynthesizeLongAudioAsync", + "file": "TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioRequestObjectAsyncSnippet.g.cs", + "language": "C_SHARP", + "clientMethod": { + "shortName": "SynthesizeLongAudioAsync", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioAsync", + "async": true, + "parameters": [ + { + "type": "Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest", + "name": "request" + }, + { + "type": "Google.Api.Gax.Grpc.CallSettings", + "name": "callSettings" + } + ], + "resultType": "System.Threading.Tasks.Task>", + "client": { + "shortName": "TextToSpeechLongAudioSynthesizeClient", + "fullName": "Google.Cloud.TextToSpeech.V1Beta1.TextToSpeechLongAudioSynthesizeClient" + }, + "method": { + "shortName": "SynthesizeLongAudio", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize.SynthesizeLongAudio", + "service": { + "shortName": "TextToSpeechLongAudioSynthesize", + "fullName": "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 66, + "type": "FULL" + }, + { + "start": 36, + "end": 64, + "type": "SHORT" + } + ] + } + ] +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/Google.Cloud.TextToSpeech.V1Beta1.Snippets.csproj b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/Google.Cloud.TextToSpeech.V1Beta1.Snippets.csproj new file mode 100755 index 000000000000..662b178771e6 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/Google.Cloud.TextToSpeech.V1Beta1.Snippets.csproj @@ -0,0 +1,15 @@ + + + + + net6.0;net462 + latest + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechClientSnippets.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechClientSnippets.g.cs new file mode 100755 index 000000000000..549c76ebb6cf --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechClientSnippets.g.cs @@ -0,0 +1,205 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + using Google.Api.Gax.Grpc; + using Google.Cloud.TextToSpeech.V1Beta1; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedTextToSpeechClientSnippets + { + /// Snippet for ListVoices + public void ListVoicesRequestObject() + { + // Snippet: ListVoices(ListVoicesRequest, CallSettings) + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + ListVoicesRequest request = new ListVoicesRequest { LanguageCode = "", }; + // Make the request + ListVoicesResponse response = textToSpeechClient.ListVoices(request); + // End snippet + } + + /// Snippet for ListVoicesAsync + public async Task ListVoicesRequestObjectAsync() + { + // Snippet: ListVoicesAsync(ListVoicesRequest, CallSettings) + // Additional: ListVoicesAsync(ListVoicesRequest, CancellationToken) + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + ListVoicesRequest request = new ListVoicesRequest { LanguageCode = "", }; + // Make the request + ListVoicesResponse response = await textToSpeechClient.ListVoicesAsync(request); + // End snippet + } + + /// Snippet for ListVoices + public void ListVoices() + { + // Snippet: ListVoices(string, CallSettings) + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + string languageCode = ""; + // Make the request + ListVoicesResponse response = textToSpeechClient.ListVoices(languageCode); + // End snippet + } + + /// Snippet for ListVoicesAsync + public async Task ListVoicesAsync() + { + // Snippet: ListVoicesAsync(string, CallSettings) + // Additional: ListVoicesAsync(string, CancellationToken) + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + string languageCode = ""; + // Make the request + ListVoicesResponse response = await textToSpeechClient.ListVoicesAsync(languageCode); + // End snippet + } + + /// Snippet for SynthesizeSpeech + public void SynthesizeSpeechRequestObject() + { + // Snippet: SynthesizeSpeech(SynthesizeSpeechRequest, CallSettings) + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + SynthesizeSpeechRequest request = new SynthesizeSpeechRequest + { + Input = new SynthesisInput(), + Voice = new VoiceSelectionParams(), + AudioConfig = new AudioConfig(), + EnableTimePointing = + { + SynthesizeSpeechRequest.Types.TimepointType.Unspecified, + }, + AdvancedVoiceOptions = new AdvancedVoiceOptions(), + }; + // Make the request + SynthesizeSpeechResponse response = textToSpeechClient.SynthesizeSpeech(request); + // End snippet + } + + /// Snippet for SynthesizeSpeechAsync + public async Task SynthesizeSpeechRequestObjectAsync() + { + // Snippet: SynthesizeSpeechAsync(SynthesizeSpeechRequest, CallSettings) + // Additional: SynthesizeSpeechAsync(SynthesizeSpeechRequest, CancellationToken) + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + SynthesizeSpeechRequest request = new SynthesizeSpeechRequest + { + Input = new SynthesisInput(), + Voice = new VoiceSelectionParams(), + AudioConfig = new AudioConfig(), + EnableTimePointing = + { + SynthesizeSpeechRequest.Types.TimepointType.Unspecified, + }, + AdvancedVoiceOptions = new AdvancedVoiceOptions(), + }; + // Make the request + SynthesizeSpeechResponse response = await textToSpeechClient.SynthesizeSpeechAsync(request); + // End snippet + } + + /// Snippet for SynthesizeSpeech + public void SynthesizeSpeech() + { + // Snippet: SynthesizeSpeech(SynthesisInput, VoiceSelectionParams, AudioConfig, CallSettings) + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize request argument(s) + SynthesisInput input = new SynthesisInput(); + VoiceSelectionParams voice = new VoiceSelectionParams(); + AudioConfig audioConfig = new AudioConfig(); + // Make the request + SynthesizeSpeechResponse response = textToSpeechClient.SynthesizeSpeech(input, voice, audioConfig); + // End snippet + } + + /// Snippet for SynthesizeSpeechAsync + public async Task SynthesizeSpeechAsync() + { + // Snippet: SynthesizeSpeechAsync(SynthesisInput, VoiceSelectionParams, AudioConfig, CallSettings) + // Additional: SynthesizeSpeechAsync(SynthesisInput, VoiceSelectionParams, AudioConfig, CancellationToken) + // Create client + TextToSpeechClient textToSpeechClient = await TextToSpeechClient.CreateAsync(); + // Initialize request argument(s) + SynthesisInput input = new SynthesisInput(); + VoiceSelectionParams voice = new VoiceSelectionParams(); + AudioConfig audioConfig = new AudioConfig(); + // Make the request + SynthesizeSpeechResponse response = await textToSpeechClient.SynthesizeSpeechAsync(input, voice, audioConfig); + // End snippet + } + + /// Snippet for StreamingSynthesize + public async Task StreamingSynthesize() + { + // Snippet: StreamingSynthesize(CallSettings, BidirectionalStreamingSettings) + // Create client + TextToSpeechClient textToSpeechClient = TextToSpeechClient.Create(); + // Initialize streaming call, retrieving the stream object + using TextToSpeechClient.StreamingSynthesizeStream response = textToSpeechClient.StreamingSynthesize(); + + // Sending requests and retrieving responses can be arbitrarily interleaved + // Exact sequence will depend on client/server behavior + + // Create task to do something with responses from server + Task responseHandlerTask = Task.Run(async () => + { + // Note that C# 8 code can use await foreach + AsyncResponseStream responseStream = response.GetResponseStream(); + while (await responseStream.MoveNextAsync()) + { + StreamingSynthesizeResponse responseItem = responseStream.Current; + // Do something with streamed response + } + // The response stream has completed + }); + + // Send requests to the server + bool done = false; + while (!done) + { + // Initialize a request + StreamingSynthesizeRequest request = new StreamingSynthesizeRequest + { + StreamingConfig = new StreamingSynthesizeConfig(), + }; + // Stream a request to the server + await response.WriteAsync(request); + // Set "done" to true when sending requests is complete + } + + // Complete writing requests to the stream + await response.WriteCompleteAsync(); + // Await the response handler + // This will complete once all server responses have been processed + await responseHandlerTask; + // End snippet + } + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechLongAudioSynthesizeClientSnippets.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechLongAudioSynthesizeClientSnippets.g.cs new file mode 100755 index 000000000000..02d79551eb9e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.Snippets/TextToSpeechLongAudioSynthesizeClientSnippets.g.cs @@ -0,0 +1,99 @@ +// Copyright 2024 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 +// +// https://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! + +namespace GoogleCSharpSnippets +{ + using Google.Cloud.TextToSpeech.V1Beta1; + using Google.LongRunning; + using System.Threading.Tasks; + + /// Generated snippets. + public sealed class AllGeneratedTextToSpeechLongAudioSynthesizeClientSnippets + { + /// Snippet for SynthesizeLongAudio + public void SynthesizeLongAudioRequestObject() + { + // Snippet: SynthesizeLongAudio(SynthesizeLongAudioRequest, CallSettings) + // Create client + TextToSpeechLongAudioSynthesizeClient textToSpeechLongAudioSynthesizeClient = TextToSpeechLongAudioSynthesizeClient.Create(); + // Initialize request argument(s) + SynthesizeLongAudioRequest request = new SynthesizeLongAudioRequest + { + Parent = "", + Input = new SynthesisInput(), + AudioConfig = new AudioConfig(), + OutputGcsUri = "", + Voice = new VoiceSelectionParams(), + }; + // Make the request + Operation response = textToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = response.PollUntilCompleted(); + // Retrieve the operation result + SynthesizeLongAudioResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = textToSpeechLongAudioSynthesizeClient.PollOnceSynthesizeLongAudio(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + SynthesizeLongAudioResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + + /// Snippet for SynthesizeLongAudioAsync + public async Task SynthesizeLongAudioRequestObjectAsync() + { + // Snippet: SynthesizeLongAudioAsync(SynthesizeLongAudioRequest, CallSettings) + // Additional: SynthesizeLongAudioAsync(SynthesizeLongAudioRequest, CancellationToken) + // Create client + TextToSpeechLongAudioSynthesizeClient textToSpeechLongAudioSynthesizeClient = await TextToSpeechLongAudioSynthesizeClient.CreateAsync(); + // Initialize request argument(s) + SynthesizeLongAudioRequest request = new SynthesizeLongAudioRequest + { + Parent = "", + Input = new SynthesisInput(), + AudioConfig = new AudioConfig(), + OutputGcsUri = "", + Voice = new VoiceSelectionParams(), + }; + // Make the request + Operation response = await textToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioAsync(request); + + // Poll until the returned long-running operation is complete + Operation completedResponse = await response.PollUntilCompletedAsync(); + // Retrieve the operation result + SynthesizeLongAudioResponse result = completedResponse.Result; + + // Or get the name of the operation + string operationName = response.Name; + // This name can be stored, then the long-running operation retrieved later by name + Operation retrievedResponse = await textToSpeechLongAudioSynthesizeClient.PollOnceSynthesizeLongAudioAsync(operationName); + // Check if the retrieved long-running operation has completed + if (retrievedResponse.IsCompleted) + { + // If it has completed, then access the result + SynthesizeLongAudioResponse retrievedResult = retrievedResponse.Result; + } + // End snippet + } + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTts.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTts.g.cs new file mode 100755 index 000000000000..0c2fc5ee2c42 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTts.g.cs @@ -0,0 +1,5966 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/texttospeech/v1beta1/cloud_tts.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.TextToSpeech.V1Beta1 { + + /// Holder for reflection information generated from google/cloud/texttospeech/v1beta1/cloud_tts.proto + public static partial class CloudTtsReflection { + + #region Descriptor + /// File descriptor for google/cloud/texttospeech/v1beta1/cloud_tts.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CloudTtsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjFnb29nbGUvY2xvdWQvdGV4dHRvc3BlZWNoL3YxYmV0YTEvY2xvdWRfdHRz", + "LnByb3RvEiFnb29nbGUuY2xvdWQudGV4dHRvc3BlZWNoLnYxYmV0YTEaHGdv", + "b2dsZS9hcGkvYW5ub3RhdGlvbnMucHJvdG8aF2dvb2dsZS9hcGkvY2xpZW50", + "LnByb3RvGh9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2aW9yLnByb3RvGhlnb29n", + "bGUvYXBpL3Jlc291cmNlLnByb3RvIi8KEUxpc3RWb2ljZXNSZXF1ZXN0EhoK", + "DWxhbmd1YWdlX2NvZGUYASABKAlCA+BBASJOChJMaXN0Vm9pY2VzUmVzcG9u", + "c2USOAoGdm9pY2VzGAEgAygLMiguZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVj", + "aC52MWJldGExLlZvaWNlIpkBCgVWb2ljZRIWCg5sYW5ndWFnZV9jb2RlcxgB", + "IAMoCRIMCgRuYW1lGAIgASgJEkcKC3NzbWxfZ2VuZGVyGAMgASgOMjIuZ29v", + "Z2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLlNzbWxWb2ljZUdlbmRl", + "chIhChluYXR1cmFsX3NhbXBsZV9yYXRlX2hlcnR6GAQgASgFImQKFEFkdmFu", + "Y2VkVm9pY2VPcHRpb25zEioKHWxvd19sYXRlbmN5X2pvdXJuZXlfc3ludGhl", + "c2lzGAEgASgISACIAQFCIAoeX2xvd19sYXRlbmN5X2pvdXJuZXlfc3ludGhl", + "c2lzIpkEChdTeW50aGVzaXplU3BlZWNoUmVxdWVzdBJFCgVpbnB1dBgBIAEo", + "CzIxLmdvb2dsZS5jbG91ZC50ZXh0dG9zcGVlY2gudjFiZXRhMS5TeW50aGVz", + "aXNJbnB1dEID4EECEksKBXZvaWNlGAIgASgLMjcuZ29vZ2xlLmNsb3VkLnRl", + "eHR0b3NwZWVjaC52MWJldGExLlZvaWNlU2VsZWN0aW9uUGFyYW1zQgPgQQIS", + "SQoMYXVkaW9fY29uZmlnGAMgASgLMi4uZ29vZ2xlLmNsb3VkLnRleHR0b3Nw", + "ZWVjaC52MWJldGExLkF1ZGlvQ29uZmlnQgPgQQISZgoUZW5hYmxlX3RpbWVf", + "cG9pbnRpbmcYBCADKA4ySC5nb29nbGUuY2xvdWQudGV4dHRvc3BlZWNoLnYx", + "YmV0YTEuU3ludGhlc2l6ZVNwZWVjaFJlcXVlc3QuVGltZXBvaW50VHlwZRJc", + "ChZhZHZhbmNlZF92b2ljZV9vcHRpb25zGAggASgLMjcuZ29vZ2xlLmNsb3Vk", + "LnRleHR0b3NwZWVjaC52MWJldGExLkFkdmFuY2VkVm9pY2VPcHRpb25zSACI", + "AQEiPgoNVGltZXBvaW50VHlwZRIeChpUSU1FUE9JTlRfVFlQRV9VTlNQRUNJ", + "RklFRBAAEg0KCVNTTUxfTUFSSxABQhkKF19hZHZhbmNlZF92b2ljZV9vcHRp", + "b25zIt8CChlDdXN0b21Qcm9udW5jaWF0aW9uUGFyYW1zEhMKBnBocmFzZRgB", + "IAEoCUgAiAEBEm0KEXBob25ldGljX2VuY29kaW5nGAIgASgOMk0uZ29vZ2xl", + "LmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLkN1c3RvbVByb251bmNpYXRp", + "b25QYXJhbXMuUGhvbmV0aWNFbmNvZGluZ0gBiAEBEhoKDXByb251bmNpYXRp", + "b24YAyABKAlIAogBASJvChBQaG9uZXRpY0VuY29kaW5nEiEKHVBIT05FVElD", + "X0VOQ09ESU5HX1VOU1BFQ0lGSUVEEAASGQoVUEhPTkVUSUNfRU5DT0RJTkdf", + "SVBBEAESHQoZUEhPTkVUSUNfRU5DT0RJTkdfWF9TQU1QQRACQgkKB19waHJh", + "c2VCFAoSX3Bob25ldGljX2VuY29kaW5nQhAKDl9wcm9udW5jaWF0aW9uImwK", + "FEN1c3RvbVByb251bmNpYXRpb25zElQKDnByb251bmNpYXRpb25zGAEgAygL", + "MjwuZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLkN1c3RvbVBy", + "b251bmNpYXRpb25QYXJhbXMilQEKEk11bHRpU3BlYWtlck1hcmt1cBJOCgV0", + "dXJucxgBIAMoCzI6Lmdvb2dsZS5jbG91ZC50ZXh0dG9zcGVlY2gudjFiZXRh", + "MS5NdWx0aVNwZWFrZXJNYXJrdXAuVHVybkID4EECGi8KBFR1cm4SFAoHc3Bl", + "YWtlchgBIAEoCUID4EECEhEKBHRleHQYAiABKAlCA+BBAiL0AQoOU3ludGhl", + "c2lzSW5wdXQSDgoEdGV4dBgBIAEoCUgAEg4KBHNzbWwYAiABKAlIABJVChRt", + "dWx0aV9zcGVha2VyX21hcmt1cBgEIAEoCzI1Lmdvb2dsZS5jbG91ZC50ZXh0", + "dG9zcGVlY2gudjFiZXRhMS5NdWx0aVNwZWFrZXJNYXJrdXBIABJbChVjdXN0", + "b21fcHJvbnVuY2lhdGlvbnMYAyABKAsyNy5nb29nbGUuY2xvdWQudGV4dHRv", + "c3BlZWNoLnYxYmV0YTEuQ3VzdG9tUHJvbnVuY2lhdGlvbnNCA+BBAUIOCgxp", + "bnB1dF9zb3VyY2UipAIKFFZvaWNlU2VsZWN0aW9uUGFyYW1zEhoKDWxhbmd1", + "YWdlX2NvZGUYASABKAlCA+BBAhIMCgRuYW1lGAIgASgJEkcKC3NzbWxfZ2Vu", + "ZGVyGAMgASgOMjIuZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGEx", + "LlNzbWxWb2ljZUdlbmRlchJKCgxjdXN0b21fdm9pY2UYBCABKAsyNC5nb29n", + "bGUuY2xvdWQudGV4dHRvc3BlZWNoLnYxYmV0YTEuQ3VzdG9tVm9pY2VQYXJh", + "bXMSTQoLdm9pY2VfY2xvbmUYBSABKAsyMy5nb29nbGUuY2xvdWQudGV4dHRv", + "c3BlZWNoLnYxYmV0YTEuVm9pY2VDbG9uZVBhcmFtc0ID4EEBIvYBCgtBdWRp", + "b0NvbmZpZxJNCg5hdWRpb19lbmNvZGluZxgBIAEoDjIwLmdvb2dsZS5jbG91", + "ZC50ZXh0dG9zcGVlY2gudjFiZXRhMS5BdWRpb0VuY29kaW5nQgPgQQISHQoN", + "c3BlYWtpbmdfcmF0ZRgCIAEoAUIG4EEE4EEBEhUKBXBpdGNoGAMgASgBQgbg", + "QQTgQQESHgoOdm9sdW1lX2dhaW5fZGIYBCABKAFCBuBBBOBBARIeChFzYW1w", + "bGVfcmF0ZV9oZXJ0ehgFIAEoBUID4EEBEiIKEmVmZmVjdHNfcHJvZmlsZV9p", + "ZBgGIAMoCUIG4EEE4EEBIvYBChFDdXN0b21Wb2ljZVBhcmFtcxIyCgVtb2Rl", + "bBgBIAEoCUIj4EEC+kEdChthdXRvbWwuZ29vZ2xlYXBpcy5jb20vTW9kZWwS", + "YQoOcmVwb3J0ZWRfdXNhZ2UYAyABKA4yQi5nb29nbGUuY2xvdWQudGV4dHRv", + "c3BlZWNoLnYxYmV0YTEuQ3VzdG9tVm9pY2VQYXJhbXMuUmVwb3J0ZWRVc2Fn", + "ZUIFGAHgQQEiSgoNUmVwb3J0ZWRVc2FnZRIeChpSRVBPUlRFRF9VU0FHRV9V", + "TlNQRUNJRklFRBAAEgwKCFJFQUxUSU1FEAESCwoHT0ZGTElORRACIjIKEFZv", + "aWNlQ2xvbmVQYXJhbXMSHgoRdm9pY2VfY2xvbmluZ19rZXkYASABKAlCA+BB", + "AiK5AQoYU3ludGhlc2l6ZVNwZWVjaFJlc3BvbnNlEhUKDWF1ZGlvX2NvbnRl", + "bnQYASABKAwSQAoKdGltZXBvaW50cxgCIAMoCzIsLmdvb2dsZS5jbG91ZC50", + "ZXh0dG9zcGVlY2gudjFiZXRhMS5UaW1lcG9pbnQSRAoMYXVkaW9fY29uZmln", + "GAQgASgLMi4uZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLkF1", + "ZGlvQ29uZmlnIjQKCVRpbWVwb2ludBIRCgltYXJrX25hbWUYBCABKAkSFAoM", + "dGltZV9zZWNvbmRzGAMgASgBIoUBChRTdHJlYW1pbmdBdWRpb0NvbmZpZxJN", + "Cg5hdWRpb19lbmNvZGluZxgBIAEoDjIwLmdvb2dsZS5jbG91ZC50ZXh0dG9z", + "cGVlY2gudjFiZXRhMS5BdWRpb0VuY29kaW5nQgPgQQISHgoRc2FtcGxlX3Jh", + "dGVfaGVydHoYAiABKAVCA+BBASLGAQoZU3RyZWFtaW5nU3ludGhlc2l6ZUNv", + "bmZpZxJLCgV2b2ljZRgBIAEoCzI3Lmdvb2dsZS5jbG91ZC50ZXh0dG9zcGVl", + "Y2gudjFiZXRhMS5Wb2ljZVNlbGVjdGlvblBhcmFtc0ID4EECElwKFnN0cmVh", + "bWluZ19hdWRpb19jb25maWcYBCABKAsyNy5nb29nbGUuY2xvdWQudGV4dHRv", + "c3BlZWNoLnYxYmV0YTEuU3RyZWFtaW5nQXVkaW9Db25maWdCA+BBASI5ChdT", + "dHJlYW1pbmdTeW50aGVzaXNJbnB1dBIOCgR0ZXh0GAEgASgJSABCDgoMaW5w", + "dXRfc291cmNlItgBChpTdHJlYW1pbmdTeW50aGVzaXplUmVxdWVzdBJYChBz", + "dHJlYW1pbmdfY29uZmlnGAEgASgLMjwuZ29vZ2xlLmNsb3VkLnRleHR0b3Nw", + "ZWVjaC52MWJldGExLlN0cmVhbWluZ1N5bnRoZXNpemVDb25maWdIABJLCgVp", + "bnB1dBgCIAEoCzI6Lmdvb2dsZS5jbG91ZC50ZXh0dG9zcGVlY2gudjFiZXRh", + "MS5TdHJlYW1pbmdTeW50aGVzaXNJbnB1dEgAQhMKEXN0cmVhbWluZ19yZXF1", + "ZXN0IjQKG1N0cmVhbWluZ1N5bnRoZXNpemVSZXNwb25zZRIVCg1hdWRpb19j", + "b250ZW50GAEgASgMKlcKD1NzbWxWb2ljZUdlbmRlchIhCh1TU01MX1ZPSUNF", + "X0dFTkRFUl9VTlNQRUNJRklFRBAAEggKBE1BTEUQARIKCgZGRU1BTEUQAhIL", + "CgdORVVUUkFMEAMqgwEKDUF1ZGlvRW5jb2RpbmcSHgoaQVVESU9fRU5DT0RJ", + "TkdfVU5TUEVDSUZJRUQQABIMCghMSU5FQVIxNhABEgcKA01QMxACEg8KC01Q", + "M182NF9LQlBTEAQSDAoIT0dHX09QVVMQAxIJCgVNVUxBVxAFEggKBEFMQVcQ", + "BhIHCgNQQ00QBzLvBAoMVGV4dFRvU3BlZWNoEqIBCgpMaXN0Vm9pY2VzEjQu", + "Z29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLkxpc3RWb2ljZXNS", + "ZXF1ZXN0GjUuZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLkxp", + "c3RWb2ljZXNSZXNwb25zZSIn2kENbGFuZ3VhZ2VfY29kZYLT5JMCERIPL3Yx", + "YmV0YTEvdm9pY2VzEssBChBTeW50aGVzaXplU3BlZWNoEjouZ29vZ2xlLmNs", + "b3VkLnRleHR0b3NwZWVjaC52MWJldGExLlN5bnRoZXNpemVTcGVlY2hSZXF1", + "ZXN0GjsuZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGExLlN5bnRo", + "ZXNpemVTcGVlY2hSZXNwb25zZSI+2kEYaW5wdXQsdm9pY2UsYXVkaW9fY29u", + "ZmlngtPkkwIdIhgvdjFiZXRhMS90ZXh0OnN5bnRoZXNpemU6ASoSmgEKE1N0", + "cmVhbWluZ1N5bnRoZXNpemUSPS5nb29nbGUuY2xvdWQudGV4dHRvc3BlZWNo", + "LnYxYmV0YTEuU3RyZWFtaW5nU3ludGhlc2l6ZVJlcXVlc3QaPi5nb29nbGUu", + "Y2xvdWQudGV4dHRvc3BlZWNoLnYxYmV0YTEuU3RyZWFtaW5nU3ludGhlc2l6", + "ZVJlc3BvbnNlIgAoATABGk/KQRt0ZXh0dG9zcGVlY2guZ29vZ2xlYXBpcy5j", + "b23SQS5odHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRoL2Nsb3VkLXBs", + "YXRmb3JtQtUCCiVjb20uZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJl", + "dGExQhFUZXh0VG9TcGVlY2hQcm90b1ABWkljbG91ZC5nb29nbGUuY29tL2dv", + "L3RleHR0b3NwZWVjaC9hcGl2MWJldGExL3RleHR0b3NwZWVjaHBiO3RleHR0", + "b3NwZWVjaHBiogIEQ1RUU6oCIUdvb2dsZS5DbG91ZC5UZXh0VG9TcGVlY2gu", + "VjFCZXRhMcoCIUdvb2dsZVxDbG91ZFxUZXh0VG9TcGVlY2hcVjFiZXRhMeoC", + "JEdvb2dsZTo6Q2xvdWQ6OlRleHRUb1NwZWVjaDo6VjFiZXRhMepBVQobYXV0", + "b21sLmdvb2dsZWFwaXMuY29tL01vZGVsEjZwcm9qZWN0cy97cHJvamVjdH0v", + "bG9jYXRpb25zL3tsb2NhdGlvbn0vbW9kZWxzL3ttb2RlbH1iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Api.ResourceReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender), typeof(global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest), global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest.Parser, new[]{ "LanguageCode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse), global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse.Parser, new[]{ "Voices" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.Voice), global::Google.Cloud.TextToSpeech.V1Beta1.Voice.Parser, new[]{ "LanguageCodes", "Name", "SsmlGender", "NaturalSampleRateHertz" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions), global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions.Parser, new[]{ "LowLatencyJourneySynthesis" }, new[]{ "LowLatencyJourneySynthesis" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest), global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest.Parser, new[]{ "Input", "Voice", "AudioConfig", "EnableTimePointing", "AdvancedVoiceOptions" }, new[]{ "AdvancedVoiceOptions" }, new[]{ typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest.Types.TimepointType) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams), global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Parser, new[]{ "Phrase", "PhoneticEncoding", "Pronunciation" }, new[]{ "Phrase", "PhoneticEncoding", "Pronunciation" }, new[]{ typeof(global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations), global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations.Parser, new[]{ "Pronunciations" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup), global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup.Parser, new[]{ "Turns" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup.Types.Turn), global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup.Types.Turn.Parser, new[]{ "Speaker", "Text" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput), global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput.Parser, new[]{ "Text", "Ssml", "MultiSpeakerMarkup", "CustomPronunciations" }, new[]{ "InputSource" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams), global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams.Parser, new[]{ "LanguageCode", "Name", "SsmlGender", "CustomVoice", "VoiceClone" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig), global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig.Parser, new[]{ "AudioEncoding", "SpeakingRate", "Pitch", "VolumeGainDb", "SampleRateHertz", "EffectsProfileId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams), global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Parser, new[]{ "Model", "ReportedUsage" }, null, new[]{ typeof(global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams), global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams.Parser, new[]{ "VoiceCloningKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse), global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse.Parser, new[]{ "AudioContent", "Timepoints", "AudioConfig" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.Timepoint), global::Google.Cloud.TextToSpeech.V1Beta1.Timepoint.Parser, new[]{ "MarkName", "TimeSeconds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig), global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig.Parser, new[]{ "AudioEncoding", "SampleRateHertz" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig), global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig.Parser, new[]{ "Voice", "StreamingAudioConfig" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput), global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput.Parser, new[]{ "Text" }, new[]{ "InputSource" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeRequest), global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeRequest.Parser, new[]{ "StreamingConfig", "Input" }, new[]{ "StreamingRequest" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeResponse), global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeResponse.Parser, new[]{ "AudioContent" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// Gender of the voice as described in + /// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice). + /// + public enum SsmlVoiceGender { + /// + /// An unspecified gender. + /// In VoiceSelectionParams, this means that the client doesn't care which + /// gender the selected voice will have. In the Voice field of + /// ListVoicesResponse, this may mean that the voice doesn't fit any of the + /// other categories in this enum, or that the gender of the voice isn't known. + /// + [pbr::OriginalName("SSML_VOICE_GENDER_UNSPECIFIED")] Unspecified = 0, + /// + /// A male voice. + /// + [pbr::OriginalName("MALE")] Male = 1, + /// + /// A female voice. + /// + [pbr::OriginalName("FEMALE")] Female = 2, + /// + /// A gender-neutral voice. This voice is not yet supported. + /// + [pbr::OriginalName("NEUTRAL")] Neutral = 3, + } + + /// + /// Configuration to set up audio encoder. The encoding determines the output + /// audio format that we'd like. + /// + public enum AudioEncoding { + /// + /// Not specified. Will return result + /// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + /// + [pbr::OriginalName("AUDIO_ENCODING_UNSPECIFIED")] Unspecified = 0, + /// + /// Uncompressed 16-bit signed little-endian samples (Linear PCM). + /// Audio content returned as LINEAR16 also contains a WAV header. + /// + [pbr::OriginalName("LINEAR16")] Linear16 = 1, + /// + /// MP3 audio at 32kbps. + /// + [pbr::OriginalName("MP3")] Mp3 = 2, + /// + /// MP3 at 64kbps. + /// + [pbr::OriginalName("MP3_64_KBPS")] Mp364Kbps = 4, + /// + /// Opus encoded audio wrapped in an ogg container. The result will be a + /// file which can be played natively on Android, and in browsers (at least + /// Chrome and Firefox). The quality of the encoding is considerably higher + /// than MP3 while using approximately the same bitrate. + /// + [pbr::OriginalName("OGG_OPUS")] OggOpus = 3, + /// + /// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + /// Audio content returned as MULAW also contains a WAV header. + /// + [pbr::OriginalName("MULAW")] Mulaw = 5, + /// + /// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. + /// Audio content returned as ALAW also contains a WAV header. + /// + [pbr::OriginalName("ALAW")] Alaw = 6, + /// + /// Uncompressed 16-bit signed little-endian samples (Linear PCM). + /// Note that as opposed to LINEAR16, audio will not be wrapped in a WAV (or + /// any other) header. + /// + [pbr::OriginalName("PCM")] Pcm = 7, + } + + #endregion + + #region Messages + /// + /// The top-level message sent by the client for the `ListVoices` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListVoicesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListVoicesRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListVoicesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListVoicesRequest(ListVoicesRequest other) : this() { + languageCode_ = other.languageCode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListVoicesRequest Clone() { + return new ListVoicesRequest(this); + } + + /// Field number for the "language_code" field. + public const int LanguageCodeFieldNumber = 1; + private string languageCode_ = ""; + /// + /// Optional. Recommended. + /// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + /// If not specified, the API will return all supported voices. + /// If specified, the ListVoices call will only return voices that can be used + /// to synthesize this language_code. For example, if you specify `"en-NZ"`, + /// all `"en-NZ"` voices will be returned. If you specify `"no"`, both + /// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + /// returned. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LanguageCode { + get { return languageCode_; } + set { + languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListVoicesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListVoicesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (LanguageCode != other.LanguageCode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (LanguageCode.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LanguageCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (LanguageCode.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LanguageCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (LanguageCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListVoicesRequest other) { + if (other == null) { + return; + } + if (other.LanguageCode.Length != 0) { + LanguageCode = other.LanguageCode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + LanguageCode = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + LanguageCode = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// The message returned to the client by the `ListVoices` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ListVoicesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ListVoicesResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListVoicesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListVoicesResponse(ListVoicesResponse other) : this() { + voices_ = other.voices_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ListVoicesResponse Clone() { + return new ListVoicesResponse(this); + } + + /// Field number for the "voices" field. + public const int VoicesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_voices_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.TextToSpeech.V1Beta1.Voice.Parser); + private readonly pbc::RepeatedField voices_ = new pbc::RepeatedField(); + /// + /// The list of voices. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Voices { + get { return voices_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ListVoicesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ListVoicesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!voices_.Equals(other.voices_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= voices_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + voices_.WriteTo(output, _repeated_voices_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + voices_.WriteTo(ref output, _repeated_voices_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += voices_.CalculateSize(_repeated_voices_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ListVoicesResponse other) { + if (other == null) { + return; + } + voices_.Add(other.voices_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + voices_.AddEntriesFrom(input, _repeated_voices_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + voices_.AddEntriesFrom(ref input, _repeated_voices_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Description of a voice supported by the TTS service. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Voice : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Voice()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Voice() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Voice(Voice other) : this() { + languageCodes_ = other.languageCodes_.Clone(); + name_ = other.name_; + ssmlGender_ = other.ssmlGender_; + naturalSampleRateHertz_ = other.naturalSampleRateHertz_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Voice Clone() { + return new Voice(this); + } + + /// Field number for the "language_codes" field. + public const int LanguageCodesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_languageCodes_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField languageCodes_ = new pbc::RepeatedField(); + /// + /// The languages that this voice supports, expressed as + /// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. + /// "en-US", "es-419", "cmn-tw"). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LanguageCodes { + get { return languageCodes_; } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + /// + /// The name of this voice. Each distinct voice has a unique name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ssml_gender" field. + public const int SsmlGenderFieldNumber = 3; + private global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender ssmlGender_ = global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified; + /// + /// The gender of this voice. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender SsmlGender { + get { return ssmlGender_; } + set { + ssmlGender_ = value; + } + } + + /// Field number for the "natural_sample_rate_hertz" field. + public const int NaturalSampleRateHertzFieldNumber = 4; + private int naturalSampleRateHertz_; + /// + /// The natural sample rate (in hertz) for this voice. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NaturalSampleRateHertz { + get { return naturalSampleRateHertz_; } + set { + naturalSampleRateHertz_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Voice); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Voice other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!languageCodes_.Equals(other.languageCodes_)) return false; + if (Name != other.Name) return false; + if (SsmlGender != other.SsmlGender) return false; + if (NaturalSampleRateHertz != other.NaturalSampleRateHertz) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= languageCodes_.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) hash ^= SsmlGender.GetHashCode(); + if (NaturalSampleRateHertz != 0) hash ^= NaturalSampleRateHertz.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + languageCodes_.WriteTo(output, _repeated_languageCodes_codec); + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) SsmlGender); + } + if (NaturalSampleRateHertz != 0) { + output.WriteRawTag(32); + output.WriteInt32(NaturalSampleRateHertz); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + languageCodes_.WriteTo(ref output, _repeated_languageCodes_codec); + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) SsmlGender); + } + if (NaturalSampleRateHertz != 0) { + output.WriteRawTag(32); + output.WriteInt32(NaturalSampleRateHertz); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += languageCodes_.CalculateSize(_repeated_languageCodes_codec); + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SsmlGender); + } + if (NaturalSampleRateHertz != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NaturalSampleRateHertz); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Voice other) { + if (other == null) { + return; + } + languageCodes_.Add(other.languageCodes_); + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + SsmlGender = other.SsmlGender; + } + if (other.NaturalSampleRateHertz != 0) { + NaturalSampleRateHertz = other.NaturalSampleRateHertz; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + languageCodes_.AddEntriesFrom(input, _repeated_languageCodes_codec); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + SsmlGender = (global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender) input.ReadEnum(); + break; + } + case 32: { + NaturalSampleRateHertz = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + languageCodes_.AddEntriesFrom(ref input, _repeated_languageCodes_codec); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + SsmlGender = (global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender) input.ReadEnum(); + break; + } + case 32: { + NaturalSampleRateHertz = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// Used for advanced voice options. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AdvancedVoiceOptions : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AdvancedVoiceOptions()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AdvancedVoiceOptions() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AdvancedVoiceOptions(AdvancedVoiceOptions other) : this() { + _hasBits0 = other._hasBits0; + lowLatencyJourneySynthesis_ = other.lowLatencyJourneySynthesis_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AdvancedVoiceOptions Clone() { + return new AdvancedVoiceOptions(this); + } + + /// Field number for the "low_latency_journey_synthesis" field. + public const int LowLatencyJourneySynthesisFieldNumber = 1; + private readonly static bool LowLatencyJourneySynthesisDefaultValue = false; + + private bool lowLatencyJourneySynthesis_; + /// + /// Only for Journey voices. If false, the synthesis will be context aware + /// and have higher latency. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool LowLatencyJourneySynthesis { + get { if ((_hasBits0 & 1) != 0) { return lowLatencyJourneySynthesis_; } else { return LowLatencyJourneySynthesisDefaultValue; } } + set { + _hasBits0 |= 1; + lowLatencyJourneySynthesis_ = value; + } + } + /// Gets whether the "low_latency_journey_synthesis" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasLowLatencyJourneySynthesis { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "low_latency_journey_synthesis" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearLowLatencyJourneySynthesis() { + _hasBits0 &= ~1; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AdvancedVoiceOptions); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AdvancedVoiceOptions other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (LowLatencyJourneySynthesis != other.LowLatencyJourneySynthesis) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasLowLatencyJourneySynthesis) hash ^= LowLatencyJourneySynthesis.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasLowLatencyJourneySynthesis) { + output.WriteRawTag(8); + output.WriteBool(LowLatencyJourneySynthesis); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasLowLatencyJourneySynthesis) { + output.WriteRawTag(8); + output.WriteBool(LowLatencyJourneySynthesis); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasLowLatencyJourneySynthesis) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AdvancedVoiceOptions other) { + if (other == null) { + return; + } + if (other.HasLowLatencyJourneySynthesis) { + LowLatencyJourneySynthesis = other.LowLatencyJourneySynthesis; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + LowLatencyJourneySynthesis = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + LowLatencyJourneySynthesis = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// The top-level message sent by the client for the `SynthesizeSpeech` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SynthesizeSpeechRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SynthesizeSpeechRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeSpeechRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeSpeechRequest(SynthesizeSpeechRequest other) : this() { + input_ = other.input_ != null ? other.input_.Clone() : null; + voice_ = other.voice_ != null ? other.voice_.Clone() : null; + audioConfig_ = other.audioConfig_ != null ? other.audioConfig_.Clone() : null; + enableTimePointing_ = other.enableTimePointing_.Clone(); + advancedVoiceOptions_ = other.advancedVoiceOptions_ != null ? other.advancedVoiceOptions_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeSpeechRequest Clone() { + return new SynthesizeSpeechRequest(this); + } + + /// Field number for the "input" field. + public const int InputFieldNumber = 1; + private global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput input_; + /// + /// Required. The Synthesizer requires either plain text or SSML as input. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput Input { + get { return input_; } + set { + input_ = value; + } + } + + /// Field number for the "voice" field. + public const int VoiceFieldNumber = 2; + private global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams voice_; + /// + /// Required. The desired voice of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams Voice { + get { return voice_; } + set { + voice_ = value; + } + } + + /// Field number for the "audio_config" field. + public const int AudioConfigFieldNumber = 3; + private global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig audioConfig_; + /// + /// Required. The configuration of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig AudioConfig { + get { return audioConfig_; } + set { + audioConfig_ = value; + } + } + + /// Field number for the "enable_time_pointing" field. + public const int EnableTimePointingFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_enableTimePointing_codec + = pb::FieldCodec.ForEnum(34, x => (int) x, x => (global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest.Types.TimepointType) x); + private readonly pbc::RepeatedField enableTimePointing_ = new pbc::RepeatedField(); + /// + /// Whether and what timepoints are returned in the response. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnableTimePointing { + get { return enableTimePointing_; } + } + + /// Field number for the "advanced_voice_options" field. + public const int AdvancedVoiceOptionsFieldNumber = 8; + private global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions advancedVoiceOptions_; + /// + /// Advanced voice options. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions AdvancedVoiceOptions { + get { return advancedVoiceOptions_; } + set { + advancedVoiceOptions_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SynthesizeSpeechRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SynthesizeSpeechRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Input, other.Input)) return false; + if (!object.Equals(Voice, other.Voice)) return false; + if (!object.Equals(AudioConfig, other.AudioConfig)) return false; + if(!enableTimePointing_.Equals(other.enableTimePointing_)) return false; + if (!object.Equals(AdvancedVoiceOptions, other.AdvancedVoiceOptions)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (input_ != null) hash ^= Input.GetHashCode(); + if (voice_ != null) hash ^= Voice.GetHashCode(); + if (audioConfig_ != null) hash ^= AudioConfig.GetHashCode(); + hash ^= enableTimePointing_.GetHashCode(); + if (advancedVoiceOptions_ != null) hash ^= AdvancedVoiceOptions.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (input_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Input); + } + if (voice_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Voice); + } + if (audioConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AudioConfig); + } + enableTimePointing_.WriteTo(output, _repeated_enableTimePointing_codec); + if (advancedVoiceOptions_ != null) { + output.WriteRawTag(66); + output.WriteMessage(AdvancedVoiceOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (input_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Input); + } + if (voice_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Voice); + } + if (audioConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AudioConfig); + } + enableTimePointing_.WriteTo(ref output, _repeated_enableTimePointing_codec); + if (advancedVoiceOptions_ != null) { + output.WriteRawTag(66); + output.WriteMessage(AdvancedVoiceOptions); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (input_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Input); + } + if (voice_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Voice); + } + if (audioConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AudioConfig); + } + size += enableTimePointing_.CalculateSize(_repeated_enableTimePointing_codec); + if (advancedVoiceOptions_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AdvancedVoiceOptions); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SynthesizeSpeechRequest other) { + if (other == null) { + return; + } + if (other.input_ != null) { + if (input_ == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput(); + } + Input.MergeFrom(other.Input); + } + if (other.voice_ != null) { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + Voice.MergeFrom(other.Voice); + } + if (other.audioConfig_ != null) { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + AudioConfig.MergeFrom(other.AudioConfig); + } + enableTimePointing_.Add(other.enableTimePointing_); + if (other.advancedVoiceOptions_ != null) { + if (advancedVoiceOptions_ == null) { + AdvancedVoiceOptions = new global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions(); + } + AdvancedVoiceOptions.MergeFrom(other.AdvancedVoiceOptions); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (input_ == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput(); + } + input.ReadMessage(Input); + break; + } + case 18: { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + input.ReadMessage(Voice); + break; + } + case 26: { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + input.ReadMessage(AudioConfig); + break; + } + case 34: + case 32: { + enableTimePointing_.AddEntriesFrom(input, _repeated_enableTimePointing_codec); + break; + } + case 66: { + if (advancedVoiceOptions_ == null) { + AdvancedVoiceOptions = new global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions(); + } + input.ReadMessage(AdvancedVoiceOptions); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (input_ == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput(); + } + input.ReadMessage(Input); + break; + } + case 18: { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + input.ReadMessage(Voice); + break; + } + case 26: { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + input.ReadMessage(AudioConfig); + break; + } + case 34: + case 32: { + enableTimePointing_.AddEntriesFrom(ref input, _repeated_enableTimePointing_codec); + break; + } + case 66: { + if (advancedVoiceOptions_ == null) { + AdvancedVoiceOptions = new global::Google.Cloud.TextToSpeech.V1Beta1.AdvancedVoiceOptions(); + } + input.ReadMessage(AdvancedVoiceOptions); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the SynthesizeSpeechRequest message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The type of timepoint information that is returned in the response. + /// + public enum TimepointType { + /// + /// Not specified. No timepoint information will be returned. + /// + [pbr::OriginalName("TIMEPOINT_TYPE_UNSPECIFIED")] Unspecified = 0, + /// + /// Timepoint information of `<mark>` tags in SSML input will be returned. + /// + [pbr::OriginalName("SSML_MARK")] SsmlMark = 1, + } + + } + #endregion + + } + + /// + /// Pronunciation customization for a phrase. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CustomPronunciationParams : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CustomPronunciationParams()); + private pb::UnknownFieldSet _unknownFields; + private int _hasBits0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomPronunciationParams() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomPronunciationParams(CustomPronunciationParams other) : this() { + _hasBits0 = other._hasBits0; + phrase_ = other.phrase_; + phoneticEncoding_ = other.phoneticEncoding_; + pronunciation_ = other.pronunciation_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomPronunciationParams Clone() { + return new CustomPronunciationParams(this); + } + + /// Field number for the "phrase" field. + public const int PhraseFieldNumber = 1; + private readonly static string PhraseDefaultValue = ""; + + private string phrase_; + /// + /// The phrase to which the customization will be applied. + /// The phrase can be multiple words (in the case of proper nouns etc), but + /// should not span to a whole sentence. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Phrase { + get { return phrase_ ?? PhraseDefaultValue; } + set { + phrase_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "phrase" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPhrase { + get { return phrase_ != null; } + } + /// Clears the value of the "phrase" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPhrase() { + phrase_ = null; + } + + /// Field number for the "phonetic_encoding" field. + public const int PhoneticEncodingFieldNumber = 2; + private readonly static global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding PhoneticEncodingDefaultValue = global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding.Unspecified; + + private global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding phoneticEncoding_; + /// + /// The phonetic encoding of the phrase. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding PhoneticEncoding { + get { if ((_hasBits0 & 1) != 0) { return phoneticEncoding_; } else { return PhoneticEncodingDefaultValue; } } + set { + _hasBits0 |= 1; + phoneticEncoding_ = value; + } + } + /// Gets whether the "phonetic_encoding" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPhoneticEncoding { + get { return (_hasBits0 & 1) != 0; } + } + /// Clears the value of the "phonetic_encoding" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPhoneticEncoding() { + _hasBits0 &= ~1; + } + + /// Field number for the "pronunciation" field. + public const int PronunciationFieldNumber = 3; + private readonly static string PronunciationDefaultValue = ""; + + private string pronunciation_; + /// + /// The pronunciation of the phrase. This must be in the phonetic encoding + /// specified above. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Pronunciation { + get { return pronunciation_ ?? PronunciationDefaultValue; } + set { + pronunciation_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Gets whether the "pronunciation" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasPronunciation { + get { return pronunciation_ != null; } + } + /// Clears the value of the "pronunciation" field + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearPronunciation() { + pronunciation_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CustomPronunciationParams); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CustomPronunciationParams other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Phrase != other.Phrase) return false; + if (PhoneticEncoding != other.PhoneticEncoding) return false; + if (Pronunciation != other.Pronunciation) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasPhrase) hash ^= Phrase.GetHashCode(); + if (HasPhoneticEncoding) hash ^= PhoneticEncoding.GetHashCode(); + if (HasPronunciation) hash ^= Pronunciation.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasPhrase) { + output.WriteRawTag(10); + output.WriteString(Phrase); + } + if (HasPhoneticEncoding) { + output.WriteRawTag(16); + output.WriteEnum((int) PhoneticEncoding); + } + if (HasPronunciation) { + output.WriteRawTag(26); + output.WriteString(Pronunciation); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasPhrase) { + output.WriteRawTag(10); + output.WriteString(Phrase); + } + if (HasPhoneticEncoding) { + output.WriteRawTag(16); + output.WriteEnum((int) PhoneticEncoding); + } + if (HasPronunciation) { + output.WriteRawTag(26); + output.WriteString(Pronunciation); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasPhrase) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Phrase); + } + if (HasPhoneticEncoding) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PhoneticEncoding); + } + if (HasPronunciation) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Pronunciation); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CustomPronunciationParams other) { + if (other == null) { + return; + } + if (other.HasPhrase) { + Phrase = other.Phrase; + } + if (other.HasPhoneticEncoding) { + PhoneticEncoding = other.PhoneticEncoding; + } + if (other.HasPronunciation) { + Pronunciation = other.Pronunciation; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Phrase = input.ReadString(); + break; + } + case 16: { + PhoneticEncoding = (global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding) input.ReadEnum(); + break; + } + case 26: { + Pronunciation = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Phrase = input.ReadString(); + break; + } + case 16: { + PhoneticEncoding = (global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Types.PhoneticEncoding) input.ReadEnum(); + break; + } + case 26: { + Pronunciation = input.ReadString(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CustomPronunciationParams message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// The phonetic encoding of the phrase. + /// + public enum PhoneticEncoding { + /// + /// Not specified. + /// + [pbr::OriginalName("PHONETIC_ENCODING_UNSPECIFIED")] Unspecified = 0, + /// + /// IPA. (e.g. apple -> ˈæpəl ) + /// https://en.wikipedia.org/wiki/International_Phonetic_Alphabet + /// + [pbr::OriginalName("PHONETIC_ENCODING_IPA")] Ipa = 1, + /// + /// X-SAMPA (e.g. apple -> "{p@l" ) + /// https://en.wikipedia.org/wiki/X-SAMPA + /// + [pbr::OriginalName("PHONETIC_ENCODING_X_SAMPA")] XSampa = 2, + } + + } + #endregion + + } + + /// + /// A collection of pronunciation customizations. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CustomPronunciations : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CustomPronunciations()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomPronunciations() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomPronunciations(CustomPronunciations other) : this() { + pronunciations_ = other.pronunciations_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomPronunciations Clone() { + return new CustomPronunciations(this); + } + + /// Field number for the "pronunciations" field. + public const int PronunciationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_pronunciations_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciationParams.Parser); + private readonly pbc::RepeatedField pronunciations_ = new pbc::RepeatedField(); + /// + /// The pronunciation customizations to be applied. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Pronunciations { + get { return pronunciations_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CustomPronunciations); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CustomPronunciations other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!pronunciations_.Equals(other.pronunciations_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= pronunciations_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + pronunciations_.WriteTo(output, _repeated_pronunciations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + pronunciations_.WriteTo(ref output, _repeated_pronunciations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += pronunciations_.CalculateSize(_repeated_pronunciations_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CustomPronunciations other) { + if (other == null) { + return; + } + pronunciations_.Add(other.pronunciations_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + pronunciations_.AddEntriesFrom(input, _repeated_pronunciations_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + pronunciations_.AddEntriesFrom(ref input, _repeated_pronunciations_codec); + break; + } + } + } + } + #endif + + } + + /// + /// A collection of turns for multi-speaker synthesis. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MultiSpeakerMarkup : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MultiSpeakerMarkup()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MultiSpeakerMarkup() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MultiSpeakerMarkup(MultiSpeakerMarkup other) : this() { + turns_ = other.turns_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MultiSpeakerMarkup Clone() { + return new MultiSpeakerMarkup(this); + } + + /// Field number for the "turns" field. + public const int TurnsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_turns_codec + = pb::FieldCodec.ForMessage(10, global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup.Types.Turn.Parser); + private readonly pbc::RepeatedField turns_ = new pbc::RepeatedField(); + /// + /// Required. Speaker turns. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Turns { + get { return turns_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MultiSpeakerMarkup); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MultiSpeakerMarkup other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!turns_.Equals(other.turns_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= turns_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + turns_.WriteTo(output, _repeated_turns_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + turns_.WriteTo(ref output, _repeated_turns_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += turns_.CalculateSize(_repeated_turns_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MultiSpeakerMarkup other) { + if (other == null) { + return; + } + turns_.Add(other.turns_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + turns_.AddEntriesFrom(input, _repeated_turns_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + turns_.AddEntriesFrom(ref input, _repeated_turns_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the MultiSpeakerMarkup message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// A Multi-speaker turn. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Turn : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Turn()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Turn() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Turn(Turn other) : this() { + speaker_ = other.speaker_; + text_ = other.text_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Turn Clone() { + return new Turn(this); + } + + /// Field number for the "speaker" field. + public const int SpeakerFieldNumber = 1; + private string speaker_ = ""; + /// + /// Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer + /// to documentation for available speakers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Speaker { + get { return speaker_; } + set { + speaker_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "text" field. + public const int TextFieldNumber = 2; + private string text_ = ""; + /// + /// Required. The text to speak. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Text { + get { return text_; } + set { + text_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Turn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Turn other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Speaker != other.Speaker) return false; + if (Text != other.Text) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Speaker.Length != 0) hash ^= Speaker.GetHashCode(); + if (Text.Length != 0) hash ^= Text.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Speaker.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Speaker); + } + if (Text.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Text); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Speaker.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Speaker); + } + if (Text.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Text); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Speaker.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Speaker); + } + if (Text.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Turn other) { + if (other == null) { + return; + } + if (other.Speaker.Length != 0) { + Speaker = other.Speaker; + } + if (other.Text.Length != 0) { + Text = other.Text; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Speaker = input.ReadString(); + break; + } + case 18: { + Text = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Speaker = input.ReadString(); + break; + } + case 18: { + Text = input.ReadString(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Contains text input to be synthesized. Either `text` or `ssml` must be + /// supplied. Supplying both or neither returns + /// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. The + /// input size is limited to 5000 bytes. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SynthesisInput : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SynthesisInput()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesisInput() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesisInput(SynthesisInput other) : this() { + customPronunciations_ = other.customPronunciations_ != null ? other.customPronunciations_.Clone() : null; + switch (other.InputSourceCase) { + case InputSourceOneofCase.Text: + Text = other.Text; + break; + case InputSourceOneofCase.Ssml: + Ssml = other.Ssml; + break; + case InputSourceOneofCase.MultiSpeakerMarkup: + MultiSpeakerMarkup = other.MultiSpeakerMarkup.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesisInput Clone() { + return new SynthesisInput(this); + } + + /// Field number for the "text" field. + public const int TextFieldNumber = 1; + /// + /// The raw text to be synthesized. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Text { + get { return HasText ? (string) inputSource_ : ""; } + set { + inputSource_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + inputSourceCase_ = InputSourceOneofCase.Text; + } + } + /// Gets whether the "text" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasText { + get { return inputSourceCase_ == InputSourceOneofCase.Text; } + } + /// Clears the value of the oneof if it's currently set to "text" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearText() { + if (HasText) { + ClearInputSource(); + } + } + + /// Field number for the "ssml" field. + public const int SsmlFieldNumber = 2; + /// + /// The SSML document to be synthesized. The SSML document must be valid + /// and well-formed. Otherwise the RPC will fail and return + /// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. For + /// more information, see + /// [SSML](https://cloud.google.com/text-to-speech/docs/ssml). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Ssml { + get { return HasSsml ? (string) inputSource_ : ""; } + set { + inputSource_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + inputSourceCase_ = InputSourceOneofCase.Ssml; + } + } + /// Gets whether the "ssml" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasSsml { + get { return inputSourceCase_ == InputSourceOneofCase.Ssml; } + } + /// Clears the value of the oneof if it's currently set to "ssml" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearSsml() { + if (HasSsml) { + ClearInputSource(); + } + } + + /// Field number for the "multi_speaker_markup" field. + public const int MultiSpeakerMarkupFieldNumber = 4; + /// + /// The multi-speaker input to be synthesized. Only applicable for + /// multi-speaker synthesis. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup MultiSpeakerMarkup { + get { return inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup ? (global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup) inputSource_ : null; } + set { + inputSource_ = value; + inputSourceCase_ = value == null ? InputSourceOneofCase.None : InputSourceOneofCase.MultiSpeakerMarkup; + } + } + + /// Field number for the "custom_pronunciations" field. + public const int CustomPronunciationsFieldNumber = 3; + private global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations customPronunciations_; + /// + /// Optional. The pronunciation customizations to be applied to the input. If + /// this is set, the input will be synthesized using the given pronunciation + /// customizations. + /// + /// The initial support will be for EFIGS (English, French, + /// Italian, German, Spanish) languages, as provided in + /// VoiceSelectionParams. Journey and Instant Clone voices are + /// not supported yet. + /// + /// In order to customize the pronunciation of a phrase, there must be an exact + /// match of the phrase in the input types. If using SSML, the phrase must not + /// be inside a phoneme tag (entirely or partially). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations CustomPronunciations { + get { return customPronunciations_; } + set { + customPronunciations_ = value; + } + } + + private object inputSource_; + /// Enum of possible cases for the "input_source" oneof. + public enum InputSourceOneofCase { + None = 0, + Text = 1, + Ssml = 2, + MultiSpeakerMarkup = 4, + } + private InputSourceOneofCase inputSourceCase_ = InputSourceOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InputSourceOneofCase InputSourceCase { + get { return inputSourceCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInputSource() { + inputSourceCase_ = InputSourceOneofCase.None; + inputSource_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SynthesisInput); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SynthesisInput other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Text != other.Text) return false; + if (Ssml != other.Ssml) return false; + if (!object.Equals(MultiSpeakerMarkup, other.MultiSpeakerMarkup)) return false; + if (!object.Equals(CustomPronunciations, other.CustomPronunciations)) return false; + if (InputSourceCase != other.InputSourceCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasText) hash ^= Text.GetHashCode(); + if (HasSsml) hash ^= Ssml.GetHashCode(); + if (inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup) hash ^= MultiSpeakerMarkup.GetHashCode(); + if (customPronunciations_ != null) hash ^= CustomPronunciations.GetHashCode(); + hash ^= (int) inputSourceCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasText) { + output.WriteRawTag(10); + output.WriteString(Text); + } + if (HasSsml) { + output.WriteRawTag(18); + output.WriteString(Ssml); + } + if (customPronunciations_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CustomPronunciations); + } + if (inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup) { + output.WriteRawTag(34); + output.WriteMessage(MultiSpeakerMarkup); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasText) { + output.WriteRawTag(10); + output.WriteString(Text); + } + if (HasSsml) { + output.WriteRawTag(18); + output.WriteString(Ssml); + } + if (customPronunciations_ != null) { + output.WriteRawTag(26); + output.WriteMessage(CustomPronunciations); + } + if (inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup) { + output.WriteRawTag(34); + output.WriteMessage(MultiSpeakerMarkup); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasText) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); + } + if (HasSsml) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Ssml); + } + if (inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MultiSpeakerMarkup); + } + if (customPronunciations_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CustomPronunciations); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SynthesisInput other) { + if (other == null) { + return; + } + if (other.customPronunciations_ != null) { + if (customPronunciations_ == null) { + CustomPronunciations = new global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations(); + } + CustomPronunciations.MergeFrom(other.CustomPronunciations); + } + switch (other.InputSourceCase) { + case InputSourceOneofCase.Text: + Text = other.Text; + break; + case InputSourceOneofCase.Ssml: + Ssml = other.Ssml; + break; + case InputSourceOneofCase.MultiSpeakerMarkup: + if (MultiSpeakerMarkup == null) { + MultiSpeakerMarkup = new global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup(); + } + MultiSpeakerMarkup.MergeFrom(other.MultiSpeakerMarkup); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Text = input.ReadString(); + break; + } + case 18: { + Ssml = input.ReadString(); + break; + } + case 26: { + if (customPronunciations_ == null) { + CustomPronunciations = new global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations(); + } + input.ReadMessage(CustomPronunciations); + break; + } + case 34: { + global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup subBuilder = new global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup(); + if (inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup) { + subBuilder.MergeFrom(MultiSpeakerMarkup); + } + input.ReadMessage(subBuilder); + MultiSpeakerMarkup = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Text = input.ReadString(); + break; + } + case 18: { + Ssml = input.ReadString(); + break; + } + case 26: { + if (customPronunciations_ == null) { + CustomPronunciations = new global::Google.Cloud.TextToSpeech.V1Beta1.CustomPronunciations(); + } + input.ReadMessage(CustomPronunciations); + break; + } + case 34: { + global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup subBuilder = new global::Google.Cloud.TextToSpeech.V1Beta1.MultiSpeakerMarkup(); + if (inputSourceCase_ == InputSourceOneofCase.MultiSpeakerMarkup) { + subBuilder.MergeFrom(MultiSpeakerMarkup); + } + input.ReadMessage(subBuilder); + MultiSpeakerMarkup = subBuilder; + break; + } + } + } + } + #endif + + } + + /// + /// Description of which voice to use for a synthesis request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class VoiceSelectionParams : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new VoiceSelectionParams()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VoiceSelectionParams() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VoiceSelectionParams(VoiceSelectionParams other) : this() { + languageCode_ = other.languageCode_; + name_ = other.name_; + ssmlGender_ = other.ssmlGender_; + customVoice_ = other.customVoice_ != null ? other.customVoice_.Clone() : null; + voiceClone_ = other.voiceClone_ != null ? other.voiceClone_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VoiceSelectionParams Clone() { + return new VoiceSelectionParams(this); + } + + /// Field number for the "language_code" field. + public const int LanguageCodeFieldNumber = 1; + private string languageCode_ = ""; + /// + /// Required. The language (and potentially also the region) of the voice + /// expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) + /// language tag, e.g. "en-US". This should not include a script tag (e.g. use + /// "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred + /// from the input provided in the SynthesisInput. The TTS service + /// will use this parameter to help choose an appropriate voice. Note that + /// the TTS service may choose a voice with a slightly different language code + /// than the one selected; it may substitute a different region + /// (e.g. using en-US rather than en-CA if there isn't a Canadian voice + /// available), or even a different language, e.g. using "nb" (Norwegian + /// Bokmal) instead of "no" (Norwegian)". + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LanguageCode { + get { return languageCode_; } + set { + languageCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + /// + /// The name of the voice. If both the name and the gender are not set, + /// the service will choose a voice based on the other parameters such as + /// language_code. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ssml_gender" field. + public const int SsmlGenderFieldNumber = 3; + private global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender ssmlGender_ = global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified; + /// + /// The preferred gender of the voice. If not set, the service will + /// choose a voice based on the other parameters such as language_code and + /// name. Note that this is only a preference, not requirement; if a + /// voice of the appropriate gender is not available, the synthesizer should + /// substitute a voice with a different gender rather than failing the request. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender SsmlGender { + get { return ssmlGender_; } + set { + ssmlGender_ = value; + } + } + + /// Field number for the "custom_voice" field. + public const int CustomVoiceFieldNumber = 4; + private global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams customVoice_; + /// + /// The configuration for a custom voice. If [CustomVoiceParams.model] is set, + /// the service will choose the custom voice matching the specified + /// configuration. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams CustomVoice { + get { return customVoice_; } + set { + customVoice_ = value; + } + } + + /// Field number for the "voice_clone" field. + public const int VoiceCloneFieldNumber = 5; + private global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams voiceClone_; + /// + /// Optional. The configuration for a voice clone. If + /// [VoiceCloneParams.voice_clone_key] is set, the service will choose the + /// voice clone matching the specified configuration. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams VoiceClone { + get { return voiceClone_; } + set { + voiceClone_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as VoiceSelectionParams); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(VoiceSelectionParams other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (LanguageCode != other.LanguageCode) return false; + if (Name != other.Name) return false; + if (SsmlGender != other.SsmlGender) return false; + if (!object.Equals(CustomVoice, other.CustomVoice)) return false; + if (!object.Equals(VoiceClone, other.VoiceClone)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (LanguageCode.Length != 0) hash ^= LanguageCode.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) hash ^= SsmlGender.GetHashCode(); + if (customVoice_ != null) hash ^= CustomVoice.GetHashCode(); + if (voiceClone_ != null) hash ^= VoiceClone.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (LanguageCode.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LanguageCode); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) SsmlGender); + } + if (customVoice_ != null) { + output.WriteRawTag(34); + output.WriteMessage(CustomVoice); + } + if (voiceClone_ != null) { + output.WriteRawTag(42); + output.WriteMessage(VoiceClone); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (LanguageCode.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LanguageCode); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) SsmlGender); + } + if (customVoice_ != null) { + output.WriteRawTag(34); + output.WriteMessage(CustomVoice); + } + if (voiceClone_ != null) { + output.WriteRawTag(42); + output.WriteMessage(VoiceClone); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (LanguageCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LanguageCode); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SsmlGender); + } + if (customVoice_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CustomVoice); + } + if (voiceClone_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(VoiceClone); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(VoiceSelectionParams other) { + if (other == null) { + return; + } + if (other.LanguageCode.Length != 0) { + LanguageCode = other.LanguageCode; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.SsmlGender != global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender.Unspecified) { + SsmlGender = other.SsmlGender; + } + if (other.customVoice_ != null) { + if (customVoice_ == null) { + CustomVoice = new global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams(); + } + CustomVoice.MergeFrom(other.CustomVoice); + } + if (other.voiceClone_ != null) { + if (voiceClone_ == null) { + VoiceClone = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams(); + } + VoiceClone.MergeFrom(other.VoiceClone); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + LanguageCode = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + SsmlGender = (global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender) input.ReadEnum(); + break; + } + case 34: { + if (customVoice_ == null) { + CustomVoice = new global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams(); + } + input.ReadMessage(CustomVoice); + break; + } + case 42: { + if (voiceClone_ == null) { + VoiceClone = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams(); + } + input.ReadMessage(VoiceClone); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + LanguageCode = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + SsmlGender = (global::Google.Cloud.TextToSpeech.V1Beta1.SsmlVoiceGender) input.ReadEnum(); + break; + } + case 34: { + if (customVoice_ == null) { + CustomVoice = new global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams(); + } + input.ReadMessage(CustomVoice); + break; + } + case 42: { + if (voiceClone_ == null) { + VoiceClone = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceCloneParams(); + } + input.ReadMessage(VoiceClone); + break; + } + } + } + } + #endif + + } + + /// + /// Description of audio data to be synthesized. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AudioConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AudioConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AudioConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AudioConfig(AudioConfig other) : this() { + audioEncoding_ = other.audioEncoding_; + speakingRate_ = other.speakingRate_; + pitch_ = other.pitch_; + volumeGainDb_ = other.volumeGainDb_; + sampleRateHertz_ = other.sampleRateHertz_; + effectsProfileId_ = other.effectsProfileId_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AudioConfig Clone() { + return new AudioConfig(this); + } + + /// Field number for the "audio_encoding" field. + public const int AudioEncodingFieldNumber = 1; + private global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding audioEncoding_ = global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified; + /// + /// Required. The format of the audio byte stream. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding AudioEncoding { + get { return audioEncoding_; } + set { + audioEncoding_ = value; + } + } + + /// Field number for the "speaking_rate" field. + public const int SpeakingRateFieldNumber = 2; + private double speakingRate_; + /// + /// Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is + /// the normal native speed supported by the specific voice. 2.0 is twice as + /// fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 + /// speed. Any other values < 0.25 or > 4.0 will return an error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double SpeakingRate { + get { return speakingRate_; } + set { + speakingRate_ = value; + } + } + + /// Field number for the "pitch" field. + public const int PitchFieldNumber = 3; + private double pitch_; + /// + /// Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means + /// increase 20 semitones from the original pitch. -20 means decrease 20 + /// semitones from the original pitch. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Pitch { + get { return pitch_; } + set { + pitch_ = value; + } + } + + /// Field number for the "volume_gain_db" field. + public const int VolumeGainDbFieldNumber = 4; + private double volumeGainDb_; + /// + /// Optional. Input only. Volume gain (in dB) of the normal native volume + /// supported by the specific voice, in the range [-96.0, 16.0]. If unset, or + /// set to a value of 0.0 (dB), will play at normal native signal amplitude. A + /// value of -6.0 (dB) will play at approximately half the amplitude of the + /// normal native signal amplitude. A value of +6.0 (dB) will play at + /// approximately twice the amplitude of the normal native signal amplitude. + /// Strongly recommend not to exceed +10 (dB) as there's usually no effective + /// increase in loudness for any value greater than that. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double VolumeGainDb { + get { return volumeGainDb_; } + set { + volumeGainDb_ = value; + } + } + + /// Field number for the "sample_rate_hertz" field. + public const int SampleRateHertzFieldNumber = 5; + private int sampleRateHertz_; + /// + /// Optional. The synthesis sample rate (in hertz) for this audio. When this is + /// specified in SynthesizeSpeechRequest, if this is different from the voice's + /// natural sample rate, then the synthesizer will honor this request by + /// converting to the desired sample rate (which might result in worse audio + /// quality), unless the specified sample rate is not supported for the + /// encoding chosen, in which case it will fail the request and return + /// [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SampleRateHertz { + get { return sampleRateHertz_; } + set { + sampleRateHertz_ = value; + } + } + + /// Field number for the "effects_profile_id" field. + public const int EffectsProfileIdFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_effectsProfileId_codec + = pb::FieldCodec.ForString(50); + private readonly pbc::RepeatedField effectsProfileId_ = new pbc::RepeatedField(); + /// + /// Optional. Input only. An identifier which selects 'audio effects' profiles + /// that are applied on (post synthesized) text to speech. Effects are applied + /// on top of each other in the order they are given. See + /// [audio + /// profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for + /// current supported profile ids. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EffectsProfileId { + get { return effectsProfileId_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AudioConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AudioConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AudioEncoding != other.AudioEncoding) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(SpeakingRate, other.SpeakingRate)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Pitch, other.Pitch)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(VolumeGainDb, other.VolumeGainDb)) return false; + if (SampleRateHertz != other.SampleRateHertz) return false; + if(!effectsProfileId_.Equals(other.effectsProfileId_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) hash ^= AudioEncoding.GetHashCode(); + if (SpeakingRate != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(SpeakingRate); + if (Pitch != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Pitch); + if (VolumeGainDb != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(VolumeGainDb); + if (SampleRateHertz != 0) hash ^= SampleRateHertz.GetHashCode(); + hash ^= effectsProfileId_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AudioEncoding); + } + if (SpeakingRate != 0D) { + output.WriteRawTag(17); + output.WriteDouble(SpeakingRate); + } + if (Pitch != 0D) { + output.WriteRawTag(25); + output.WriteDouble(Pitch); + } + if (VolumeGainDb != 0D) { + output.WriteRawTag(33); + output.WriteDouble(VolumeGainDb); + } + if (SampleRateHertz != 0) { + output.WriteRawTag(40); + output.WriteInt32(SampleRateHertz); + } + effectsProfileId_.WriteTo(output, _repeated_effectsProfileId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AudioEncoding); + } + if (SpeakingRate != 0D) { + output.WriteRawTag(17); + output.WriteDouble(SpeakingRate); + } + if (Pitch != 0D) { + output.WriteRawTag(25); + output.WriteDouble(Pitch); + } + if (VolumeGainDb != 0D) { + output.WriteRawTag(33); + output.WriteDouble(VolumeGainDb); + } + if (SampleRateHertz != 0) { + output.WriteRawTag(40); + output.WriteInt32(SampleRateHertz); + } + effectsProfileId_.WriteTo(ref output, _repeated_effectsProfileId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AudioEncoding); + } + if (SpeakingRate != 0D) { + size += 1 + 8; + } + if (Pitch != 0D) { + size += 1 + 8; + } + if (VolumeGainDb != 0D) { + size += 1 + 8; + } + if (SampleRateHertz != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SampleRateHertz); + } + size += effectsProfileId_.CalculateSize(_repeated_effectsProfileId_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AudioConfig other) { + if (other == null) { + return; + } + if (other.AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + AudioEncoding = other.AudioEncoding; + } + if (other.SpeakingRate != 0D) { + SpeakingRate = other.SpeakingRate; + } + if (other.Pitch != 0D) { + Pitch = other.Pitch; + } + if (other.VolumeGainDb != 0D) { + VolumeGainDb = other.VolumeGainDb; + } + if (other.SampleRateHertz != 0) { + SampleRateHertz = other.SampleRateHertz; + } + effectsProfileId_.Add(other.effectsProfileId_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AudioEncoding = (global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding) input.ReadEnum(); + break; + } + case 17: { + SpeakingRate = input.ReadDouble(); + break; + } + case 25: { + Pitch = input.ReadDouble(); + break; + } + case 33: { + VolumeGainDb = input.ReadDouble(); + break; + } + case 40: { + SampleRateHertz = input.ReadInt32(); + break; + } + case 50: { + effectsProfileId_.AddEntriesFrom(input, _repeated_effectsProfileId_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + AudioEncoding = (global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding) input.ReadEnum(); + break; + } + case 17: { + SpeakingRate = input.ReadDouble(); + break; + } + case 25: { + Pitch = input.ReadDouble(); + break; + } + case 33: { + VolumeGainDb = input.ReadDouble(); + break; + } + case 40: { + SampleRateHertz = input.ReadInt32(); + break; + } + case 50: { + effectsProfileId_.AddEntriesFrom(ref input, _repeated_effectsProfileId_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Description of the custom voice to be synthesized. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CustomVoiceParams : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CustomVoiceParams()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomVoiceParams() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomVoiceParams(CustomVoiceParams other) : this() { + model_ = other.model_; + reportedUsage_ = other.reportedUsage_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CustomVoiceParams Clone() { + return new CustomVoiceParams(this); + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 1; + private string model_ = ""; + /// + /// Required. The name of the AutoML model that synthesizes the custom voice. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Model { + get { return model_; } + set { + model_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "reported_usage" field. + public const int ReportedUsageFieldNumber = 3; + private global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage reportedUsage_ = global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage.Unspecified; + /// + /// Optional. Deprecated. The usage of the synthesized audio to be reported. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage ReportedUsage { + get { return reportedUsage_; } + set { + reportedUsage_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CustomVoiceParams); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CustomVoiceParams other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Model != other.Model) return false; + if (ReportedUsage != other.ReportedUsage) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Model.Length != 0) hash ^= Model.GetHashCode(); + if (ReportedUsage != global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage.Unspecified) hash ^= ReportedUsage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Model.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Model); + } + if (ReportedUsage != global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) ReportedUsage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Model.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Model); + } + if (ReportedUsage != global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage.Unspecified) { + output.WriteRawTag(24); + output.WriteEnum((int) ReportedUsage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Model.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Model); + } + if (ReportedUsage != global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ReportedUsage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CustomVoiceParams other) { + if (other == null) { + return; + } + if (other.Model.Length != 0) { + Model = other.Model; + } + if (other.ReportedUsage != global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage.Unspecified) { + ReportedUsage = other.ReportedUsage; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Model = input.ReadString(); + break; + } + case 24: { + ReportedUsage = (global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Model = input.ReadString(); + break; + } + case 24: { + ReportedUsage = (global::Google.Cloud.TextToSpeech.V1Beta1.CustomVoiceParams.Types.ReportedUsage) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the CustomVoiceParams message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + /// + /// Deprecated. The usage of the synthesized audio. Usage does not affect + /// billing. + /// + public enum ReportedUsage { + /// + /// Request with reported usage unspecified will be rejected. + /// + [pbr::OriginalName("REPORTED_USAGE_UNSPECIFIED")] Unspecified = 0, + /// + /// For scenarios where the synthesized audio is not downloadable and can + /// only be used once. For example, real-time request in IVR system. + /// + [pbr::OriginalName("REALTIME")] Realtime = 1, + /// + /// For scenarios where the synthesized audio is downloadable and can be + /// reused. For example, the synthesized audio is downloaded, stored in + /// customer service system and played repeatedly. + /// + [pbr::OriginalName("OFFLINE")] Offline = 2, + } + + } + #endregion + + } + + /// + /// The configuration of Voice Clone feature. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class VoiceCloneParams : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new VoiceCloneParams()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VoiceCloneParams() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VoiceCloneParams(VoiceCloneParams other) : this() { + voiceCloningKey_ = other.voiceCloningKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public VoiceCloneParams Clone() { + return new VoiceCloneParams(this); + } + + /// Field number for the "voice_cloning_key" field. + public const int VoiceCloningKeyFieldNumber = 1; + private string voiceCloningKey_ = ""; + /// + /// Required. Created by GenerateVoiceCloningKey. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VoiceCloningKey { + get { return voiceCloningKey_; } + set { + voiceCloningKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as VoiceCloneParams); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(VoiceCloneParams other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (VoiceCloningKey != other.VoiceCloningKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (VoiceCloningKey.Length != 0) hash ^= VoiceCloningKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (VoiceCloningKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(VoiceCloningKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (VoiceCloningKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(VoiceCloningKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (VoiceCloningKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VoiceCloningKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(VoiceCloneParams other) { + if (other == null) { + return; + } + if (other.VoiceCloningKey.Length != 0) { + VoiceCloningKey = other.VoiceCloningKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + VoiceCloningKey = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + VoiceCloningKey = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// The message returned to the client by the `SynthesizeSpeech` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SynthesizeSpeechResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SynthesizeSpeechResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeSpeechResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeSpeechResponse(SynthesizeSpeechResponse other) : this() { + audioContent_ = other.audioContent_; + timepoints_ = other.timepoints_.Clone(); + audioConfig_ = other.audioConfig_ != null ? other.audioConfig_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeSpeechResponse Clone() { + return new SynthesizeSpeechResponse(this); + } + + /// Field number for the "audio_content" field. + public const int AudioContentFieldNumber = 1; + private pb::ByteString audioContent_ = pb::ByteString.Empty; + /// + /// The audio data bytes encoded as specified in the request, including the + /// header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). + /// For LINEAR16 audio, we include the WAV header. Note: as + /// with all bytes fields, protobuffers use a pure binary representation, + /// whereas JSON representations use base64. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AudioContent { + get { return audioContent_; } + set { + audioContent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "timepoints" field. + public const int TimepointsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_timepoints_codec + = pb::FieldCodec.ForMessage(18, global::Google.Cloud.TextToSpeech.V1Beta1.Timepoint.Parser); + private readonly pbc::RepeatedField timepoints_ = new pbc::RepeatedField(); + /// + /// A link between a position in the original request input and a corresponding + /// time in the output audio. It's only supported via `<mark>` of SSML input. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Timepoints { + get { return timepoints_; } + } + + /// Field number for the "audio_config" field. + public const int AudioConfigFieldNumber = 4; + private global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig audioConfig_; + /// + /// The audio metadata of `audio_content`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig AudioConfig { + get { return audioConfig_; } + set { + audioConfig_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SynthesizeSpeechResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SynthesizeSpeechResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AudioContent != other.AudioContent) return false; + if(!timepoints_.Equals(other.timepoints_)) return false; + if (!object.Equals(AudioConfig, other.AudioConfig)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AudioContent.Length != 0) hash ^= AudioContent.GetHashCode(); + hash ^= timepoints_.GetHashCode(); + if (audioConfig_ != null) hash ^= AudioConfig.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AudioContent.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AudioContent); + } + timepoints_.WriteTo(output, _repeated_timepoints_codec); + if (audioConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(AudioConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AudioContent.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AudioContent); + } + timepoints_.WriteTo(ref output, _repeated_timepoints_codec); + if (audioConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(AudioConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (AudioContent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AudioContent); + } + size += timepoints_.CalculateSize(_repeated_timepoints_codec); + if (audioConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AudioConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SynthesizeSpeechResponse other) { + if (other == null) { + return; + } + if (other.AudioContent.Length != 0) { + AudioContent = other.AudioContent; + } + timepoints_.Add(other.timepoints_); + if (other.audioConfig_ != null) { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + AudioConfig.MergeFrom(other.AudioConfig); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + AudioContent = input.ReadBytes(); + break; + } + case 18: { + timepoints_.AddEntriesFrom(input, _repeated_timepoints_codec); + break; + } + case 34: { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + input.ReadMessage(AudioConfig); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AudioContent = input.ReadBytes(); + break; + } + case 18: { + timepoints_.AddEntriesFrom(ref input, _repeated_timepoints_codec); + break; + } + case 34: { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + input.ReadMessage(AudioConfig); + break; + } + } + } + } + #endif + + } + + /// + /// This contains a mapping between a certain point in the input text and a + /// corresponding time in the output audio. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Timepoint : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Timepoint()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timepoint() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timepoint(Timepoint other) : this() { + markName_ = other.markName_; + timeSeconds_ = other.timeSeconds_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Timepoint Clone() { + return new Timepoint(this); + } + + /// Field number for the "mark_name" field. + public const int MarkNameFieldNumber = 4; + private string markName_ = ""; + /// + /// Timepoint name as received from the client within `<mark>` tag. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MarkName { + get { return markName_; } + set { + markName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "time_seconds" field. + public const int TimeSecondsFieldNumber = 3; + private double timeSeconds_; + /// + /// Time offset in seconds from the start of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double TimeSeconds { + get { return timeSeconds_; } + set { + timeSeconds_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Timepoint); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Timepoint other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MarkName != other.MarkName) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(TimeSeconds, other.TimeSeconds)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (MarkName.Length != 0) hash ^= MarkName.GetHashCode(); + if (TimeSeconds != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(TimeSeconds); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TimeSeconds != 0D) { + output.WriteRawTag(25); + output.WriteDouble(TimeSeconds); + } + if (MarkName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(MarkName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TimeSeconds != 0D) { + output.WriteRawTag(25); + output.WriteDouble(TimeSeconds); + } + if (MarkName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(MarkName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (MarkName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MarkName); + } + if (TimeSeconds != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Timepoint other) { + if (other == null) { + return; + } + if (other.MarkName.Length != 0) { + MarkName = other.MarkName; + } + if (other.TimeSeconds != 0D) { + TimeSeconds = other.TimeSeconds; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 25: { + TimeSeconds = input.ReadDouble(); + break; + } + case 34: { + MarkName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 25: { + TimeSeconds = input.ReadDouble(); + break; + } + case 34: { + MarkName = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Description of the desired output audio data. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StreamingAudioConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StreamingAudioConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingAudioConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingAudioConfig(StreamingAudioConfig other) : this() { + audioEncoding_ = other.audioEncoding_; + sampleRateHertz_ = other.sampleRateHertz_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingAudioConfig Clone() { + return new StreamingAudioConfig(this); + } + + /// Field number for the "audio_encoding" field. + public const int AudioEncodingFieldNumber = 1; + private global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding audioEncoding_ = global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified; + /// + /// Required. The format of the audio byte stream. + /// For now, streaming only supports PCM and OGG_OPUS. All other encodings + /// will return an error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding AudioEncoding { + get { return audioEncoding_; } + set { + audioEncoding_ = value; + } + } + + /// Field number for the "sample_rate_hertz" field. + public const int SampleRateHertzFieldNumber = 2; + private int sampleRateHertz_; + /// + /// Optional. The synthesis sample rate (in hertz) for this audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SampleRateHertz { + get { return sampleRateHertz_; } + set { + sampleRateHertz_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StreamingAudioConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StreamingAudioConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AudioEncoding != other.AudioEncoding) return false; + if (SampleRateHertz != other.SampleRateHertz) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) hash ^= AudioEncoding.GetHashCode(); + if (SampleRateHertz != 0) hash ^= SampleRateHertz.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AudioEncoding); + } + if (SampleRateHertz != 0) { + output.WriteRawTag(16); + output.WriteInt32(SampleRateHertz); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) AudioEncoding); + } + if (SampleRateHertz != 0) { + output.WriteRawTag(16); + output.WriteInt32(SampleRateHertz); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AudioEncoding); + } + if (SampleRateHertz != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SampleRateHertz); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StreamingAudioConfig other) { + if (other == null) { + return; + } + if (other.AudioEncoding != global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding.Unspecified) { + AudioEncoding = other.AudioEncoding; + } + if (other.SampleRateHertz != 0) { + SampleRateHertz = other.SampleRateHertz; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AudioEncoding = (global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding) input.ReadEnum(); + break; + } + case 16: { + SampleRateHertz = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + AudioEncoding = (global::Google.Cloud.TextToSpeech.V1Beta1.AudioEncoding) input.ReadEnum(); + break; + } + case 16: { + SampleRateHertz = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + /// Provides configuration information for the StreamingSynthesize request. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StreamingSynthesizeConfig : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StreamingSynthesizeConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeConfig(StreamingSynthesizeConfig other) : this() { + voice_ = other.voice_ != null ? other.voice_.Clone() : null; + streamingAudioConfig_ = other.streamingAudioConfig_ != null ? other.streamingAudioConfig_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeConfig Clone() { + return new StreamingSynthesizeConfig(this); + } + + /// Field number for the "voice" field. + public const int VoiceFieldNumber = 1; + private global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams voice_; + /// + /// Required. The desired voice of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams Voice { + get { return voice_; } + set { + voice_ = value; + } + } + + /// Field number for the "streaming_audio_config" field. + public const int StreamingAudioConfigFieldNumber = 4; + private global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig streamingAudioConfig_; + /// + /// Optional. The configuration of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig StreamingAudioConfig { + get { return streamingAudioConfig_; } + set { + streamingAudioConfig_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StreamingSynthesizeConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StreamingSynthesizeConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Voice, other.Voice)) return false; + if (!object.Equals(StreamingAudioConfig, other.StreamingAudioConfig)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (voice_ != null) hash ^= Voice.GetHashCode(); + if (streamingAudioConfig_ != null) hash ^= StreamingAudioConfig.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (voice_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Voice); + } + if (streamingAudioConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(StreamingAudioConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (voice_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Voice); + } + if (streamingAudioConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(StreamingAudioConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (voice_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Voice); + } + if (streamingAudioConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StreamingAudioConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StreamingSynthesizeConfig other) { + if (other == null) { + return; + } + if (other.voice_ != null) { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + Voice.MergeFrom(other.Voice); + } + if (other.streamingAudioConfig_ != null) { + if (streamingAudioConfig_ == null) { + StreamingAudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig(); + } + StreamingAudioConfig.MergeFrom(other.StreamingAudioConfig); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + input.ReadMessage(Voice); + break; + } + case 34: { + if (streamingAudioConfig_ == null) { + StreamingAudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig(); + } + input.ReadMessage(StreamingAudioConfig); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + input.ReadMessage(Voice); + break; + } + case 34: { + if (streamingAudioConfig_ == null) { + StreamingAudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingAudioConfig(); + } + input.ReadMessage(StreamingAudioConfig); + break; + } + } + } + } + #endif + + } + + /// + /// Input to be synthesized. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StreamingSynthesisInput : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StreamingSynthesisInput()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesisInput() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesisInput(StreamingSynthesisInput other) : this() { + switch (other.InputSourceCase) { + case InputSourceOneofCase.Text: + Text = other.Text; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesisInput Clone() { + return new StreamingSynthesisInput(this); + } + + /// Field number for the "text" field. + public const int TextFieldNumber = 1; + /// + /// The raw text to be synthesized. It is recommended that each input + /// contains complete, terminating sentences, as this will likely result in + /// better prosody in the output audio. That being said, users are free to + /// input text however they please. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Text { + get { return HasText ? (string) inputSource_ : ""; } + set { + inputSource_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + inputSourceCase_ = InputSourceOneofCase.Text; + } + } + /// Gets whether the "text" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasText { + get { return inputSourceCase_ == InputSourceOneofCase.Text; } + } + /// Clears the value of the oneof if it's currently set to "text" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearText() { + if (HasText) { + ClearInputSource(); + } + } + + private object inputSource_; + /// Enum of possible cases for the "input_source" oneof. + public enum InputSourceOneofCase { + None = 0, + Text = 1, + } + private InputSourceOneofCase inputSourceCase_ = InputSourceOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InputSourceOneofCase InputSourceCase { + get { return inputSourceCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearInputSource() { + inputSourceCase_ = InputSourceOneofCase.None; + inputSource_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StreamingSynthesisInput); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StreamingSynthesisInput other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Text != other.Text) return false; + if (InputSourceCase != other.InputSourceCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (HasText) hash ^= Text.GetHashCode(); + hash ^= (int) inputSourceCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (HasText) { + output.WriteRawTag(10); + output.WriteString(Text); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HasText) { + output.WriteRawTag(10); + output.WriteString(Text); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (HasText) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StreamingSynthesisInput other) { + if (other == null) { + return; + } + switch (other.InputSourceCase) { + case InputSourceOneofCase.Text: + Text = other.Text; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Text = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Text = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// Request message for the `StreamingSynthesize` method. Multiple + /// `StreamingSynthesizeRequest` messages are sent in one call. + /// The first message must contain a `streaming_config` that + /// fully specifies the request configuration and must not contain `input`. All + /// subsequent messages must only have `input` set. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StreamingSynthesizeRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StreamingSynthesizeRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeRequest(StreamingSynthesizeRequest other) : this() { + switch (other.StreamingRequestCase) { + case StreamingRequestOneofCase.StreamingConfig: + StreamingConfig = other.StreamingConfig.Clone(); + break; + case StreamingRequestOneofCase.Input: + Input = other.Input.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeRequest Clone() { + return new StreamingSynthesizeRequest(this); + } + + /// Field number for the "streaming_config" field. + public const int StreamingConfigFieldNumber = 1; + /// + /// StreamingSynthesizeConfig to be used in this streaming attempt. Only + /// specified in the first message sent in a `StreamingSynthesize` call. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig StreamingConfig { + get { return streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig ? (global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig) streamingRequest_ : null; } + set { + streamingRequest_ = value; + streamingRequestCase_ = value == null ? StreamingRequestOneofCase.None : StreamingRequestOneofCase.StreamingConfig; + } + } + + /// Field number for the "input" field. + public const int InputFieldNumber = 2; + /// + /// Input to synthesize. Specified in all messages but the first in a + /// `StreamingSynthesize` call. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput Input { + get { return streamingRequestCase_ == StreamingRequestOneofCase.Input ? (global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput) streamingRequest_ : null; } + set { + streamingRequest_ = value; + streamingRequestCase_ = value == null ? StreamingRequestOneofCase.None : StreamingRequestOneofCase.Input; + } + } + + private object streamingRequest_; + /// Enum of possible cases for the "streaming_request" oneof. + public enum StreamingRequestOneofCase { + None = 0, + StreamingConfig = 1, + Input = 2, + } + private StreamingRequestOneofCase streamingRequestCase_ = StreamingRequestOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingRequestOneofCase StreamingRequestCase { + get { return streamingRequestCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearStreamingRequest() { + streamingRequestCase_ = StreamingRequestOneofCase.None; + streamingRequest_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StreamingSynthesizeRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StreamingSynthesizeRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(StreamingConfig, other.StreamingConfig)) return false; + if (!object.Equals(Input, other.Input)) return false; + if (StreamingRequestCase != other.StreamingRequestCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig) hash ^= StreamingConfig.GetHashCode(); + if (streamingRequestCase_ == StreamingRequestOneofCase.Input) hash ^= Input.GetHashCode(); + hash ^= (int) streamingRequestCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig) { + output.WriteRawTag(10); + output.WriteMessage(StreamingConfig); + } + if (streamingRequestCase_ == StreamingRequestOneofCase.Input) { + output.WriteRawTag(18); + output.WriteMessage(Input); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig) { + output.WriteRawTag(10); + output.WriteMessage(StreamingConfig); + } + if (streamingRequestCase_ == StreamingRequestOneofCase.Input) { + output.WriteRawTag(18); + output.WriteMessage(Input); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StreamingConfig); + } + if (streamingRequestCase_ == StreamingRequestOneofCase.Input) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Input); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StreamingSynthesizeRequest other) { + if (other == null) { + return; + } + switch (other.StreamingRequestCase) { + case StreamingRequestOneofCase.StreamingConfig: + if (StreamingConfig == null) { + StreamingConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig(); + } + StreamingConfig.MergeFrom(other.StreamingConfig); + break; + case StreamingRequestOneofCase.Input: + if (Input == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput(); + } + Input.MergeFrom(other.Input); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig subBuilder = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig(); + if (streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig) { + subBuilder.MergeFrom(StreamingConfig); + } + input.ReadMessage(subBuilder); + StreamingConfig = subBuilder; + break; + } + case 18: { + global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput subBuilder = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput(); + if (streamingRequestCase_ == StreamingRequestOneofCase.Input) { + subBuilder.MergeFrom(Input); + } + input.ReadMessage(subBuilder); + Input = subBuilder; + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig subBuilder = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeConfig(); + if (streamingRequestCase_ == StreamingRequestOneofCase.StreamingConfig) { + subBuilder.MergeFrom(StreamingConfig); + } + input.ReadMessage(subBuilder); + StreamingConfig = subBuilder; + break; + } + case 18: { + global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput subBuilder = new global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesisInput(); + if (streamingRequestCase_ == StreamingRequestOneofCase.Input) { + subBuilder.MergeFrom(Input); + } + input.ReadMessage(subBuilder); + Input = subBuilder; + break; + } + } + } + } + #endif + + } + + /// + /// `StreamingSynthesizeResponse` is the only message returned to the + /// client by `StreamingSynthesize` method. A series of zero or more + /// `StreamingSynthesizeResponse` messages are streamed back to the client. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StreamingSynthesizeResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StreamingSynthesizeResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeResponse(StreamingSynthesizeResponse other) : this() { + audioContent_ = other.audioContent_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public StreamingSynthesizeResponse Clone() { + return new StreamingSynthesizeResponse(this); + } + + /// Field number for the "audio_content" field. + public const int AudioContentFieldNumber = 1; + private pb::ByteString audioContent_ = pb::ByteString.Empty; + /// + /// The audio data bytes encoded as specified in the request. This is + /// headerless LINEAR16 audio with a sample rate of 24000. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AudioContent { + get { return audioContent_; } + set { + audioContent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as StreamingSynthesizeResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(StreamingSynthesizeResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AudioContent != other.AudioContent) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AudioContent.Length != 0) hash ^= AudioContent.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AudioContent.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AudioContent); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AudioContent.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AudioContent); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (AudioContent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AudioContent); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(StreamingSynthesizeResponse other) { + if (other == null) { + return; + } + if (other.AudioContent.Length != 0) { + AudioContent = other.AudioContent; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + AudioContent = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AudioContent = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsGrpc.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsGrpc.g.cs new file mode 100755 index 000000000000..79a0c2d607e6 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsGrpc.g.cs @@ -0,0 +1,338 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/texttospeech/v1beta1/cloud_tts.proto +// +// Original file comments: +// Copyright 2024 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. +// +#pragma warning disable 0414, 1591, 8981, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.TextToSpeech.V1Beta1 { + /// + /// Service that implements Google Cloud Text-to-Speech API. + /// + public static partial class TextToSpeech + { + static readonly string __ServiceName = "google.cloud.texttospeech.v1beta1.TextToSpeech"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_ListVoicesRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_ListVoicesResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_SynthesizeSpeechRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_SynthesizeSpeechResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_StreamingSynthesizeRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_StreamingSynthesizeResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.StreamingSynthesizeResponse.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_ListVoices = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "ListVoices", + __Marshaller_google_cloud_texttospeech_v1beta1_ListVoicesRequest, + __Marshaller_google_cloud_texttospeech_v1beta1_ListVoicesResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_SynthesizeSpeech = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "SynthesizeSpeech", + __Marshaller_google_cloud_texttospeech_v1beta1_SynthesizeSpeechRequest, + __Marshaller_google_cloud_texttospeech_v1beta1_SynthesizeSpeechResponse); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_StreamingSynthesize = new grpc::Method( + grpc::MethodType.DuplexStreaming, + __ServiceName, + "StreamingSynthesize", + __Marshaller_google_cloud_texttospeech_v1beta1_StreamingSynthesizeRequest, + __Marshaller_google_cloud_texttospeech_v1beta1_StreamingSynthesizeResponse); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of TextToSpeech + [grpc::BindServiceMethod(typeof(TextToSpeech), "BindService")] + public abstract partial class TextToSpeechBase + { + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task ListVoices(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task SynthesizeSpeech(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + /// + /// Performs bidirectional streaming speech synthesis: receive audio while + /// sending text. + /// + /// Used for reading requests from the client. + /// Used for sending responses back to the client. + /// The context of the server-side call handler being invoked. + /// A task indicating completion of the handler. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task StreamingSynthesize(grpc::IAsyncStreamReader requestStream, grpc::IServerStreamWriter responseStream, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for TextToSpeech + public partial class TextToSpeechClient : grpc::ClientBase + { + /// Creates a new client for TextToSpeech + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public TextToSpeechClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for TextToSpeech that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public TextToSpeechClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected TextToSpeechClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected TextToSpeechClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse ListVoices(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListVoices(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesResponse ListVoices(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_ListVoices, null, options, request); + } + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListVoicesAsync(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return ListVoicesAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall ListVoicesAsync(global::Google.Cloud.TextToSpeech.V1Beta1.ListVoicesRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_ListVoices, null, options, request); + } + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse SynthesizeSpeech(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return SynthesizeSpeech(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechResponse SynthesizeSpeech(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_SynthesizeSpeech, null, options, request); + } + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall SynthesizeSpeechAsync(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return SynthesizeSpeechAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall SynthesizeSpeechAsync(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeSpeechRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_SynthesizeSpeech, null, options, request); + } + /// + /// Performs bidirectional streaming speech synthesis: receive audio while + /// sending text. + /// + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncDuplexStreamingCall StreamingSynthesize(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return StreamingSynthesize(new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Performs bidirectional streaming speech synthesis: receive audio while + /// sending text. + /// + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncDuplexStreamingCall StreamingSynthesize(grpc::CallOptions options) + { + return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingSynthesize, null, options); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override TextToSpeechClient NewInstance(ClientBaseConfiguration configuration) + { + return new TextToSpeechClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(TextToSpeechBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_ListVoices, serviceImpl.ListVoices) + .AddMethod(__Method_SynthesizeSpeech, serviceImpl.SynthesizeSpeech) + .AddMethod(__Method_StreamingSynthesize, serviceImpl.StreamingSynthesize).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, TextToSpeechBase serviceImpl) + { + serviceBinder.AddMethod(__Method_ListVoices, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.ListVoices)); + serviceBinder.AddMethod(__Method_SynthesizeSpeech, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.SynthesizeSpeech)); + serviceBinder.AddMethod(__Method_StreamingSynthesize, serviceImpl == null ? null : new grpc::DuplexStreamingServerMethod(serviceImpl.StreamingSynthesize)); + } + + } +} +#endregion diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrs.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrs.g.cs new file mode 100755 index 000000000000..4d14c337a50e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrs.g.cs @@ -0,0 +1,915 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Google.Cloud.TextToSpeech.V1Beta1 { + + /// Holder for reflection information generated from google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto + public static partial class CloudTtsLrsReflection { + + #region Descriptor + /// File descriptor for google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CloudTtsLrsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjVnb29nbGUvY2xvdWQvdGV4dHRvc3BlZWNoL3YxYmV0YTEvY2xvdWRfdHRz", + "X2xycy5wcm90bxIhZ29vZ2xlLmNsb3VkLnRleHR0b3NwZWVjaC52MWJldGEx", + "Ghxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3RvGhdnb29nbGUvYXBpL2Ns", + "aWVudC5wcm90bxofZ29vZ2xlL2FwaS9maWVsZF9iZWhhdmlvci5wcm90bxox", + "Z29vZ2xlL2Nsb3VkL3RleHR0b3NwZWVjaC92MWJldGExL2Nsb3VkX3R0cy5w", + "cm90bxojZ29vZ2xlL2xvbmdydW5uaW5nL29wZXJhdGlvbnMucHJvdG8aH2dv", + "b2dsZS9wcm90b2J1Zi90aW1lc3RhbXAucHJvdG8iqAIKGlN5bnRoZXNpemVM", + "b25nQXVkaW9SZXF1ZXN0Eg4KBnBhcmVudBgBIAEoCRJFCgVpbnB1dBgCIAEo", + "CzIxLmdvb2dsZS5jbG91ZC50ZXh0dG9zcGVlY2gudjFiZXRhMS5TeW50aGVz", + "aXNJbnB1dEID4EECEkkKDGF1ZGlvX2NvbmZpZxgDIAEoCzIuLmdvb2dsZS5j", + "bG91ZC50ZXh0dG9zcGVlY2gudjFiZXRhMS5BdWRpb0NvbmZpZ0ID4EECEhsK", + "Dm91dHB1dF9nY3NfdXJpGAQgASgJQgPgQQISSwoFdm9pY2UYBSABKAsyNy5n", + "b29nbGUuY2xvdWQudGV4dHRvc3BlZWNoLnYxYmV0YTEuVm9pY2VTZWxlY3Rp", + "b25QYXJhbXNCA+BBAiIdChtTeW50aGVzaXplTG9uZ0F1ZGlvUmVzcG9uc2Ui", + "pAEKG1N5bnRoZXNpemVMb25nQXVkaW9NZXRhZGF0YRIuCgpzdGFydF90aW1l", + "GAEgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBI4ChBsYXN0X3Vw", + "ZGF0ZV90aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEIC", + "GAESGwoTcHJvZ3Jlc3NfcGVyY2VudGFnZRgDIAEoATKzAwofVGV4dFRvU3Bl", + "ZWNoTG9uZ0F1ZGlvU3ludGhlc2l6ZRK+AgoTU3ludGhlc2l6ZUxvbmdBdWRp", + "bxI9Lmdvb2dsZS5jbG91ZC50ZXh0dG9zcGVlY2gudjFiZXRhMS5TeW50aGVz", + "aXplTG9uZ0F1ZGlvUmVxdWVzdBodLmdvb2dsZS5sb25ncnVubmluZy5PcGVy", + "YXRpb24iyAHKQX4KPWdvb2dsZS5jbG91ZC50ZXh0dG9zcGVlY2gudjFiZXRh", + "MS5TeW50aGVzaXplTG9uZ0F1ZGlvUmVzcG9uc2USPWdvb2dsZS5jbG91ZC50", + "ZXh0dG9zcGVlY2gudjFiZXRhMS5TeW50aGVzaXplTG9uZ0F1ZGlvTWV0YWRh", + "dGGC0+STAkEiPC92MWJldGExL3twYXJlbnQ9cHJvamVjdHMvKi9sb2NhdGlv", + "bnMvKn06c3ludGhlc2l6ZUxvbmdBdWRpbzoBKhpPykEbdGV4dHRvc3BlZWNo", + "Lmdvb2dsZWFwaXMuY29t0kEuaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20v", + "YXV0aC9jbG91ZC1wbGF0Zm9ybUKIAgolY29tLmdvb2dsZS5jbG91ZC50ZXh0", + "dG9zcGVlY2gudjFiZXRhMUIjVGV4dFRvU3BlZWNoTG9uZ0F1ZGlvU3ludGhl", + "c2lzUHJvdG9QAVpJY2xvdWQuZ29vZ2xlLmNvbS9nby90ZXh0dG9zcGVlY2gv", + "YXBpdjFiZXRhMS90ZXh0dG9zcGVlY2hwYjt0ZXh0dG9zcGVlY2hwYqoCIUdv", + "b2dsZS5DbG91ZC5UZXh0VG9TcGVlY2guVjFCZXRhMcoCIUdvb2dsZVxDbG91", + "ZFxUZXh0VG9TcGVlY2hcVjFiZXRhMeoCJEdvb2dsZTo6Q2xvdWQ6OlRleHRU", + "b1NwZWVjaDo6VjFiZXRhMWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Api.ClientReflection.Descriptor, global::Google.Api.FieldBehaviorReflection.Descriptor, global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsReflection.Descriptor, global::Google.LongRunning.OperationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest), global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest.Parser, new[]{ "Parent", "Input", "AudioConfig", "OutputGcsUri", "Voice" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioResponse), global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioResponse.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioMetadata), global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioMetadata.Parser, new[]{ "StartTime", "LastUpdateTime", "ProgressPercentage" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// The top-level message sent by the client for the + /// `SynthesizeLongAudio` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SynthesizeLongAudioRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SynthesizeLongAudioRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsLrsReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioRequest(SynthesizeLongAudioRequest other) : this() { + parent_ = other.parent_; + input_ = other.input_ != null ? other.input_.Clone() : null; + audioConfig_ = other.audioConfig_ != null ? other.audioConfig_.Clone() : null; + outputGcsUri_ = other.outputGcsUri_; + voice_ = other.voice_ != null ? other.voice_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioRequest Clone() { + return new SynthesizeLongAudioRequest(this); + } + + /// Field number for the "parent" field. + public const int ParentFieldNumber = 1; + private string parent_ = ""; + /// + /// The resource states of the request in the form of + /// `projects/*/locations/*`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parent { + get { return parent_; } + set { + parent_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "input" field. + public const int InputFieldNumber = 2; + private global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput input_; + /// + /// Required. The Synthesizer requires either plain text or SSML as input. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput Input { + get { return input_; } + set { + input_ = value; + } + } + + /// Field number for the "audio_config" field. + public const int AudioConfigFieldNumber = 3; + private global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig audioConfig_; + /// + /// Required. The configuration of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig AudioConfig { + get { return audioConfig_; } + set { + audioConfig_ = value; + } + } + + /// Field number for the "output_gcs_uri" field. + public const int OutputGcsUriFieldNumber = 4; + private string outputGcsUri_ = ""; + /// + /// Required. Specifies a Cloud Storage URI for the synthesis results. Must be + /// specified in the format: `gs://bucket_name/object_name`, and the bucket + /// must already exist. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string OutputGcsUri { + get { return outputGcsUri_; } + set { + outputGcsUri_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "voice" field. + public const int VoiceFieldNumber = 5; + private global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams voice_; + /// + /// Required. The desired voice of the synthesized audio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams Voice { + get { return voice_; } + set { + voice_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SynthesizeLongAudioRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SynthesizeLongAudioRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Parent != other.Parent) return false; + if (!object.Equals(Input, other.Input)) return false; + if (!object.Equals(AudioConfig, other.AudioConfig)) return false; + if (OutputGcsUri != other.OutputGcsUri) return false; + if (!object.Equals(Voice, other.Voice)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Parent.Length != 0) hash ^= Parent.GetHashCode(); + if (input_ != null) hash ^= Input.GetHashCode(); + if (audioConfig_ != null) hash ^= AudioConfig.GetHashCode(); + if (OutputGcsUri.Length != 0) hash ^= OutputGcsUri.GetHashCode(); + if (voice_ != null) hash ^= Voice.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (input_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Input); + } + if (audioConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AudioConfig); + } + if (OutputGcsUri.Length != 0) { + output.WriteRawTag(34); + output.WriteString(OutputGcsUri); + } + if (voice_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Voice); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Parent.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Parent); + } + if (input_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Input); + } + if (audioConfig_ != null) { + output.WriteRawTag(26); + output.WriteMessage(AudioConfig); + } + if (OutputGcsUri.Length != 0) { + output.WriteRawTag(34); + output.WriteString(OutputGcsUri); + } + if (voice_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Voice); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Parent.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parent); + } + if (input_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Input); + } + if (audioConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AudioConfig); + } + if (OutputGcsUri.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(OutputGcsUri); + } + if (voice_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Voice); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SynthesizeLongAudioRequest other) { + if (other == null) { + return; + } + if (other.Parent.Length != 0) { + Parent = other.Parent; + } + if (other.input_ != null) { + if (input_ == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput(); + } + Input.MergeFrom(other.Input); + } + if (other.audioConfig_ != null) { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + AudioConfig.MergeFrom(other.AudioConfig); + } + if (other.OutputGcsUri.Length != 0) { + OutputGcsUri = other.OutputGcsUri; + } + if (other.voice_ != null) { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + Voice.MergeFrom(other.Voice); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + if (input_ == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput(); + } + input.ReadMessage(Input); + break; + } + case 26: { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + input.ReadMessage(AudioConfig); + break; + } + case 34: { + OutputGcsUri = input.ReadString(); + break; + } + case 42: { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + input.ReadMessage(Voice); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Parent = input.ReadString(); + break; + } + case 18: { + if (input_ == null) { + Input = new global::Google.Cloud.TextToSpeech.V1Beta1.SynthesisInput(); + } + input.ReadMessage(Input); + break; + } + case 26: { + if (audioConfig_ == null) { + AudioConfig = new global::Google.Cloud.TextToSpeech.V1Beta1.AudioConfig(); + } + input.ReadMessage(AudioConfig); + break; + } + case 34: { + OutputGcsUri = input.ReadString(); + break; + } + case 42: { + if (voice_ == null) { + Voice = new global::Google.Cloud.TextToSpeech.V1Beta1.VoiceSelectionParams(); + } + input.ReadMessage(Voice); + break; + } + } + } + } + #endif + + } + + /// + /// The message returned to the client by the `SynthesizeLongAudio` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SynthesizeLongAudioResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SynthesizeLongAudioResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsLrsReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioResponse(SynthesizeLongAudioResponse other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioResponse Clone() { + return new SynthesizeLongAudioResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SynthesizeLongAudioResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SynthesizeLongAudioResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SynthesizeLongAudioResponse other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + /// + /// Metadata for response returned by the `SynthesizeLongAudio` method. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SynthesizeLongAudioMetadata : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SynthesizeLongAudioMetadata()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsLrsReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioMetadata() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioMetadata(SynthesizeLongAudioMetadata other) : this() { + startTime_ = other.startTime_ != null ? other.startTime_.Clone() : null; + lastUpdateTime_ = other.lastUpdateTime_ != null ? other.lastUpdateTime_.Clone() : null; + progressPercentage_ = other.progressPercentage_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SynthesizeLongAudioMetadata Clone() { + return new SynthesizeLongAudioMetadata(this); + } + + /// Field number for the "start_time" field. + public const int StartTimeFieldNumber = 1; + private global::Google.Protobuf.WellKnownTypes.Timestamp startTime_; + /// + /// Time when the request was received. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp StartTime { + get { return startTime_; } + set { + startTime_ = value; + } + } + + /// Field number for the "last_update_time" field. + public const int LastUpdateTimeFieldNumber = 2; + private global::Google.Protobuf.WellKnownTypes.Timestamp lastUpdateTime_; + /// + /// Deprecated. Do not use. + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Google.Protobuf.WellKnownTypes.Timestamp LastUpdateTime { + get { return lastUpdateTime_; } + set { + lastUpdateTime_ = value; + } + } + + /// Field number for the "progress_percentage" field. + public const int ProgressPercentageFieldNumber = 3; + private double progressPercentage_; + /// + /// The progress of the most recent processing update in percentage, ie. 70.0%. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double ProgressPercentage { + get { return progressPercentage_; } + set { + progressPercentage_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SynthesizeLongAudioMetadata); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SynthesizeLongAudioMetadata other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(StartTime, other.StartTime)) return false; + if (!object.Equals(LastUpdateTime, other.LastUpdateTime)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(ProgressPercentage, other.ProgressPercentage)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (startTime_ != null) hash ^= StartTime.GetHashCode(); + if (lastUpdateTime_ != null) hash ^= LastUpdateTime.GetHashCode(); + if (ProgressPercentage != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ProgressPercentage); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (startTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(StartTime); + } + if (lastUpdateTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(LastUpdateTime); + } + if (ProgressPercentage != 0D) { + output.WriteRawTag(25); + output.WriteDouble(ProgressPercentage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (startTime_ != null) { + output.WriteRawTag(10); + output.WriteMessage(StartTime); + } + if (lastUpdateTime_ != null) { + output.WriteRawTag(18); + output.WriteMessage(LastUpdateTime); + } + if (ProgressPercentage != 0D) { + output.WriteRawTag(25); + output.WriteDouble(ProgressPercentage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (startTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(StartTime); + } + if (lastUpdateTime_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastUpdateTime); + } + if (ProgressPercentage != 0D) { + size += 1 + 8; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SynthesizeLongAudioMetadata other) { + if (other == null) { + return; + } + if (other.startTime_ != null) { + if (startTime_ == null) { + StartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + StartTime.MergeFrom(other.StartTime); + } + if (other.lastUpdateTime_ != null) { + if (lastUpdateTime_ == null) { + LastUpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + LastUpdateTime.MergeFrom(other.LastUpdateTime); + } + if (other.ProgressPercentage != 0D) { + ProgressPercentage = other.ProgressPercentage; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (startTime_ == null) { + StartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(StartTime); + break; + } + case 18: { + if (lastUpdateTime_ == null) { + LastUpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(LastUpdateTime); + break; + } + case 25: { + ProgressPercentage = input.ReadDouble(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (startTime_ == null) { + StartTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(StartTime); + break; + } + case 18: { + if (lastUpdateTime_ == null) { + LastUpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); + } + input.ReadMessage(LastUpdateTime); + break; + } + case 25: { + ProgressPercentage = input.ReadDouble(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrsGrpc.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrsGrpc.g.cs new file mode 100755 index 000000000000..c09bcdab8195 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsLrsGrpc.g.cs @@ -0,0 +1,207 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/texttospeech/v1beta1/cloud_tts_lrs.proto +// +// Original file comments: +// Copyright 2024 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. +// +#pragma warning disable 0414, 1591, 8981, 0612 +#region Designer generated code + +using grpc = global::Grpc.Core; + +namespace Google.Cloud.TextToSpeech.V1Beta1 { + /// + /// Service that implements Google Cloud Text-to-Speech API. + /// + public static partial class TextToSpeechLongAudioSynthesize + { + static readonly string __ServiceName = "google.cloud.texttospeech.v1beta1.TextToSpeechLongAudioSynthesize"; + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context) + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (message is global::Google.Protobuf.IBufferMessage) + { + context.SetPayloadLength(message.CalculateSize()); + global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter()); + context.Complete(); + return; + } + #endif + context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static class __Helper_MessageCache + { + public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T)); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static T __Helper_DeserializeMessage(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser parser) where T : global::Google.Protobuf.IMessage + { + #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION + if (__Helper_MessageCache.IsBufferMessage) + { + return parser.ParseFrom(context.PayloadAsReadOnlySequence()); + } + #endif + return parser.ParseFrom(context.PayloadAsNewBuffer()); + } + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_cloud_texttospeech_v1beta1_SynthesizeLongAudioRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest.Parser)); + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Marshaller __Marshaller_google_longrunning_Operation = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Google.LongRunning.Operation.Parser)); + + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + static readonly grpc::Method __Method_SynthesizeLongAudio = new grpc::Method( + grpc::MethodType.Unary, + __ServiceName, + "SynthesizeLongAudio", + __Marshaller_google_cloud_texttospeech_v1beta1_SynthesizeLongAudioRequest, + __Marshaller_google_longrunning_Operation); + + /// Service descriptor + public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor + { + get { return global::Google.Cloud.TextToSpeech.V1Beta1.CloudTtsLrsReflection.Descriptor.Services[0]; } + } + + /// Base class for server-side implementations of TextToSpeechLongAudioSynthesize + [grpc::BindServiceMethod(typeof(TextToSpeechLongAudioSynthesize), "BindService")] + public abstract partial class TextToSpeechLongAudioSynthesizeBase + { + /// + /// Synthesizes long form text asynchronously. + /// + /// The request received from the client. + /// The context of the server-side call handler being invoked. + /// The response to send back to the client (wrapped by a task). + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::System.Threading.Tasks.Task SynthesizeLongAudio(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest request, grpc::ServerCallContext context) + { + throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); + } + + } + + /// Client for TextToSpeechLongAudioSynthesize + public partial class TextToSpeechLongAudioSynthesizeClient : grpc::ClientBase + { + /// Creates a new client for TextToSpeechLongAudioSynthesize + /// The channel to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public TextToSpeechLongAudioSynthesizeClient(grpc::ChannelBase channel) : base(channel) + { + } + /// Creates a new client for TextToSpeechLongAudioSynthesize that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public TextToSpeechLongAudioSynthesizeClient(grpc::CallInvoker callInvoker) : base(callInvoker) + { + } + /// Protected parameterless constructor to allow creation of test doubles. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected TextToSpeechLongAudioSynthesizeClient() : base() + { + } + /// Protected constructor to allow creation of configured clients. + /// The client configuration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected TextToSpeechLongAudioSynthesizeClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Synthesizes long form text asynchronously. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation SynthesizeLongAudio(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return SynthesizeLongAudio(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Synthesizes long form text asynchronously. + /// + /// The request to send to the server. + /// The options for the call. + /// The response received from the server. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual global::Google.LongRunning.Operation SynthesizeLongAudio(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest request, grpc::CallOptions options) + { + return CallInvoker.BlockingUnaryCall(__Method_SynthesizeLongAudio, null, options, request); + } + /// + /// Synthesizes long form text asynchronously. + /// + /// The request to send to the server. + /// The initial metadata to send with the call. This parameter is optional. + /// An optional deadline for the call. The call will be cancelled if deadline is hit. + /// An optional token for canceling the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall SynthesizeLongAudioAsync(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + return SynthesizeLongAudioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Synthesizes long form text asynchronously. + /// + /// The request to send to the server. + /// The options for the call. + /// The call object. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public virtual grpc::AsyncUnaryCall SynthesizeLongAudioAsync(global::Google.Cloud.TextToSpeech.V1Beta1.SynthesizeLongAudioRequest request, grpc::CallOptions options) + { + return CallInvoker.AsyncUnaryCall(__Method_SynthesizeLongAudio, null, options, request); + } + /// Creates a new instance of client from given ClientBaseConfiguration. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + protected override TextToSpeechLongAudioSynthesizeClient NewInstance(ClientBaseConfiguration configuration) + { + return new TextToSpeechLongAudioSynthesizeClient(configuration); + } + } + + /// Creates service definition that can be registered with a server + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static grpc::ServerServiceDefinition BindService(TextToSpeechLongAudioSynthesizeBase serviceImpl) + { + return grpc::ServerServiceDefinition.CreateBuilder() + .AddMethod(__Method_SynthesizeLongAudio, serviceImpl.SynthesizeLongAudio).Build(); + } + + /// Register service method with a service binder with or without implementation. Useful when customizing the service binding logic. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Service methods will be bound by calling AddMethod on this object. + /// An object implementing the server-side handling logic. + [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] + public static void BindService(grpc::ServiceBinderBase serviceBinder, TextToSpeechLongAudioSynthesizeBase serviceImpl) + { + serviceBinder.AddMethod(__Method_SynthesizeLongAudio, serviceImpl == null ? null : new grpc::UnaryServerMethod(serviceImpl.SynthesizeLongAudio)); + } + + } +} +#endregion diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsResourceNames.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsResourceNames.g.cs new file mode 100755 index 000000000000..3077013a354e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/CloudTtsResourceNames.g.cs @@ -0,0 +1,273 @@ +// Copyright 2024 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 +// +// https://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! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using sys = System; + +namespace Google.Cloud.TextToSpeech.V1Beta1 +{ + /// Resource name for the Model resource. + public sealed partial class ModelName : gax::IResourceName, sys::IEquatable + { + /// The possible contents of . + public enum ResourceNameType + { + /// An unparsed resource name. + Unparsed = 0, + + /// + /// A resource name with pattern projects/{project}/locations/{location}/models/{model}. + /// + ProjectLocationModel = 1, + } + + private static gax::PathTemplate s_projectLocationModel = new gax::PathTemplate("projects/{project}/locations/{location}/models/{model}"); + + /// Creates a containing an unparsed resource name. + /// The unparsed resource name. Must not be null. + /// + /// A new instance of containing the provided . + /// + public static ModelName FromUnparsed(gax::UnparsedResourceName unparsedResourceName) => + new ModelName(ResourceNameType.Unparsed, gax::GaxPreconditions.CheckNotNull(unparsedResourceName, nameof(unparsedResourceName))); + + /// + /// Creates a with the pattern projects/{project}/locations/{location}/models/{model} + /// . + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + /// A new instance of constructed from the provided ids. + public static ModelName FromProjectLocationModel(string projectId, string locationId, string modelId) => + new ModelName(ResourceNameType.ProjectLocationModel, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), modelId: gax::GaxPreconditions.CheckNotNullOrEmpty(modelId, nameof(modelId))); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/models/{model}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/models/{model}. + /// + public static string Format(string projectId, string locationId, string modelId) => + FormatProjectLocationModel(projectId, locationId, modelId); + + /// + /// Formats the IDs into the string representation of this with pattern + /// projects/{project}/locations/{location}/models/{model}. + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + /// + /// The string representation of this with pattern + /// projects/{project}/locations/{location}/models/{model}. + /// + public static string FormatProjectLocationModel(string projectId, string locationId, string modelId) => + s_projectLocationModel.Expand(gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), gax::GaxPreconditions.CheckNotNullOrEmpty(modelId, nameof(modelId))); + + /// Parses the given resource name string into a new instance. + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/models/{model} + /// + /// + /// The resource name in string form. Must not be null. + /// The parsed if successful. + public static ModelName Parse(string modelName) => Parse(modelName, false); + + /// + /// Parses the given resource name string into a new instance; optionally allowing an + /// unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/models/{model} + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// The parsed if successful. + public static ModelName Parse(string modelName, bool allowUnparsed) => + TryParse(modelName, allowUnparsed, out ModelName result) ? result : throw new sys::ArgumentException("The given resource-name matches no pattern."); + + /// + /// Tries to parse the given resource name string into a new instance. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/models/{model} + /// + /// + /// The resource name in string form. Must not be null. + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string modelName, out ModelName result) => TryParse(modelName, false, out result); + + /// + /// Tries to parse the given resource name string into a new instance; optionally + /// allowing an unparseable resource name. + /// + /// + /// To parse successfully, the resource name must be formatted as one of the following: + /// + /// projects/{project}/locations/{location}/models/{model} + /// + /// Or may be in any format if is true. + /// + /// The resource name in string form. Must not be null. + /// + /// If true will successfully store an unparseable resource name into the + /// property; otherwise will throw an if an unparseable resource name is + /// specified. + /// + /// + /// When this method returns, the parsed , or null if parsing failed. + /// + /// true if the name was parsed successfully; false otherwise. + public static bool TryParse(string modelName, bool allowUnparsed, out ModelName result) + { + gax::GaxPreconditions.CheckNotNull(modelName, nameof(modelName)); + gax::TemplatedResourceName resourceName; + if (s_projectLocationModel.TryParseName(modelName, out resourceName)) + { + result = FromProjectLocationModel(resourceName[0], resourceName[1], resourceName[2]); + return true; + } + if (allowUnparsed) + { + if (gax::UnparsedResourceName.TryParse(modelName, out gax::UnparsedResourceName unparsedResourceName)) + { + result = FromUnparsed(unparsedResourceName); + return true; + } + } + result = null; + return false; + } + + private ModelName(ResourceNameType type, gax::UnparsedResourceName unparsedResourceName = null, string locationId = null, string modelId = null, string projectId = null) + { + Type = type; + UnparsedResource = unparsedResourceName; + LocationId = locationId; + ModelId = modelId; + ProjectId = projectId; + } + + /// + /// Constructs a new instance of a class from the component parts of pattern + /// projects/{project}/locations/{location}/models/{model} + /// + /// The Project ID. Must not be null or empty. + /// The Location ID. Must not be null or empty. + /// The Model ID. Must not be null or empty. + public ModelName(string projectId, string locationId, string modelId) : this(ResourceNameType.ProjectLocationModel, projectId: gax::GaxPreconditions.CheckNotNullOrEmpty(projectId, nameof(projectId)), locationId: gax::GaxPreconditions.CheckNotNullOrEmpty(locationId, nameof(locationId)), modelId: gax::GaxPreconditions.CheckNotNullOrEmpty(modelId, nameof(modelId))) + { + } + + /// The of the contained resource name. + public ResourceNameType Type { get; } + + /// + /// The contained . Only non-null if this instance contains an + /// unparsed resource name. + /// + public gax::UnparsedResourceName UnparsedResource { get; } + + /// + /// The Location ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string LocationId { get; } + + /// + /// The Model ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ModelId { get; } + + /// + /// The Project ID. Will not be null, unless this instance contains an unparsed resource name. + /// + public string ProjectId { get; } + + /// Whether this instance contains a resource name with a known pattern. + public bool IsKnownPattern => Type != ResourceNameType.Unparsed; + + /// The string representation of the resource name. + /// The string representation of the resource name. + public override string ToString() + { + switch (Type) + { + case ResourceNameType.Unparsed: return UnparsedResource.ToString(); + case ResourceNameType.ProjectLocationModel: return s_projectLocationModel.Expand(ProjectId, LocationId, ModelId); + default: throw new sys::InvalidOperationException("Unrecognized resource-type."); + } + } + + /// Returns a hash code for this resource name. + public override int GetHashCode() => ToString().GetHashCode(); + + /// + public override bool Equals(object obj) => Equals(obj as ModelName); + + /// + public bool Equals(ModelName other) => ToString() == other?.ToString(); + + /// Determines whether two specified resource names have the same value. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is the same as the value of ; otherwise, + /// false. + /// + public static bool operator ==(ModelName a, ModelName b) => ReferenceEquals(a, b) || (a?.Equals(b) ?? false); + + /// Determines whether two specified resource names have different values. + /// The first resource name to compare, or null. + /// The second resource name to compare, or null. + /// + /// true if the value of is different from the value of ; otherwise, + /// false. + /// + public static bool operator !=(ModelName a, ModelName b) => !(a == b); + } + + public partial class CustomVoiceParams + { + /// -typed view over the resource name property. + public ModelName ModelAsModelName + { + get => string.IsNullOrEmpty(Model) ? null : ModelName.Parse(Model, allowUnparsed: true); + set => Model = value?.ToString() ?? ""; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.csproj b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.csproj new file mode 100755 index 000000000000..f241d3f3928b --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1.csproj @@ -0,0 +1,48 @@ + + + + + + 1.0.0-alpha01 + + + + + + + + + netstandard2.0;net462 + latest + true + true + true + + + + + + + + + + + \ No newline at end of file diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/PackageApiMetadata.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/PackageApiMetadata.g.cs new file mode 100755 index 000000000000..d98dd58d85b5 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/PackageApiMetadata.g.cs @@ -0,0 +1,53 @@ +// Copyright 2024 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 +// +// https://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! + +#pragma warning disable CS8981 +using gaxgrpc = Google.Api.Gax.Grpc; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; + +namespace Google.Cloud.TextToSpeech.V1Beta1 +{ + /// Static class to provide common access to package-wide API metadata. + internal static class PackageApiMetadata + { + /// The for services in this package. + internal static gaxgrpc::ApiMetadata ApiMetadata { get; } = new gaxgrpc::ApiMetadata("Google.Cloud.TextToSpeech.V1Beta1", GetFileDescriptors) + .WithRequestNumericEnumJsonEncoding(true) + .WithHttpRuleOverrides(new scg::Dictionary + { + { + "google.longrunning.Operations.GetOperation", + // { "get": "/v1beta1/{name=projects/*/locations/*/operations/*}" } + proto::ByteString.FromBase64("EjMvdjFiZXRhMS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qL29wZXJhdGlvbnMvKn0=") + }, + { + "google.longrunning.Operations.ListOperations", + // { "get": "/v1beta1/{name=projects/*/locations/*}/operations" } + proto::ByteString.FromBase64("EjEvdjFiZXRhMS97bmFtZT1wcm9qZWN0cy8qL2xvY2F0aW9ucy8qfS9vcGVyYXRpb25z") + }, + }); + + private static scg::IEnumerable GetFileDescriptors() + { + yield return CloudTtsReflection.Descriptor; + yield return CloudTtsLrsReflection.Descriptor; + yield return lro::OperationsReflection.Descriptor; + } + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/ServiceCollectionExtensions.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/ServiceCollectionExtensions.g.cs new file mode 100755 index 000000000000..6282198b3153 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/ServiceCollectionExtensions.g.cs @@ -0,0 +1,99 @@ +// Copyright 2024 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 +// +// https://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! + +#pragma warning disable CS8981 +using gaxgrpc = Google.Api.Gax.Grpc; +using gctv = Google.Cloud.TextToSpeech.V1Beta1; +using gpr = Google.Protobuf.Reflection; +using lro = Google.LongRunning; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sys = System; + +namespace Microsoft.Extensions.DependencyInjection +{ + /// Static class to provide extension methods to configure API clients. + public static partial class ServiceCollectionExtensions + { + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddTextToSpeechClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gctv::TextToSpeechClientBuilder builder = new gctv::TextToSpeechClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + + /// Adds a singleton to . + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddTextToSpeechClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gctv::TextToSpeechClientBuilder builder = new gctv::TextToSpeechClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + + /// + /// Adds a singleton to . + /// + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddTextToSpeechLongAudioSynthesizeClient(this IServiceCollection services, sys::Action action = null) => + services.AddSingleton(provider => + { + gctv::TextToSpeechLongAudioSynthesizeClientBuilder builder = new gctv::TextToSpeechLongAudioSynthesizeClientBuilder(); + action?.Invoke(builder); + return builder.Build(provider); + }); + + /// + /// Adds a singleton to . + /// + /// + /// The service collection to add the client to. The services are used to configure the client when requested. + /// + /// + /// An optional action to invoke on the client builder. This is invoked before services from + /// are used. + /// + public static IServiceCollection AddTextToSpeechLongAudioSynthesizeClient(this IServiceCollection services, sys::Action action) => + services.AddSingleton(provider => + { + gctv::TextToSpeechLongAudioSynthesizeClientBuilder builder = new gctv::TextToSpeechLongAudioSynthesizeClientBuilder(); + action?.Invoke(provider, builder); + return builder.Build(provider); + }); + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechClient.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechClient.g.cs new file mode 100755 index 000000000000..4f9e41f63d67 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechClient.g.cs @@ -0,0 +1,625 @@ +// Copyright 2024 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 +// +// https://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! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; + +namespace Google.Cloud.TextToSpeech.V1Beta1 +{ + /// Settings for instances. + public sealed partial class TextToSpeechSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static TextToSpeechSettings GetDefault() => new TextToSpeechSettings(); + + /// Constructs a new object with default settings. + public TextToSpeechSettings() + { + } + + private TextToSpeechSettings(TextToSpeechSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + ListVoicesSettings = existing.ListVoicesSettings; + SynthesizeSpeechSettings = existing.SynthesizeSpeechSettings; + StreamingSynthesizeSettings = existing.StreamingSynthesizeSettings; + StreamingSynthesizeStreamingSettings = existing.StreamingSynthesizeStreamingSettings; + OnCopy(existing); + } + + partial void OnCopy(TextToSpeechSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// TextToSpeechClient.ListVoices and TextToSpeechClient.ListVoicesAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 300 seconds. + /// + /// + public gaxgrpc::CallSettings ListVoicesSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(300000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// TextToSpeechClient.SynthesizeSpeech and TextToSpeechClient.SynthesizeSpeechAsync. + /// + /// + /// + /// Initial retry delay: 100 milliseconds. + /// Retry delay multiplier: 1.3 + /// Retry maximum delay: 60000 milliseconds. + /// Maximum attempts: Unlimited + /// + /// + /// Retriable status codes: , + /// . + /// + /// + /// Timeout: 300 seconds. + /// + /// + public gaxgrpc::CallSettings SynthesizeSpeechSettings { get; set; } = gaxgrpc::CallSettingsExtensions.WithRetry(gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(300000))), gaxgrpc::RetrySettings.FromExponentialBackoff(maxAttempts: 2147483647, initialBackoff: sys::TimeSpan.FromMilliseconds(100), maxBackoff: sys::TimeSpan.FromMilliseconds(60000), backoffMultiplier: 1.3, retryFilter: gaxgrpc::RetrySettings.FilterForStatusCodes(grpccore::StatusCode.Unavailable, grpccore::StatusCode.DeadlineExceeded))); + + /// + /// for synchronous and asynchronous calls to + /// TextToSpeechClient.StreamingSynthesize and TextToSpeechClient.StreamingSynthesizeAsync. + /// + /// Timeout: 300 seconds. + public gaxgrpc::CallSettings StreamingSynthesizeSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(300000))); + + /// + /// for calls to TextToSpeechClient.StreamingSynthesize + /// and TextToSpeechClient.StreamingSynthesizeAsync. + /// + /// The default local send queue size is 100. + public gaxgrpc::BidirectionalStreamingSettings StreamingSynthesizeStreamingSettings { get; set; } = new gaxgrpc::BidirectionalStreamingSettings(100); + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public TextToSpeechSettings Clone() => new TextToSpeechSettings(this); + } + + /// + /// Builder class for to provide simple configuration of credentials, endpoint etc. + /// + public sealed partial class TextToSpeechClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public TextToSpeechSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public TextToSpeechClientBuilder() : base(TextToSpeechClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref TextToSpeechClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override TextToSpeechClient Build() + { + TextToSpeechClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private TextToSpeechClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return TextToSpeechClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return TextToSpeechClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => TextToSpeechClient.ChannelPool; + } + + /// TextToSpeech client wrapper, for convenient use. + /// + /// Service that implements Google Cloud Text-to-Speech API. + /// + public abstract partial class TextToSpeechClient + { + /// + /// The default endpoint for the TextToSpeech service, which is a host of "texttospeech.googleapis.com" and a + /// port of 443. + /// + public static string DefaultEndpoint { get; } = "texttospeech.googleapis.com:443"; + + /// The default TextToSpeech scopes. + /// + /// The default TextToSpeech scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(TextToSpeech.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new TextToSpeechClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, endpoint and + /// settings. To specify custom credentials or other settings, use . + /// + /// The created . + public static TextToSpeechClient Create() => new TextToSpeechClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for remote operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static TextToSpeechClient Create(grpccore::CallInvoker callInvoker, TextToSpeechSettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + TextToSpeech.TextToSpeechClient grpcClient = new TextToSpeech.TextToSpeechClient(callInvoker); + return new TextToSpeechClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC TextToSpeech client + public virtual TextToSpeech.TextToSpeechClient GrpcClient => throw new sys::NotImplementedException(); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ListVoicesResponse ListVoices(ListVoicesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ListVoicesAsync(ListVoicesRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ListVoicesAsync(ListVoicesRequest request, st::CancellationToken cancellationToken) => + ListVoicesAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// + /// Optional. Recommended. + /// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + /// If not specified, the API will return all supported voices. + /// If specified, the ListVoices call will only return voices that can be used + /// to synthesize this language_code. For example, if you specify `"en-NZ"`, + /// all `"en-NZ"` voices will be returned. If you specify `"no"`, both + /// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + /// returned. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual ListVoicesResponse ListVoices(string languageCode, gaxgrpc::CallSettings callSettings = null) => + ListVoices(new ListVoicesRequest + { + LanguageCode = languageCode ?? "", + }, callSettings); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// + /// Optional. Recommended. + /// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + /// If not specified, the API will return all supported voices. + /// If specified, the ListVoices call will only return voices that can be used + /// to synthesize this language_code. For example, if you specify `"en-NZ"`, + /// all `"en-NZ"` voices will be returned. If you specify `"no"`, both + /// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + /// returned. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task ListVoicesAsync(string languageCode, gaxgrpc::CallSettings callSettings = null) => + ListVoicesAsync(new ListVoicesRequest + { + LanguageCode = languageCode ?? "", + }, callSettings); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// + /// Optional. Recommended. + /// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. + /// If not specified, the API will return all supported voices. + /// If specified, the ListVoices call will only return voices that can be used + /// to synthesize this language_code. For example, if you specify `"en-NZ"`, + /// all `"en-NZ"` voices will be returned. If you specify `"no"`, both + /// `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be + /// returned. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task ListVoicesAsync(string languageCode, st::CancellationToken cancellationToken) => + ListVoicesAsync(languageCode, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual SynthesizeSpeechResponse SynthesizeSpeech(SynthesizeSpeechRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task SynthesizeSpeechAsync(SynthesizeSpeechRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task SynthesizeSpeechAsync(SynthesizeSpeechRequest request, st::CancellationToken cancellationToken) => + SynthesizeSpeechAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// + /// Required. The Synthesizer requires either plain text or SSML as input. + /// + /// + /// Required. The desired voice of the synthesized audio. + /// + /// + /// Required. The configuration of the synthesized audio. + /// + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual SynthesizeSpeechResponse SynthesizeSpeech(SynthesisInput input, VoiceSelectionParams voice, AudioConfig audioConfig, gaxgrpc::CallSettings callSettings = null) => + SynthesizeSpeech(new SynthesizeSpeechRequest + { + Input = gax::GaxPreconditions.CheckNotNull(input, nameof(input)), + Voice = gax::GaxPreconditions.CheckNotNull(voice, nameof(voice)), + AudioConfig = gax::GaxPreconditions.CheckNotNull(audioConfig, nameof(audioConfig)), + }, callSettings); + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// + /// Required. The Synthesizer requires either plain text or SSML as input. + /// + /// + /// Required. The desired voice of the synthesized audio. + /// + /// + /// Required. The configuration of the synthesized audio. + /// + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task SynthesizeSpeechAsync(SynthesisInput input, VoiceSelectionParams voice, AudioConfig audioConfig, gaxgrpc::CallSettings callSettings = null) => + SynthesizeSpeechAsync(new SynthesizeSpeechRequest + { + Input = gax::GaxPreconditions.CheckNotNull(input, nameof(input)), + Voice = gax::GaxPreconditions.CheckNotNull(voice, nameof(voice)), + AudioConfig = gax::GaxPreconditions.CheckNotNull(audioConfig, nameof(audioConfig)), + }, callSettings); + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// + /// Required. The Synthesizer requires either plain text or SSML as input. + /// + /// + /// Required. The desired voice of the synthesized audio. + /// + /// + /// Required. The configuration of the synthesized audio. + /// + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task SynthesizeSpeechAsync(SynthesisInput input, VoiceSelectionParams voice, AudioConfig audioConfig, st::CancellationToken cancellationToken) => + SynthesizeSpeechAsync(input, voice, audioConfig, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// + /// Bidirectional streaming methods for + /// . + /// + public abstract partial class StreamingSynthesizeStream : gaxgrpc::BidirectionalStreamingBase + { + } + + /// + /// Performs bidirectional streaming speech synthesis: receive audio while + /// sending text. + /// + /// If not null, applies overrides to this RPC call. + /// If not null, applies streaming overrides to this RPC call. + /// The client-server stream. + public virtual StreamingSynthesizeStream StreamingSynthesize(gaxgrpc::CallSettings callSettings = null, gaxgrpc::BidirectionalStreamingSettings streamingSettings = null) => + throw new sys::NotImplementedException(); + } + + /// TextToSpeech client wrapper implementation, for convenient use. + /// + /// Service that implements Google Cloud Text-to-Speech API. + /// + public sealed partial class TextToSpeechClientImpl : TextToSpeechClient + { + private readonly gaxgrpc::ApiCall _callListVoices; + + private readonly gaxgrpc::ApiCall _callSynthesizeSpeech; + + private readonly gaxgrpc::ApiBidirectionalStreamingCall _callStreamingSynthesize; + + /// + /// Constructs a client wrapper for the TextToSpeech service, with the specified gRPC client and settings. + /// + /// The underlying gRPC client. + /// The base used within this client. + /// Optional to use within this client. + public TextToSpeechClientImpl(TextToSpeech.TextToSpeechClient grpcClient, TextToSpeechSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + TextToSpeechSettings effectiveSettings = settings ?? TextToSpeechSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + _callListVoices = clientHelper.BuildApiCall("ListVoices", grpcClient.ListVoicesAsync, grpcClient.ListVoices, effectiveSettings.ListVoicesSettings); + Modify_ApiCall(ref _callListVoices); + Modify_ListVoicesApiCall(ref _callListVoices); + _callSynthesizeSpeech = clientHelper.BuildApiCall("SynthesizeSpeech", grpcClient.SynthesizeSpeechAsync, grpcClient.SynthesizeSpeech, effectiveSettings.SynthesizeSpeechSettings); + Modify_ApiCall(ref _callSynthesizeSpeech); + Modify_SynthesizeSpeechApiCall(ref _callSynthesizeSpeech); + _callStreamingSynthesize = clientHelper.BuildApiCall("StreamingSynthesize", grpcClient.StreamingSynthesize, effectiveSettings.StreamingSynthesizeSettings, effectiveSettings.StreamingSynthesizeStreamingSettings); + Modify_ApiCall(ref _callStreamingSynthesize); + Modify_StreamingSynthesizeApiCall(ref _callStreamingSynthesize); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_ApiCall(ref gaxgrpc::ApiBidirectionalStreamingCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_ListVoicesApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_SynthesizeSpeechApiCall(ref gaxgrpc::ApiCall call); + + partial void Modify_StreamingSynthesizeApiCall(ref gaxgrpc::ApiBidirectionalStreamingCall call); + + partial void OnConstruction(TextToSpeech.TextToSpeechClient grpcClient, TextToSpeechSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC TextToSpeech client + public override TextToSpeech.TextToSpeechClient GrpcClient { get; } + + partial void Modify_ListVoicesRequest(ref ListVoicesRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_SynthesizeSpeechRequest(ref SynthesizeSpeechRequest request, ref gaxgrpc::CallSettings settings); + + partial void Modify_StreamingSynthesizeRequestCallSettings(ref gaxgrpc::CallSettings settings); + + partial void Modify_StreamingSynthesizeRequestRequest(ref StreamingSynthesizeRequest request); + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override ListVoicesResponse ListVoices(ListVoicesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListVoicesRequest(ref request, ref callSettings); + return _callListVoices.Sync(request, callSettings); + } + + /// + /// Returns a list of Voice supported for synthesis. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task ListVoicesAsync(ListVoicesRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_ListVoicesRequest(ref request, ref callSettings); + return _callListVoices.Async(request, callSettings); + } + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override SynthesizeSpeechResponse SynthesizeSpeech(SynthesizeSpeechRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_SynthesizeSpeechRequest(ref request, ref callSettings); + return _callSynthesizeSpeech.Sync(request, callSettings); + } + + /// + /// Synthesizes speech synchronously: receive results after all text input + /// has been processed. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override stt::Task SynthesizeSpeechAsync(SynthesizeSpeechRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_SynthesizeSpeechRequest(ref request, ref callSettings); + return _callSynthesizeSpeech.Async(request, callSettings); + } + + internal sealed partial class StreamingSynthesizeStreamImpl : StreamingSynthesizeStream + { + /// Construct the bidirectional streaming method for StreamingSynthesize. + /// The service containing this streaming method. + /// The underlying gRPC duplex streaming call. + /// + /// The instance associated + /// with this streaming call. + /// + public StreamingSynthesizeStreamImpl(TextToSpeechClientImpl service, grpccore::AsyncDuplexStreamingCall call, gaxgrpc::BufferedClientStreamWriter writeBuffer) + { + _service = service; + GrpcCall = call; + _writeBuffer = writeBuffer; + } + + private TextToSpeechClientImpl _service; + + private gaxgrpc::BufferedClientStreamWriter _writeBuffer; + + public override grpccore::AsyncDuplexStreamingCall GrpcCall { get; } + + private StreamingSynthesizeRequest ModifyRequest(StreamingSynthesizeRequest request) + { + _service.Modify_StreamingSynthesizeRequestRequest(ref request); + return request; + } + + public override stt::Task TryWriteAsync(StreamingSynthesizeRequest message) => + _writeBuffer.TryWriteAsync(ModifyRequest(message)); + + public override stt::Task WriteAsync(StreamingSynthesizeRequest message) => + _writeBuffer.WriteAsync(ModifyRequest(message)); + + public override stt::Task TryWriteAsync(StreamingSynthesizeRequest message, grpccore::WriteOptions options) => + _writeBuffer.TryWriteAsync(ModifyRequest(message), options); + + public override stt::Task WriteAsync(StreamingSynthesizeRequest message, grpccore::WriteOptions options) => + _writeBuffer.WriteAsync(ModifyRequest(message), options); + + public override stt::Task TryWriteCompleteAsync() => _writeBuffer.TryWriteCompleteAsync(); + + public override stt::Task WriteCompleteAsync() => _writeBuffer.WriteCompleteAsync(); + } + + /// + /// Performs bidirectional streaming speech synthesis: receive audio while + /// sending text. + /// + /// If not null, applies overrides to this RPC call. + /// If not null, applies streaming overrides to this RPC call. + /// The client-server stream. + public override TextToSpeechClient.StreamingSynthesizeStream StreamingSynthesize(gaxgrpc::CallSettings callSettings = null, gaxgrpc::BidirectionalStreamingSettings streamingSettings = null) + { + Modify_StreamingSynthesizeRequestCallSettings(ref callSettings); + gaxgrpc::BidirectionalStreamingSettings effectiveStreamingSettings = streamingSettings ?? _callStreamingSynthesize.StreamingSettings; + grpccore::AsyncDuplexStreamingCall call = _callStreamingSynthesize.Call(callSettings); + gaxgrpc::BufferedClientStreamWriter writeBuffer = new gaxgrpc::BufferedClientStreamWriter(call.RequestStream, effectiveStreamingSettings.BufferedClientWriterCapacity); + return new StreamingSynthesizeStreamImpl(this, call, writeBuffer); + } + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechLongAudioSynthesizeClient.g.cs b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechLongAudioSynthesizeClient.g.cs new file mode 100755 index 000000000000..75f15a86037e --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/Google.Cloud.TextToSpeech.V1Beta1/TextToSpeechLongAudioSynthesizeClient.g.cs @@ -0,0 +1,373 @@ +// Copyright 2024 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 +// +// https://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! + +#pragma warning disable CS8981 +using gax = Google.Api.Gax; +using gaxgrpc = Google.Api.Gax.Grpc; +using grpccore = Grpc.Core; +using grpcinter = Grpc.Core.Interceptors; +using lro = Google.LongRunning; +using mel = Microsoft.Extensions.Logging; +using proto = Google.Protobuf; +using scg = System.Collections.Generic; +using sco = System.Collections.ObjectModel; +using st = System.Threading; +using stt = System.Threading.Tasks; +using sys = System; + +namespace Google.Cloud.TextToSpeech.V1Beta1 +{ + /// Settings for instances. + public sealed partial class TextToSpeechLongAudioSynthesizeSettings : gaxgrpc::ServiceSettingsBase + { + /// Get a new instance of the default . + /// A new instance of the default . + public static TextToSpeechLongAudioSynthesizeSettings GetDefault() => new TextToSpeechLongAudioSynthesizeSettings(); + + /// + /// Constructs a new object with default settings. + /// + public TextToSpeechLongAudioSynthesizeSettings() + { + } + + private TextToSpeechLongAudioSynthesizeSettings(TextToSpeechLongAudioSynthesizeSettings existing) : base(existing) + { + gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); + SynthesizeLongAudioSettings = existing.SynthesizeLongAudioSettings; + SynthesizeLongAudioOperationsSettings = existing.SynthesizeLongAudioOperationsSettings.Clone(); + OnCopy(existing); + } + + partial void OnCopy(TextToSpeechLongAudioSynthesizeSettings existing); + + /// + /// for synchronous and asynchronous calls to + /// TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio and + /// TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioAsync. + /// + /// + /// + /// This call will not be retried. + /// Timeout: 5000 seconds. + /// + /// + public gaxgrpc::CallSettings SynthesizeLongAudioSettings { get; set; } = gaxgrpc::CallSettings.FromExpiration(gax::Expiration.FromTimeout(sys::TimeSpan.FromMilliseconds(5000000))); + + /// + /// Long Running Operation settings for calls to TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudio + /// and TextToSpeechLongAudioSynthesizeClient.SynthesizeLongAudioAsync. + /// + /// + /// Uses default of: + /// + /// Initial delay: 20 seconds. + /// Delay multiplier: 1.5 + /// Maximum delay: 45 seconds. + /// Total timeout: 24 hours. + /// + /// + public lro::OperationsSettings SynthesizeLongAudioOperationsSettings { get; set; } = new lro::OperationsSettings + { + DefaultPollSettings = new gax::PollSettings(gax::Expiration.FromTimeout(sys::TimeSpan.FromHours(24)), sys::TimeSpan.FromSeconds(20), 1.5, sys::TimeSpan.FromSeconds(45)), + }; + + /// Creates a deep clone of this object, with all the same property values. + /// A deep clone of this object. + public TextToSpeechLongAudioSynthesizeSettings Clone() => new TextToSpeechLongAudioSynthesizeSettings(this); + } + + /// + /// Builder class for to provide simple configuration of + /// credentials, endpoint etc. + /// + public sealed partial class TextToSpeechLongAudioSynthesizeClientBuilder : gaxgrpc::ClientBuilderBase + { + /// The settings to use for RPCs, or null for the default settings. + public TextToSpeechLongAudioSynthesizeSettings Settings { get; set; } + + /// Creates a new builder with default settings. + public TextToSpeechLongAudioSynthesizeClientBuilder() : base(TextToSpeechLongAudioSynthesizeClient.ServiceMetadata) + { + } + + partial void InterceptBuild(ref TextToSpeechLongAudioSynthesizeClient client); + + partial void InterceptBuildAsync(st::CancellationToken cancellationToken, ref stt::Task task); + + /// Builds the resulting client. + public override TextToSpeechLongAudioSynthesizeClient Build() + { + TextToSpeechLongAudioSynthesizeClient client = null; + InterceptBuild(ref client); + return client ?? BuildImpl(); + } + + /// Builds the resulting client asynchronously. + public override stt::Task BuildAsync(st::CancellationToken cancellationToken = default) + { + stt::Task task = null; + InterceptBuildAsync(cancellationToken, ref task); + return task ?? BuildAsyncImpl(cancellationToken); + } + + private TextToSpeechLongAudioSynthesizeClient BuildImpl() + { + Validate(); + grpccore::CallInvoker callInvoker = CreateCallInvoker(); + return TextToSpeechLongAudioSynthesizeClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + private async stt::Task BuildAsyncImpl(st::CancellationToken cancellationToken) + { + Validate(); + grpccore::CallInvoker callInvoker = await CreateCallInvokerAsync(cancellationToken).ConfigureAwait(false); + return TextToSpeechLongAudioSynthesizeClient.Create(callInvoker, GetEffectiveSettings(Settings?.Clone()), Logger); + } + + /// Returns the channel pool to use when no other options are specified. + protected override gaxgrpc::ChannelPool GetChannelPool() => TextToSpeechLongAudioSynthesizeClient.ChannelPool; + } + + /// TextToSpeechLongAudioSynthesize client wrapper, for convenient use. + /// + /// Service that implements Google Cloud Text-to-Speech API. + /// + public abstract partial class TextToSpeechLongAudioSynthesizeClient + { + /// + /// The default endpoint for the TextToSpeechLongAudioSynthesize service, which is a host of + /// "texttospeech.googleapis.com" and a port of 443. + /// + public static string DefaultEndpoint { get; } = "texttospeech.googleapis.com:443"; + + /// The default TextToSpeechLongAudioSynthesize scopes. + /// + /// The default TextToSpeechLongAudioSynthesize scopes are: + /// + /// https://www.googleapis.com/auth/cloud-platform + /// + /// + public static scg::IReadOnlyList DefaultScopes { get; } = new sco::ReadOnlyCollection(new string[] + { + "https://www.googleapis.com/auth/cloud-platform", + }); + + /// The service metadata associated with this client type. + public static gaxgrpc::ServiceMetadata ServiceMetadata { get; } = new gaxgrpc::ServiceMetadata(TextToSpeechLongAudioSynthesize.Descriptor, DefaultEndpoint, DefaultScopes, true, gax::ApiTransports.Grpc | gax::ApiTransports.Rest, PackageApiMetadata.ApiMetadata); + + internal static gaxgrpc::ChannelPool ChannelPool { get; } = new gaxgrpc::ChannelPool(ServiceMetadata); + + /// + /// Asynchronously creates a using the default credentials, + /// endpoint and settings. To specify custom credentials or other settings, use + /// . + /// + /// + /// The to use while creating the client. + /// + /// The task representing the created . + public static stt::Task CreateAsync(st::CancellationToken cancellationToken = default) => + new TextToSpeechLongAudioSynthesizeClientBuilder().BuildAsync(cancellationToken); + + /// + /// Synchronously creates a using the default credentials, + /// endpoint and settings. To specify custom credentials or other settings, use + /// . + /// + /// The created . + public static TextToSpeechLongAudioSynthesizeClient Create() => + new TextToSpeechLongAudioSynthesizeClientBuilder().Build(); + + /// + /// Creates a which uses the specified call invoker for + /// remote operations. + /// + /// + /// The for remote operations. Must not be null. + /// + /// Optional . + /// Optional . + /// The created . + internal static TextToSpeechLongAudioSynthesizeClient Create(grpccore::CallInvoker callInvoker, TextToSpeechLongAudioSynthesizeSettings settings = null, mel::ILogger logger = null) + { + gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); + grpcinter::Interceptor interceptor = settings?.Interceptor; + if (interceptor != null) + { + callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); + } + TextToSpeechLongAudioSynthesize.TextToSpeechLongAudioSynthesizeClient grpcClient = new TextToSpeechLongAudioSynthesize.TextToSpeechLongAudioSynthesizeClient(callInvoker); + return new TextToSpeechLongAudioSynthesizeClientImpl(grpcClient, settings, logger); + } + + /// + /// Shuts down any channels automatically created by and + /// . Channels which weren't automatically created are not + /// affected. + /// + /// + /// After calling this method, further calls to and + /// will create new channels, which could in turn be shut down + /// by another call to this method. + /// + /// A task representing the asynchronous shutdown operation. + public static stt::Task ShutdownDefaultChannelsAsync() => ChannelPool.ShutdownChannelsAsync(); + + /// The underlying gRPC TextToSpeechLongAudioSynthesize client + public virtual TextToSpeechLongAudioSynthesize.TextToSpeechLongAudioSynthesizeClient GrpcClient => throw new sys::NotImplementedException(); + + /// + /// Synthesizes long form text asynchronously. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public virtual lro::Operation SynthesizeLongAudio(SynthesizeLongAudioRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Synthesizes long form text asynchronously. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public virtual stt::Task> SynthesizeLongAudioAsync(SynthesizeLongAudioRequest request, gaxgrpc::CallSettings callSettings = null) => + throw new sys::NotImplementedException(); + + /// + /// Synthesizes long form text asynchronously. + /// + /// The request object containing all of the parameters for the API call. + /// A to use for this RPC. + /// A Task containing the RPC response. + public virtual stt::Task> SynthesizeLongAudioAsync(SynthesizeLongAudioRequest request, st::CancellationToken cancellationToken) => + SynthesizeLongAudioAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken)); + + /// The long-running operations client for SynthesizeLongAudio. + public virtual lro::OperationsClient SynthesizeLongAudioOperationsClient => throw new sys::NotImplementedException(); + + /// + /// Poll an operation once, using an operationName from a previous invocation of SynthesizeLongAudio + /// . + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// The result of polling the operation. + public virtual lro::Operation PollOnceSynthesizeLongAudio(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromName(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), SynthesizeLongAudioOperationsClient, callSettings); + + /// + /// Asynchronously poll an operation once, using an operationName from a previous invocation of + /// SynthesizeLongAudio. + /// + /// + /// The name of a previously invoked operation. Must not be null or empty. + /// + /// If not null, applies overrides to this RPC call. + /// A task representing the result of polling the operation. + public virtual stt::Task> PollOnceSynthesizeLongAudioAsync(string operationName, gaxgrpc::CallSettings callSettings = null) => + lro::Operation.PollOnceFromNameAsync(gax::GaxPreconditions.CheckNotNullOrEmpty(operationName, nameof(operationName)), SynthesizeLongAudioOperationsClient, callSettings); + } + + /// TextToSpeechLongAudioSynthesize client wrapper implementation, for convenient use. + /// + /// Service that implements Google Cloud Text-to-Speech API. + /// + public sealed partial class TextToSpeechLongAudioSynthesizeClientImpl : TextToSpeechLongAudioSynthesizeClient + { + private readonly gaxgrpc::ApiCall _callSynthesizeLongAudio; + + /// + /// Constructs a client wrapper for the TextToSpeechLongAudioSynthesize service, with the specified gRPC client + /// and settings. + /// + /// The underlying gRPC client. + /// + /// The base used within this client. + /// + /// Optional to use within this client. + public TextToSpeechLongAudioSynthesizeClientImpl(TextToSpeechLongAudioSynthesize.TextToSpeechLongAudioSynthesizeClient grpcClient, TextToSpeechLongAudioSynthesizeSettings settings, mel::ILogger logger) + { + GrpcClient = grpcClient; + TextToSpeechLongAudioSynthesizeSettings effectiveSettings = settings ?? TextToSpeechLongAudioSynthesizeSettings.GetDefault(); + gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(new gaxgrpc::ClientHelper.Options + { + Settings = effectiveSettings, + Logger = logger, + }); + SynthesizeLongAudioOperationsClient = new lro::OperationsClientImpl(grpcClient.CreateOperationsClient(), effectiveSettings.SynthesizeLongAudioOperationsSettings, logger); + _callSynthesizeLongAudio = clientHelper.BuildApiCall("SynthesizeLongAudio", grpcClient.SynthesizeLongAudioAsync, grpcClient.SynthesizeLongAudio, effectiveSettings.SynthesizeLongAudioSettings).WithGoogleRequestParam("parent", request => request.Parent); + Modify_ApiCall(ref _callSynthesizeLongAudio); + Modify_SynthesizeLongAudioApiCall(ref _callSynthesizeLongAudio); + OnConstruction(grpcClient, effectiveSettings, clientHelper); + } + + partial void Modify_ApiCall(ref gaxgrpc::ApiCall call) where TRequest : class, proto::IMessage where TResponse : class, proto::IMessage; + + partial void Modify_SynthesizeLongAudioApiCall(ref gaxgrpc::ApiCall call); + + partial void OnConstruction(TextToSpeechLongAudioSynthesize.TextToSpeechLongAudioSynthesizeClient grpcClient, TextToSpeechLongAudioSynthesizeSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper); + + /// The underlying gRPC TextToSpeechLongAudioSynthesize client + public override TextToSpeechLongAudioSynthesize.TextToSpeechLongAudioSynthesizeClient GrpcClient { get; } + + partial void Modify_SynthesizeLongAudioRequest(ref SynthesizeLongAudioRequest request, ref gaxgrpc::CallSettings settings); + + /// The long-running operations client for SynthesizeLongAudio. + public override lro::OperationsClient SynthesizeLongAudioOperationsClient { get; } + + /// + /// Synthesizes long form text asynchronously. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// The RPC response. + public override lro::Operation SynthesizeLongAudio(SynthesizeLongAudioRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_SynthesizeLongAudioRequest(ref request, ref callSettings); + return new lro::Operation(_callSynthesizeLongAudio.Sync(request, callSettings), SynthesizeLongAudioOperationsClient); + } + + /// + /// Synthesizes long form text asynchronously. + /// + /// The request object containing all of the parameters for the API call. + /// If not null, applies overrides to this RPC call. + /// A Task containing the RPC response. + public override async stt::Task> SynthesizeLongAudioAsync(SynthesizeLongAudioRequest request, gaxgrpc::CallSettings callSettings = null) + { + Modify_SynthesizeLongAudioRequest(ref request, ref callSettings); + return new lro::Operation(await _callSynthesizeLongAudio.Async(request, callSettings).ConfigureAwait(false), SynthesizeLongAudioOperationsClient); + } + } + + public static partial class TextToSpeechLongAudioSynthesize + { + public partial class TextToSpeechLongAudioSynthesizeClient + { + /// + /// Creates a new instance of using the same call invoker as + /// this client. + /// + /// A new Operations client for the same target as this client. + public virtual lro::Operations.OperationsClient CreateOperationsClient() => + new lro::Operations.OperationsClient(CallInvoker); + } + } +} diff --git a/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/gapic_metadata.json b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/gapic_metadata.json new file mode 100755 index 000000000000..d57459e29601 --- /dev/null +++ b/owl-bot-staging/Google.Cloud.TextToSpeech.V1Beta1/gapic_metadata.json @@ -0,0 +1,51 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "csharp", + "protoPackage": "google.cloud.texttospeech.v1beta1", + "libraryPackage": "Google.Cloud.TextToSpeech.V1Beta1", + "services": { + "TextToSpeech": { + "clients": { + "grpc": { + "libraryClient": "TextToSpeechClient", + "rpcs": { + "ListVoices": { + "methods": [ + "ListVoices", + "ListVoicesAsync" + ] + }, + "StreamingSynthesize": { + "methods": [ + "StreamingSynthesize", + "StreamingSynthesizeAsync" + ] + }, + "SynthesizeSpeech": { + "methods": [ + "SynthesizeSpeech", + "SynthesizeSpeechAsync" + ] + } + } + } + } + }, + "TextToSpeechLongAudioSynthesize": { + "clients": { + "grpc": { + "libraryClient": "TextToSpeechLongAudioSynthesizeClient", + "rpcs": { + "SynthesizeLongAudio": { + "methods": [ + "SynthesizeLongAudio", + "SynthesizeLongAudioAsync" + ] + } + } + } + } + } + } +}