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

Commit 4e35741

Browse files
feat: added support for custom content types (#627)
* feat: added support for custom content types docs: clarified wording around quota usage PiperOrigin-RevId: 513681148 Source-Link: googleapis/googleapis@3b8869b Source-Link: https://github.com/googleapis/googleapis-gen/commit/c1c7570b315ff2cc965c17a3c9a834b2af18ae0c 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: https://github.com/googleapis/googleapis-gen/commit/f6fabc9251235d35ea642896f2c30b5ee3d3b82c 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>
1 parent 9342d66 commit 4e35741

File tree

16 files changed

+563
-13
lines changed

16 files changed

+563
-13
lines changed

google/cloud/dialogflow_v2/services/conversation_profiles/async_client.py

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
)
5656
from google.cloud.dialogflow_v2.types import audio_config
5757
from google.cloud.dialogflow_v2.types import conversation_profile
58+
from google.cloud.dialogflow_v2.types import participant
5859

5960
from .client import ConversationProfilesClient
6061
from .transports.base import DEFAULT_CLIENT_INFO, ConversationProfilesTransport
@@ -832,6 +833,10 @@ async def set_suggestion_feature_config(
832833
] = None,
833834
*,
834835
conversation_profile: Optional[str] = None,
836+
participant_role: Optional[participant.Participant.Role] = None,
837+
suggestion_feature_config: Optional[
838+
gcd_conversation_profile.HumanAgentAssistantConfig.SuggestionFeatureConfig
839+
] = None,
835840
retry: OptionalRetry = gapic_v1.method.DEFAULT,
836841
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
837842
metadata: Sequence[Tuple[str, str]] = (),
@@ -900,6 +905,21 @@ async def sample_set_suggestion_feature_config():
900905
This corresponds to the ``conversation_profile`` field
901906
on the ``request`` instance; if ``request`` is provided, this
902907
should not be set.
908+
participant_role (:class:`google.cloud.dialogflow_v2.types.Participant.Role`):
909+
Required. The participant role to add or update the
910+
suggestion feature config. Only HUMAN_AGENT or END_USER
911+
can be used.
912+
913+
This corresponds to the ``participant_role`` field
914+
on the ``request`` instance; if ``request`` is provided, this
915+
should not be set.
916+
suggestion_feature_config (:class:`google.cloud.dialogflow_v2.types.HumanAgentAssistantConfig.SuggestionFeatureConfig`):
917+
Required. The suggestion feature
918+
config to add or update.
919+
920+
This corresponds to the ``suggestion_feature_config`` field
921+
on the ``request`` instance; if ``request`` is provided, this
922+
should not be set.
903923
retry (google.api_core.retry.Retry): Designation of what errors, if any,
904924
should be retried.
905925
timeout (float): The timeout for this request.
@@ -919,7 +939,9 @@ async def sample_set_suggestion_feature_config():
919939
# Create or coerce a protobuf request object.
920940
# Quick check: If we got a request object, we should *not* have
921941
# gotten any keyword arguments that map to the request.
922-
has_flattened_params = any([conversation_profile])
942+
has_flattened_params = any(
943+
[conversation_profile, participant_role, suggestion_feature_config]
944+
)
923945
if request is not None and has_flattened_params:
924946
raise ValueError(
925947
"If the `request` argument is set, then none of "
@@ -932,6 +954,10 @@ async def sample_set_suggestion_feature_config():
932954
# request, apply these.
933955
if conversation_profile is not None:
934956
request.conversation_profile = conversation_profile
957+
if participant_role is not None:
958+
request.participant_role = participant_role
959+
if suggestion_feature_config is not None:
960+
request.suggestion_feature_config = suggestion_feature_config
935961

936962
# Wrap the RPC method; this adds retry and timeout information,
937963
# and friendly error handling.
@@ -975,6 +1001,10 @@ async def clear_suggestion_feature_config(
9751001
] = None,
9761002
*,
9771003
conversation_profile: Optional[str] = None,
1004+
participant_role: Optional[participant.Participant.Role] = None,
1005+
suggestion_feature_type: Optional[
1006+
gcd_conversation_profile.SuggestionFeature.Type
1007+
] = None,
9781008
retry: OptionalRetry = gapic_v1.method.DEFAULT,
9791009
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
9801010
metadata: Sequence[Tuple[str, str]] = (),
@@ -1036,6 +1066,21 @@ async def sample_clear_suggestion_feature_config():
10361066
This corresponds to the ``conversation_profile`` field
10371067
on the ``request`` instance; if ``request`` is provided, this
10381068
should not be set.
1069+
participant_role (:class:`google.cloud.dialogflow_v2.types.Participant.Role`):
1070+
Required. The participant role to remove the suggestion
1071+
feature config. Only HUMAN_AGENT or END_USER can be
1072+
used.
1073+
1074+
This corresponds to the ``participant_role`` field
1075+
on the ``request`` instance; if ``request`` is provided, this
1076+
should not be set.
1077+
suggestion_feature_type (:class:`google.cloud.dialogflow_v2.types.SuggestionFeature.Type`):
1078+
Required. The type of the suggestion
1079+
feature to remove.
1080+
1081+
This corresponds to the ``suggestion_feature_type`` field
1082+
on the ``request`` instance; if ``request`` is provided, this
1083+
should not be set.
10391084
retry (google.api_core.retry.Retry): Designation of what errors, if any,
10401085
should be retried.
10411086
timeout (float): The timeout for this request.
@@ -1055,7 +1100,9 @@ async def sample_clear_suggestion_feature_config():
10551100
# Create or coerce a protobuf request object.
10561101
# Quick check: If we got a request object, we should *not* have
10571102
# gotten any keyword arguments that map to the request.
1058-
has_flattened_params = any([conversation_profile])
1103+
has_flattened_params = any(
1104+
[conversation_profile, participant_role, suggestion_feature_type]
1105+
)
10591106
if request is not None and has_flattened_params:
10601107
raise ValueError(
10611108
"If the `request` argument is set, then none of "
@@ -1068,6 +1115,10 @@ async def sample_clear_suggestion_feature_config():
10681115
# request, apply these.
10691116
if conversation_profile is not None:
10701117
request.conversation_profile = conversation_profile
1118+
if participant_role is not None:
1119+
request.participant_role = participant_role
1120+
if suggestion_feature_type is not None:
1121+
request.suggestion_feature_type = suggestion_feature_type
10711122

10721123
# Wrap the RPC method; this adds retry and timeout information,
10731124
# and friendly error handling.

google/cloud/dialogflow_v2/services/conversation_profiles/client.py

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
)
6060
from google.cloud.dialogflow_v2.types import audio_config
6161
from google.cloud.dialogflow_v2.types import conversation_profile
62+
from google.cloud.dialogflow_v2.types import participant
6263

6364
from .transports.base import DEFAULT_CLIENT_INFO, ConversationProfilesTransport
6465
from .transports.grpc import ConversationProfilesGrpcTransport
@@ -1150,6 +1151,10 @@ def set_suggestion_feature_config(
11501151
] = None,
11511152
*,
11521153
conversation_profile: Optional[str] = None,
1154+
participant_role: Optional[participant.Participant.Role] = None,
1155+
suggestion_feature_config: Optional[
1156+
gcd_conversation_profile.HumanAgentAssistantConfig.SuggestionFeatureConfig
1157+
] = None,
11531158
retry: OptionalRetry = gapic_v1.method.DEFAULT,
11541159
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
11551160
metadata: Sequence[Tuple[str, str]] = (),
@@ -1218,6 +1223,21 @@ def sample_set_suggestion_feature_config():
12181223
This corresponds to the ``conversation_profile`` field
12191224
on the ``request`` instance; if ``request`` is provided, this
12201225
should not be set.
1226+
participant_role (google.cloud.dialogflow_v2.types.Participant.Role):
1227+
Required. The participant role to add or update the
1228+
suggestion feature config. Only HUMAN_AGENT or END_USER
1229+
can be used.
1230+
1231+
This corresponds to the ``participant_role`` field
1232+
on the ``request`` instance; if ``request`` is provided, this
1233+
should not be set.
1234+
suggestion_feature_config (google.cloud.dialogflow_v2.types.HumanAgentAssistantConfig.SuggestionFeatureConfig):
1235+
Required. The suggestion feature
1236+
config to add or update.
1237+
1238+
This corresponds to the ``suggestion_feature_config`` field
1239+
on the ``request`` instance; if ``request`` is provided, this
1240+
should not be set.
12211241
retry (google.api_core.retry.Retry): Designation of what errors, if any,
12221242
should be retried.
12231243
timeout (float): The timeout for this request.
@@ -1237,7 +1257,9 @@ def sample_set_suggestion_feature_config():
12371257
# Create or coerce a protobuf request object.
12381258
# Quick check: If we got a request object, we should *not* have
12391259
# gotten any keyword arguments that map to the request.
1240-
has_flattened_params = any([conversation_profile])
1260+
has_flattened_params = any(
1261+
[conversation_profile, participant_role, suggestion_feature_config]
1262+
)
12411263
if request is not None and has_flattened_params:
12421264
raise ValueError(
12431265
"If the `request` argument is set, then none of "
@@ -1258,6 +1280,10 @@ def sample_set_suggestion_feature_config():
12581280
# request, apply these.
12591281
if conversation_profile is not None:
12601282
request.conversation_profile = conversation_profile
1283+
if participant_role is not None:
1284+
request.participant_role = participant_role
1285+
if suggestion_feature_config is not None:
1286+
request.suggestion_feature_config = suggestion_feature_config
12611287

12621288
# Wrap the RPC method; this adds retry and timeout information,
12631289
# and friendly error handling.
@@ -1299,6 +1325,10 @@ def clear_suggestion_feature_config(
12991325
] = None,
13001326
*,
13011327
conversation_profile: Optional[str] = None,
1328+
participant_role: Optional[participant.Participant.Role] = None,
1329+
suggestion_feature_type: Optional[
1330+
gcd_conversation_profile.SuggestionFeature.Type
1331+
] = None,
13021332
retry: OptionalRetry = gapic_v1.method.DEFAULT,
13031333
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
13041334
metadata: Sequence[Tuple[str, str]] = (),
@@ -1360,6 +1390,21 @@ def sample_clear_suggestion_feature_config():
13601390
This corresponds to the ``conversation_profile`` field
13611391
on the ``request`` instance; if ``request`` is provided, this
13621392
should not be set.
1393+
participant_role (google.cloud.dialogflow_v2.types.Participant.Role):
1394+
Required. The participant role to remove the suggestion
1395+
feature config. Only HUMAN_AGENT or END_USER can be
1396+
used.
1397+
1398+
This corresponds to the ``participant_role`` field
1399+
on the ``request`` instance; if ``request`` is provided, this
1400+
should not be set.
1401+
suggestion_feature_type (google.cloud.dialogflow_v2.types.SuggestionFeature.Type):
1402+
Required. The type of the suggestion
1403+
feature to remove.
1404+
1405+
This corresponds to the ``suggestion_feature_type`` field
1406+
on the ``request`` instance; if ``request`` is provided, this
1407+
should not be set.
13631408
retry (google.api_core.retry.Retry): Designation of what errors, if any,
13641409
should be retried.
13651410
timeout (float): The timeout for this request.
@@ -1379,7 +1424,9 @@ def sample_clear_suggestion_feature_config():
13791424
# Create or coerce a protobuf request object.
13801425
# Quick check: If we got a request object, we should *not* have
13811426
# gotten any keyword arguments that map to the request.
1382-
has_flattened_params = any([conversation_profile])
1427+
has_flattened_params = any(
1428+
[conversation_profile, participant_role, suggestion_feature_type]
1429+
)
13831430
if request is not None and has_flattened_params:
13841431
raise ValueError(
13851432
"If the `request` argument is set, then none of "
@@ -1400,6 +1447,10 @@ def sample_clear_suggestion_feature_config():
14001447
# request, apply these.
14011448
if conversation_profile is not None:
14021449
request.conversation_profile = conversation_profile
1450+
if participant_role is not None:
1451+
request.participant_role = participant_role
1452+
if suggestion_feature_type is not None:
1453+
request.suggestion_feature_type = suggestion_feature_type
14031454

14041455
# Wrap the RPC method; this adds retry and timeout information,
14051456
# and friendly error handling.

google/cloud/dialogflow_v2beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
)
6767
from .types.audio_config import (
6868
AudioEncoding,
69+
BargeInConfig,
6970
InputAudioConfig,
7071
OutputAudioConfig,
7172
OutputAudioEncoding,
@@ -304,6 +305,7 @@
304305
"AudioInput",
305306
"AutomatedAgentConfig",
306307
"AutomatedAgentReply",
308+
"BargeInConfig",
307309
"BatchCreateEntitiesRequest",
308310
"BatchCreateMessagesRequest",
309311
"BatchCreateMessagesResponse",

google/cloud/dialogflow_v2beta1/services/conversation_profiles/async_client.py

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
)
5656
from google.cloud.dialogflow_v2beta1.types import audio_config
5757
from google.cloud.dialogflow_v2beta1.types import conversation_profile
58+
from google.cloud.dialogflow_v2beta1.types import participant
5859

5960
from .client import ConversationProfilesClient
6061
from .transports.base import DEFAULT_CLIENT_INFO, ConversationProfilesTransport
@@ -832,6 +833,10 @@ async def set_suggestion_feature_config(
832833
] = None,
833834
*,
834835
conversation_profile: Optional[str] = None,
836+
participant_role: Optional[participant.Participant.Role] = None,
837+
suggestion_feature_config: Optional[
838+
gcd_conversation_profile.HumanAgentAssistantConfig.SuggestionFeatureConfig
839+
] = None,
835840
retry: OptionalRetry = gapic_v1.method.DEFAULT,
836841
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
837842
metadata: Sequence[Tuple[str, str]] = (),
@@ -900,6 +905,21 @@ async def sample_set_suggestion_feature_config():
900905
This corresponds to the ``conversation_profile`` field
901906
on the ``request`` instance; if ``request`` is provided, this
902907
should not be set.
908+
participant_role (:class:`google.cloud.dialogflow_v2beta1.types.Participant.Role`):
909+
Required. The participant role to add or update the
910+
suggestion feature config. Only HUMAN_AGENT or END_USER
911+
can be used.
912+
913+
This corresponds to the ``participant_role`` field
914+
on the ``request`` instance; if ``request`` is provided, this
915+
should not be set.
916+
suggestion_feature_config (:class:`google.cloud.dialogflow_v2beta1.types.HumanAgentAssistantConfig.SuggestionFeatureConfig`):
917+
Required. The suggestion feature
918+
config to add or update.
919+
920+
This corresponds to the ``suggestion_feature_config`` field
921+
on the ``request`` instance; if ``request`` is provided, this
922+
should not be set.
903923
retry (google.api_core.retry.Retry): Designation of what errors, if any,
904924
should be retried.
905925
timeout (float): The timeout for this request.
@@ -919,7 +939,9 @@ async def sample_set_suggestion_feature_config():
919939
# Create or coerce a protobuf request object.
920940
# Quick check: If we got a request object, we should *not* have
921941
# gotten any keyword arguments that map to the request.
922-
has_flattened_params = any([conversation_profile])
942+
has_flattened_params = any(
943+
[conversation_profile, participant_role, suggestion_feature_config]
944+
)
923945
if request is not None and has_flattened_params:
924946
raise ValueError(
925947
"If the `request` argument is set, then none of "
@@ -932,6 +954,10 @@ async def sample_set_suggestion_feature_config():
932954
# request, apply these.
933955
if conversation_profile is not None:
934956
request.conversation_profile = conversation_profile
957+
if participant_role is not None:
958+
request.participant_role = participant_role
959+
if suggestion_feature_config is not None:
960+
request.suggestion_feature_config = suggestion_feature_config
935961

936962
# Wrap the RPC method; this adds retry and timeout information,
937963
# and friendly error handling.
@@ -975,6 +1001,8 @@ async def clear_suggestion_feature_config(
9751001
] = None,
9761002
*,
9771003
conversation_profile: Optional[str] = None,
1004+
participant_role: Optional[participant.Participant.Role] = None,
1005+
suggestion_feature_type: Optional[participant.SuggestionFeature.Type] = None,
9781006
retry: OptionalRetry = gapic_v1.method.DEFAULT,
9791007
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
9801008
metadata: Sequence[Tuple[str, str]] = (),
@@ -1036,6 +1064,21 @@ async def sample_clear_suggestion_feature_config():
10361064
This corresponds to the ``conversation_profile`` field
10371065
on the ``request`` instance; if ``request`` is provided, this
10381066
should not be set.
1067+
participant_role (:class:`google.cloud.dialogflow_v2beta1.types.Participant.Role`):
1068+
Required. The participant role to remove the suggestion
1069+
feature config. Only HUMAN_AGENT or END_USER can be
1070+
used.
1071+
1072+
This corresponds to the ``participant_role`` field
1073+
on the ``request`` instance; if ``request`` is provided, this
1074+
should not be set.
1075+
suggestion_feature_type (:class:`google.cloud.dialogflow_v2beta1.types.SuggestionFeature.Type`):
1076+
Required. The type of the suggestion
1077+
feature to remove.
1078+
1079+
This corresponds to the ``suggestion_feature_type`` field
1080+
on the ``request`` instance; if ``request`` is provided, this
1081+
should not be set.
10391082
retry (google.api_core.retry.Retry): Designation of what errors, if any,
10401083
should be retried.
10411084
timeout (float): The timeout for this request.
@@ -1055,7 +1098,9 @@ async def sample_clear_suggestion_feature_config():
10551098
# Create or coerce a protobuf request object.
10561099
# Quick check: If we got a request object, we should *not* have
10571100
# gotten any keyword arguments that map to the request.
1058-
has_flattened_params = any([conversation_profile])
1101+
has_flattened_params = any(
1102+
[conversation_profile, participant_role, suggestion_feature_type]
1103+
)
10591104
if request is not None and has_flattened_params:
10601105
raise ValueError(
10611106
"If the `request` argument is set, then none of "
@@ -1068,6 +1113,10 @@ async def sample_clear_suggestion_feature_config():
10681113
# request, apply these.
10691114
if conversation_profile is not None:
10701115
request.conversation_profile = conversation_profile
1116+
if participant_role is not None:
1117+
request.participant_role = participant_role
1118+
if suggestion_feature_type is not None:
1119+
request.suggestion_feature_type = suggestion_feature_type
10711120

10721121
# Wrap the RPC method; this adds retry and timeout information,
10731122
# and friendly error handling.

0 commit comments

Comments
 (0)