Skip to content

Commit

Permalink
feat: Add adaptation proto for v1 api (#371)
Browse files Browse the repository at this point in the history
* feat: Add adaptation proto for v1 api

PiperOrigin-RevId: 447561222

Source-Link: googleapis/googleapis@ec9193e

Source-Link: googleapis/googleapis-gen@cd279b0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2QyNzliMDAzZTQ0NTVjOWI4MDVmMjJmYzNiOTk3NmFkODYzOWVlNiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and dandhlee committed Feb 9, 2023
1 parent 643392b commit b46fb41
Show file tree
Hide file tree
Showing 21 changed files with 2,542 additions and 0 deletions.
1,646 changes: 1,646 additions & 0 deletions speech/generated_samples/snippet_metadata_speech_v1.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateCustomClass
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_CreateCustomClass_async]
from google.cloud import speech_v1


async def sample_create_custom_class():
# Create a client
client = speech_v1.AdaptationAsyncClient()

# Initialize request argument(s)
request = speech_v1.CreateCustomClassRequest(
parent="parent_value",
custom_class_id="custom_class_id_value",
)

# Make the request
response = await client.create_custom_class(request=request)

# Handle the response
print(response)

# [END speech_v1_generated_Adaptation_CreateCustomClass_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreateCustomClass
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_CreateCustomClass_sync]
from google.cloud import speech_v1


def sample_create_custom_class():
# Create a client
client = speech_v1.AdaptationClient()

# Initialize request argument(s)
request = speech_v1.CreateCustomClassRequest(
parent="parent_value",
custom_class_id="custom_class_id_value",
)

# Make the request
response = client.create_custom_class(request=request)

# Handle the response
print(response)

# [END speech_v1_generated_Adaptation_CreateCustomClass_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreatePhraseSet
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_CreatePhraseSet_async]
from google.cloud import speech_v1


async def sample_create_phrase_set():
# Create a client
client = speech_v1.AdaptationAsyncClient()

# Initialize request argument(s)
request = speech_v1.CreatePhraseSetRequest(
parent="parent_value",
phrase_set_id="phrase_set_id_value",
)

# Make the request
response = await client.create_phrase_set(request=request)

# Handle the response
print(response)

# [END speech_v1_generated_Adaptation_CreatePhraseSet_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for CreatePhraseSet
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_CreatePhraseSet_sync]
from google.cloud import speech_v1


def sample_create_phrase_set():
# Create a client
client = speech_v1.AdaptationClient()

# Initialize request argument(s)
request = speech_v1.CreatePhraseSetRequest(
parent="parent_value",
phrase_set_id="phrase_set_id_value",
)

# Make the request
response = client.create_phrase_set(request=request)

# Handle the response
print(response)

# [END speech_v1_generated_Adaptation_CreatePhraseSet_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeleteCustomClass
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_DeleteCustomClass_async]
from google.cloud import speech_v1


async def sample_delete_custom_class():
# Create a client
client = speech_v1.AdaptationAsyncClient()

# Initialize request argument(s)
request = speech_v1.DeleteCustomClassRequest(
name="name_value",
)

# Make the request
await client.delete_custom_class(request=request)


# [END speech_v1_generated_Adaptation_DeleteCustomClass_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeleteCustomClass
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_DeleteCustomClass_sync]
from google.cloud import speech_v1


def sample_delete_custom_class():
# Create a client
client = speech_v1.AdaptationClient()

# Initialize request argument(s)
request = speech_v1.DeleteCustomClassRequest(
name="name_value",
)

# Make the request
client.delete_custom_class(request=request)


# [END speech_v1_generated_Adaptation_DeleteCustomClass_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeletePhraseSet
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_DeletePhraseSet_async]
from google.cloud import speech_v1


async def sample_delete_phrase_set():
# Create a client
client = speech_v1.AdaptationAsyncClient()

# Initialize request argument(s)
request = speech_v1.DeletePhraseSetRequest(
name="name_value",
)

# Make the request
await client.delete_phrase_set(request=request)


# [END speech_v1_generated_Adaptation_DeletePhraseSet_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Generated code. DO NOT EDIT!
#
# Snippet for DeletePhraseSet
# NOTE: This snippet has been automatically generated for illustrative purposes only.
# It may require modifications to work in your environment.

# To install the latest published package dependency, execute the following:
# python3 -m pip install google-cloud-speech


# [START speech_v1_generated_Adaptation_DeletePhraseSet_sync]
from google.cloud import speech_v1


def sample_delete_phrase_set():
# Create a client
client = speech_v1.AdaptationClient()

# Initialize request argument(s)
request = speech_v1.DeletePhraseSetRequest(
name="name_value",
)

# Make the request
client.delete_phrase_set(request=request)


# [END speech_v1_generated_Adaptation_DeletePhraseSet_sync]
Loading

0 comments on commit b46fb41

Please sign in to comment.