Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
feat: added support for custom content types (#627)
Browse files Browse the repository at this point in the history
* feat: added support for custom content types
docs: clarified wording around quota usage

PiperOrigin-RevId: 513681148

Source-Link: googleapis/googleapis@3b8869b

Source-Link: googleapis/googleapis-gen@c1c7570
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzFjNzU3MGIzMTVmZjJjYzk2NWMxN2EzYzlhODM0YjJhZjE4YWUwYyJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: added support for custom content types
docs: clarified wording around quota usage

PiperOrigin-RevId: 513764591

Source-Link: googleapis/googleapis@79acb42

Source-Link: googleapis/googleapis-gen@f6fabc9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjZmYWJjOTI1MTIzNWQzNWVhNjQyODk2ZjJjMzBiNWVlM2QzYjgyYyJ9

* 🦉 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
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 3, 2023
1 parent 9342d66 commit 4e35741
Show file tree
Hide file tree
Showing 16 changed files with 563 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
)
from google.cloud.dialogflow_v2.types import audio_config
from google.cloud.dialogflow_v2.types import conversation_profile
from google.cloud.dialogflow_v2.types import participant

from .client import ConversationProfilesClient
from .transports.base import DEFAULT_CLIENT_INFO, ConversationProfilesTransport
Expand Down Expand Up @@ -832,6 +833,10 @@ async def set_suggestion_feature_config(
] = None,
*,
conversation_profile: Optional[str] = None,
participant_role: Optional[participant.Participant.Role] = None,
suggestion_feature_config: Optional[
gcd_conversation_profile.HumanAgentAssistantConfig.SuggestionFeatureConfig
] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
Expand Down Expand Up @@ -900,6 +905,21 @@ async def sample_set_suggestion_feature_config():
This corresponds to the ``conversation_profile`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
participant_role (:class:`google.cloud.dialogflow_v2.types.Participant.Role`):
Required. The participant role to add or update the
suggestion feature config. Only HUMAN_AGENT or END_USER
can be used.
This corresponds to the ``participant_role`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
suggestion_feature_config (:class:`google.cloud.dialogflow_v2.types.HumanAgentAssistantConfig.SuggestionFeatureConfig`):
Required. The suggestion feature
config to add or update.
This corresponds to the ``suggestion_feature_config`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -919,7 +939,9 @@ async def sample_set_suggestion_feature_config():
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([conversation_profile])
has_flattened_params = any(
[conversation_profile, participant_role, suggestion_feature_config]
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
Expand All @@ -932,6 +954,10 @@ async def sample_set_suggestion_feature_config():
# request, apply these.
if conversation_profile is not None:
request.conversation_profile = conversation_profile
if participant_role is not None:
request.participant_role = participant_role
if suggestion_feature_config is not None:
request.suggestion_feature_config = suggestion_feature_config

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
Expand Down Expand Up @@ -975,6 +1001,10 @@ async def clear_suggestion_feature_config(
] = None,
*,
conversation_profile: Optional[str] = None,
participant_role: Optional[participant.Participant.Role] = None,
suggestion_feature_type: Optional[
gcd_conversation_profile.SuggestionFeature.Type
] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
Expand Down Expand Up @@ -1036,6 +1066,21 @@ async def sample_clear_suggestion_feature_config():
This corresponds to the ``conversation_profile`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
participant_role (:class:`google.cloud.dialogflow_v2.types.Participant.Role`):
Required. The participant role to remove the suggestion
feature config. Only HUMAN_AGENT or END_USER can be
used.
This corresponds to the ``participant_role`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
suggestion_feature_type (:class:`google.cloud.dialogflow_v2.types.SuggestionFeature.Type`):
Required. The type of the suggestion
feature to remove.
This corresponds to the ``suggestion_feature_type`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -1055,7 +1100,9 @@ async def sample_clear_suggestion_feature_config():
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([conversation_profile])
has_flattened_params = any(
[conversation_profile, participant_role, suggestion_feature_type]
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
Expand All @@ -1068,6 +1115,10 @@ async def sample_clear_suggestion_feature_config():
# request, apply these.
if conversation_profile is not None:
request.conversation_profile = conversation_profile
if participant_role is not None:
request.participant_role = participant_role
if suggestion_feature_type is not None:
request.suggestion_feature_type = suggestion_feature_type

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
)
from google.cloud.dialogflow_v2.types import audio_config
from google.cloud.dialogflow_v2.types import conversation_profile
from google.cloud.dialogflow_v2.types import participant

