Skip to content

Commit

Permalink
docs(samples): include metadata file, add exclusions for samples to h…
Browse files Browse the repository at this point in the history
…andwritten libraries (#587)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 429395631

Source-Link: googleapis/googleapis@84594b3

Source-Link: googleapis/googleapis-gen@ed74f97
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9
  • Loading branch information
gcf-owl-bot[bot] authored Feb 18, 2022
1 parent 2c9193d commit e6f8cad
Show file tree
Hide file tree
Showing 10 changed files with 332 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"clientLibrary": {
"name": "nodejs-texttospeech",
"version": "0.1.0",
"language": "TYPESCRIPT",
"apis": [
{
"id": "google.cloud.texttospeech.v1",
"version": "v1"
}
]
},
"snippets": [
{
"regionTag": "texttospeech_v1_generated_TextToSpeech_ListVoices_async",
"title": "TextToSpeech listVoices Sample",
"origin": "API_DEFINITION",
"description": " Returns a list of Voice supported for synthesis.",
"canonical": true,
"file": "text_to_speech.list_voices.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 56,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "ListVoices",
"fullName": "google.cloud.texttospeech.v1.TextToSpeech.ListVoices",
"async": true,
"parameters": [
{
"name": "language_code",
"type": "TYPE_STRING"
}
],
"resultType": ".google.cloud.texttospeech.v1.ListVoicesResponse",
"client": {
"shortName": "TextToSpeechClient",
"fullName": "google.cloud.texttospeech.v1.TextToSpeechClient"
},
"method": {
"shortName": "ListVoices",
"fullName": "google.cloud.texttospeech.v1.TextToSpeech.ListVoices",
"service": {
"shortName": "TextToSpeech",
"fullName": "google.cloud.texttospeech.v1.TextToSpeech"
}
}
}
},
{
"regionTag": "texttospeech_v1_generated_TextToSpeech_SynthesizeSpeech_async",
"title": "TextToSpeech synthesizeSpeech Sample",
"origin": "API_DEFINITION",
"description": " Synthesizes speech synchronously: receive results after all text input has been processed.",
"canonical": true,
"file": "text_to_speech.synthesize_speech.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 60,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "SynthesizeSpeech",
"fullName": "google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeech",
"async": true,
"parameters": [
{
"name": "input",
"type": ".google.cloud.texttospeech.v1.SynthesisInput"
},
{
"name": "voice",
"type": ".google.cloud.texttospeech.v1.VoiceSelectionParams"
},
{
"name": "audio_config",
"type": ".google.cloud.texttospeech.v1.AudioConfig"
}
],
"resultType": ".google.cloud.texttospeech.v1.SynthesizeSpeechResponse",
"client": {
"shortName": "TextToSpeechClient",
"fullName": "google.cloud.texttospeech.v1.TextToSpeechClient"
},
"method": {
"shortName": "SynthesizeSpeech",
"fullName": "google.cloud.texttospeech.v1.TextToSpeech.SynthesizeSpeech",
"service": {
"shortName": "TextToSpeech",
"fullName": "google.cloud.texttospeech.v1.TextToSpeech"
}
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"clientLibrary": {
"name": "nodejs-texttospeech",
"version": "0.1.0",
"language": "TYPESCRIPT",
"apis": [
{
"id": "google.cloud.texttospeech.v1beta1",
"version": "v1beta1"
}
]
},
"snippets": [
{
"regionTag": "texttospeech_v1beta1_generated_TextToSpeech_ListVoices_async",
"title": "TextToSpeech listVoices Sample",
"origin": "API_DEFINITION",
"description": " Returns a list of Voice supported for synthesis.",
"canonical": true,
"file": "text_to_speech.list_voices.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 56,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "ListVoices",
"fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.ListVoices",
"async": true,
"parameters": [
{
"name": "language_code",
"type": "TYPE_STRING"
}
],
"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"
}
}
}
},
{
"regionTag": "texttospeech_v1beta1_generated_TextToSpeech_SynthesizeSpeech_async",
"title": "TextToSpeech synthesizeSpeech Sample",
"origin": "API_DEFINITION",
"description": " Synthesizes speech synchronously: receive results after all text input has been processed.",
"canonical": true,
"file": "text_to_speech.synthesize_speech.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 64,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "SynthesizeSpeech",
"fullName": "google.cloud.texttospeech.v1beta1.TextToSpeech.SynthesizeSpeech",
"async": true,
"parameters": [
{
"name": "input",
"type": ".google.cloud.texttospeech.v1beta1.SynthesisInput"
},
{
"name": "voice",
"type": ".google.cloud.texttospeech.v1beta1.VoiceSelectionParams"
},
{
"name": "audio_config",
"type": ".google.cloud.texttospeech.v1beta1.AudioConfig"
},
{
"name": "enable_time_pointing",
"type": "TYPE_ENUM[]"
}
],
"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"
}
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// 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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,8 @@ export class TextToSpeechClient {
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void> {
this.initialize();
if (!this._terminated) {
return this.textToSpeechStub!.then(stub => {
if (this.textToSpeechStub && !this._terminated) {
return this.textToSpeechStub.then(stub => {
this._terminated = true;
stub.close();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,8 @@ export class TextToSpeechClient {
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void> {
this.initialize();
if (!this._terminated) {
return this.textToSpeechStub!.then(stub => {
if (this.textToSpeechStub && !this._terminated) {
return this.textToSpeechStub.then(stub => {
this._terminated = true;
stub.close();
});
Expand Down
Loading

0 comments on commit e6f8cad

Please sign in to comment.