from .transports.base import DEFAULT_CLIENT_INFO, ConversationProfilesTransport
from .transports.grpc import ConversationProfilesGrpcTransport
Expand Down Expand Up @@ -1150,6 +1151,10 @@ def set_suggestion_feature_config(
] = None,
*,
conversation_profile: Optional[str] = None,
participant_role: Optional[participant.Participant.Role] = None,
suggestion_feature_config: Optional[
gcd_conversation_profile.HumanAgentAssistantConfig.SuggestionFeatureConfig
] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
Expand Down Expand Up @@ -1218,6 +1223,21 @@ def sample_set_suggestion_feature_config():
This corresponds to the ``conversation_profile`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
participant_role (google.cloud.dialogflow_v2.types.Participant.Role):
Required. The participant role to add or update the
suggestion feature config. Only HUMAN_AGENT or END_USER
can be used.
This corresponds to the ``participant_role`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
suggestion_feature_config (google.cloud.dialogflow_v2.types.HumanAgentAssistantConfig.SuggestionFeatureConfig):
Required. The suggestion feature
config to add or update.
This corresponds to the ``suggestion_feature_config`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -1237,7 +1257,9 @@ def sample_set_suggestion_feature_config():
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([conversation_profile])
has_flattened_params = any(
[conversation_profile, participant_role, suggestion_feature_config]
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
Expand All @@ -1258,6 +1280,10 @@ def sample_set_suggestion_feature_config():
# request, apply these.
if conversation_profile is not None:
request.conversation_profile = conversation_profile
if participant_role is not None:
request.participant_role = participant_role
if suggestion_feature_config is not None:
request.suggestion_feature_config = suggestion_feature_config

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
Expand Down Expand Up @@ -1299,6 +1325,10 @@ def clear_suggestion_feature_config(
] = None,
*,
conversation_profile: Optional[str] = None,
participant_role: Optional[participant.Participant.Role] = None,
suggestion_feature_type: Optional[
gcd_conversation_profile.SuggestionFeature.Type
] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
Expand Down Expand Up @@ -1360,6 +1390,21 @@ def sample_clear_suggestion_feature_config():
This corresponds to the ``conversation_profile`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
participant_role (google.cloud.dialogflow_v2.types.Participant.Role):
Required. The participant role to remove the suggestion
feature config. Only HUMAN_AGENT or END_USER can be
used.
This corresponds to the ``participant_role`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
suggestion_feature_type (google.cloud.dialogflow_v2.types.SuggestionFeature.Type):
Required. The type of the suggestion
feature to remove.
This corresponds to the ``suggestion_feature_type`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -1379,7 +1424,9 @@ def sample_clear_suggestion_feature_config():
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([conversation_profile])
has_flattened_params = any(
[conversation_profile, participant_role, suggestion_feature_type]
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
Expand All @@ -1400,6 +1447,10 @@ def sample_clear_suggestion_feature_config():
# request, apply these.
if conversation_profile is not None:
request.conversation_profile = conversation_profile
if participant_role is not None:
request.participant_role = participant_role
if suggestion_feature_type is not None:
request.suggestion_feature_type = suggestion_feature_type

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
Expand Down
2 changes: 2 additions & 0 deletions google/cloud/dialogflow_v2beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
)
from .types.audio_config import (
AudioEncoding,
BargeInConfig,
InputAudioConfig,
OutputAudioConfig,
OutputAudioEncoding,
Expand Down Expand Up @@ -304,6 +305,7 @@
"AudioInput",
"AutomatedAgentConfig",
"AutomatedAgentReply",
"BargeInConfig",
"BatchCreateEntitiesRequest",
"BatchCreateMessagesRequest",
"BatchCreateMessagesResponse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
)
from google.cloud.dialogflow_v2beta1.types import audio_config
from google.cloud.dialogflow_v2beta1.types import conversation_profile
from google.cloud.dialogflow_v2beta1.types import participant

from .client import ConversationProfilesClient
from .transports.base import DEFAULT_CLIENT_INFO, ConversationProfilesTransport
Expand Down Expand Up @@ -832,6 +833,10 @@ async def set_suggestion_feature_config(
] = None,
*,
conversation_profile: Optional[str] = None,
participant_role: Optional[participant.Participant.Role] = None,
suggestion_feature_config: Optional[
gcd_conversation_profile.HumanAgentAssistantConfig.SuggestionFeatureConfig
] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
Expand Down Expand Up @@ -900,6 +905,21 @@ async def sample_set_suggestion_feature_config():
This corresponds to the ``conversation_profile`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
participant_role (:class:`google.cloud.dialogflow_v2beta1.types.Participant.Role`):
Required. The participant role to add or update the
suggestion feature config. Only HUMAN_AGENT or END_USER
can be used.
This corresponds to the ``participant_role`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
suggestion_feature_config (:class:`google.cloud.dialogflow_v2beta1.types.HumanAgentAssistantConfig.SuggestionFeatureConfig`):
Required. The suggestion feature
config to add or update.
This corresponds to the ``suggestion_feature_config`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -919,7 +939,9 @@ async def sample_set_suggestion_feature_config():
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([conversation_profile])
has_flattened_params = any(
[conversation_profile, participant_role, suggestion_feature_config]
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
Expand All @@ -932,6 +954,10 @@ async def sample_set_suggestion_feature_config():
# request, apply these.
if conversation_profile is not None:
request.conversation_profile = conversation_profile
if participant_role is not None:
request.participant_role = participant_role
if suggestion_feature_config is not None:
request.suggestion_feature_config = suggestion_feature_config

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
Expand Down Expand Up @@ -975,6 +1001,8 @@ async def clear_suggestion_feature_config(
] = None,
*,
conversation_profile: Optional[str] = None,
participant_role: Optional[participant.Participant.Role] = None,
suggestion_feature_type: Optional[participant.SuggestionFeature.Type] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
Expand Down Expand Up @@ -1036,6 +1064,21 @@ async def sample_clear_suggestion_feature_config():
This corresponds to the ``conversation_profile`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
participant_role (:class:`google.cloud.dialogflow_v2beta1.types.Participant.Role`):
Required. The participant role to remove the suggestion
feature config. Only HUMAN_AGENT or END_USER can be
used.
This corresponds to the ``participant_role`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
suggestion_feature_type (:class:`google.cloud.dialogflow_v2beta1.types.SuggestionFeature.Type`):
Required. The type of the suggestion
feature to remove.
This corresponds to the ``suggestion_feature_type`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
should be retried.
timeout (float): The timeout for this request.
Expand All @@ -1055,7 +1098,9 @@ async def sample_clear_suggestion_feature_config():
# Create or coerce a protobuf request object.
# Quick check: If we got a request object, we should *not* have
# gotten any keyword arguments that map to the request.
has_flattened_params = any([conversation_profile])
has_flattened_params = any(
[conversation_profile, participant_role, suggestion_feature_type]
)
if request is not None and has_flattened_params:
raise ValueError(
"If the `request` argument is set, then none of "
Expand All @@ -1068,6 +1113,10 @@ async def sample_clear_suggestion_feature_config():
# request, apply these.
if conversation_profile is not None:
request.conversation_profile = conversation_profile
if participant_role is not None:
request.participant_role = participant_role
if suggestion_feature_type is not None:
request.suggestion_feature_type = suggestion_feature_type

# Wrap the RPC method; this adds retry and timeout information,
# and friendly error handling.
Expand Down
Loading

0 comments on commit 4e35741

Please sign in to comment.