Skip to content

Commit 40d47d2

Browse files
gcf-owl-bot[bot]partheaohmayr
authored
chore: [google-cloud-dialogflow-cx] regenerate API index (#12644)
BEGIN_COMMIT_OVERRIDE chore: rename Longrunning package name for PHP END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. Source-Link: googleapis/googleapis@acf5e8a Source-Link: googleapis/googleapis-gen@25f2e93 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6IjI1ZjJlOTMwYzhlZDgxOTgzNDZhYTc0NmU5M2NjYjg2ZDY5MTMwYzkifQ== BEGIN_NESTED_COMMIT chore: [google-cloud-dialogflow-cx] rename Longrunning package name for PHP PiperOrigin-RevId: 629107810 Source-Link: googleapis/googleapis@f306b95 Source-Link: googleapis/googleapis-gen@780ee3d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRpYWxvZ2Zsb3ctY3gvLk93bEJvdC55YW1sIiwiaCI6Ijc4MGVlM2RlMjRjZjYxMmM0ZmVmYmJhNDM1Yjg4NWUxZmY2NmY4MmQifQ== END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent ddd1508 commit 40d47d2

File tree

215 files changed

+49656
-4332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+49656
-4332
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ConversationHistory
2+
-------------------------------------
3+
4+
.. automodule:: google.cloud.dialogflowcx_v3beta1.services.conversation_history
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.dialogflowcx_v3beta1.services.conversation_history.pagers
9+
:members:
10+
:inherited-members:

packages/google-cloud-dialogflow-cx/docs/dialogflowcx_v3beta1/services_.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Services for Google Cloud Dialogflowcx v3beta1 API
55

66
agents
77
changelogs
8+
conversation_history
89
deployments
910
entity_types
1011
environments

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.33.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.33.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/async_client.py

Lines changed: 102 additions & 95 deletions
Large diffs are not rendered by default.

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/client.py

Lines changed: 56 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import os
1818
import re
1919
from typing import (
20+
Callable,
2021
Dict,
2122
Mapping,
2223
MutableMapping,
@@ -681,7 +682,9 @@ def __init__(
681682
self,
682683
*,
683684
credentials: Optional[ga_credentials.Credentials] = None,
684-
transport: Optional[Union[str, AgentsTransport]] = None,
685+
transport: Optional[
686+
Union[str, AgentsTransport, Callable[..., AgentsTransport]]
687+
] = None,
685688
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
686689
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
687690
) -> None:
@@ -693,9 +696,11 @@ def __init__(
693696
credentials identify the application to the service; if none
694697
are specified, the client will attempt to ascertain the
695698
credentials from the environment.
696-
transport (Union[str, AgentsTransport]): The
697-
transport to use. If set to None, a transport is chosen
698-
automatically.
699+
transport (Optional[Union[str,AgentsTransport,Callable[..., AgentsTransport]]]):
700+
The transport to use, or a Callable that constructs and returns a new transport.
701+
If a Callable is given, it will be called with the same set of initialization
702+
arguments as used in the AgentsTransport constructor.
703+
If set to None, a transport is chosen automatically.
699704
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]):
700705
Custom options for the client.
701706
@@ -801,8 +806,15 @@ def __init__(
801806
api_key_value
802807
)
803808

804-
Transport = type(self).get_transport_class(cast(str, transport))
805-
self._transport = Transport(
809+
transport_init: Union[
810+
Type[AgentsTransport], Callable[..., AgentsTransport]
811+
] = (
812+
type(self).get_transport_class(transport)
813+
if isinstance(transport, str) or transport is None
814+
else cast(Callable[..., AgentsTransport], transport)
815+
)
816+
# initialize with the provided callable or the passed in class
817+
self._transport = transport_init(
806818
credentials=credentials,
807819
credentials_file=self._client_options.credentials_file,
808820
host=self._api_endpoint,
@@ -880,19 +892,17 @@ def sample_list_agents():
880892
881893
"""
882894
# Create or coerce a protobuf request object.
883-
# Quick check: If we got a request object, we should *not* have
884-
# gotten any keyword arguments that map to the request.
895+
# - Quick check: If we got a request object, we should *not* have
896+
# gotten any keyword arguments that map to the request.
885897
has_flattened_params = any([parent])
886898
if request is not None and has_flattened_params:
887899
raise ValueError(
888900
"If the `request` argument is set, then none of "
889901
"the individual field arguments should be set."
890902
)
891903

892-
# Minor optimization to avoid making a copy if the user passes
893-
# in a agent.ListAgentsRequest.
894-
# There's no risk of modifying the input as we've already verified
895-
# there are no flattened fields.
904+
# - Use the request object if provided (there's no risk of modifying the input as
905+
# there are no flattened fields), or create one.
896906
if not isinstance(request, agent.ListAgentsRequest):
897907
request = agent.ListAgentsRequest(request)
898908
# If we have keyword arguments corresponding to fields on the
@@ -1007,19 +1017,17 @@ def sample_get_agent():
10071017
10081018
"""
10091019
# Create or coerce a protobuf request object.
1010-
# Quick check: If we got a request object, we should *not* have
1011-
# gotten any keyword arguments that map to the request.
1020+
# - Quick check: If we got a request object, we should *not* have
1021+
# gotten any keyword arguments that map to the request.
10121022
has_flattened_params = any([name])
10131023
if request is not None and has_flattened_params:
10141024
raise ValueError(
10151025
"If the `request` argument is set, then none of "
10161026
"the individual field arguments should be set."
10171027
)
10181028

1019-
# Minor optimization to avoid making a copy if the user passes
1020-
# in a agent.GetAgentRequest.
1021-
# There's no risk of modifying the input as we've already verified
1022-
# there are no flattened fields.
1029+
# - Use the request object if provided (there's no risk of modifying the input as
1030+
# there are no flattened fields), or create one.
10231031
if not isinstance(request, agent.GetAgentRequest):
10241032
request = agent.GetAgentRequest(request)
10251033
# If we have keyword arguments corresponding to fields on the
@@ -1141,19 +1149,17 @@ def sample_create_agent():
11411149
11421150
"""
11431151
# Create or coerce a protobuf request object.
1144-
# Quick check: If we got a request object, we should *not* have
1145-
# gotten any keyword arguments that map to the request.
1152+
# - Quick check: If we got a request object, we should *not* have
1153+
# gotten any keyword arguments that map to the request.
11461154
has_flattened_params = any([parent, agent])
11471155
if request is not None and has_flattened_params:
11481156
raise ValueError(
11491157
"If the `request` argument is set, then none of "
11501158
"the individual field arguments should be set."
11511159
)
11521160

1153-
# Minor optimization to avoid making a copy if the user passes
1154-
# in a gcdc_agent.CreateAgentRequest.
1155-
# There's no risk of modifying the input as we've already verified
1156-
# there are no flattened fields.
1161+
# - Use the request object if provided (there's no risk of modifying the input as
1162+
# there are no flattened fields), or create one.
11571163
if not isinstance(request, gcdc_agent.CreateAgentRequest):
11581164
request = gcdc_agent.CreateAgentRequest(request)
11591165
# If we have keyword arguments corresponding to fields on the
@@ -1277,19 +1283,17 @@ def sample_update_agent():
12771283
12781284
"""
12791285
# Create or coerce a protobuf request object.
1280-
# Quick check: If we got a request object, we should *not* have
1281-
# gotten any keyword arguments that map to the request.
1286+
# - Quick check: If we got a request object, we should *not* have
1287+
# gotten any keyword arguments that map to the request.
12821288
has_flattened_params = any([agent, update_mask])
12831289
if request is not None and has_flattened_params:
12841290
raise ValueError(
12851291
"If the `request` argument is set, then none of "
12861292
"the individual field arguments should be set."
12871293
)
12881294

1289-
# Minor optimization to avoid making a copy if the user passes
1290-
# in a gcdc_agent.UpdateAgentRequest.
1291-
# There's no risk of modifying the input as we've already verified
1292-
# there are no flattened fields.
1295+
# - Use the request object if provided (there's no risk of modifying the input as
1296+
# there are no flattened fields), or create one.
12931297
if not isinstance(request, gcdc_agent.UpdateAgentRequest):
12941298
request = gcdc_agent.UpdateAgentRequest(request)
12951299
# If we have keyword arguments corresponding to fields on the
@@ -1377,19 +1381,17 @@ def sample_delete_agent():
13771381
sent along with the request as metadata.
13781382
"""
13791383
# Create or coerce a protobuf request object.
1380-
# Quick check: If we got a request object, we should *not* have
1381-
# gotten any keyword arguments that map to the request.
1384+
# - Quick check: If we got a request object, we should *not* have
1385+
# gotten any keyword arguments that map to the request.
13821386
has_flattened_params = any([name])
13831387
if request is not None and has_flattened_params:
13841388
raise ValueError(
13851389
"If the `request` argument is set, then none of "
13861390
"the individual field arguments should be set."
13871391
)
13881392

1389-
# Minor optimization to avoid making a copy if the user passes
1390-
# in a agent.DeleteAgentRequest.
1391-
# There's no risk of modifying the input as we've already verified
1392-
# there are no flattened fields.
1393+
# - Use the request object if provided (there's no risk of modifying the input as
1394+
# there are no flattened fields), or create one.
13931395
if not isinstance(request, agent.DeleteAgentRequest):
13941396
request = agent.DeleteAgentRequest(request)
13951397
# If we have keyword arguments corresponding to fields on the
@@ -1487,10 +1489,8 @@ def sample_export_agent():
14871489
14881490
"""
14891491
# Create or coerce a protobuf request object.
1490-
# Minor optimization to avoid making a copy if the user passes
1491-
# in a agent.ExportAgentRequest.
1492-
# There's no risk of modifying the input as we've already verified
1493-
# there are no flattened fields.
1492+
# - Use the request object if provided (there's no risk of modifying the input as
1493+
# there are no flattened fields), or create one.
14941494
if not isinstance(request, agent.ExportAgentRequest):
14951495
request = agent.ExportAgentRequest(request)
14961496

@@ -1612,10 +1612,8 @@ def sample_restore_agent():
16121612
16131613
"""
16141614
# Create or coerce a protobuf request object.
1615-
# Minor optimization to avoid making a copy if the user passes
1616-
# in a agent.RestoreAgentRequest.
1617-
# There's no risk of modifying the input as we've already verified
1618-
# there are no flattened fields.
1615+
# - Use the request object if provided (there's no risk of modifying the input as
1616+
# there are no flattened fields), or create one.
16191617
if not isinstance(request, agent.RestoreAgentRequest):
16201618
request = agent.RestoreAgentRequest(request)
16211619

@@ -1707,10 +1705,8 @@ def sample_validate_agent():
17071705
17081706
"""
17091707
# Create or coerce a protobuf request object.
1710-
# Minor optimization to avoid making a copy if the user passes
1711-
# in a agent.ValidateAgentRequest.
1712-
# There's no risk of modifying the input as we've already verified
1713-
# there are no flattened fields.
1708+
# - Use the request object if provided (there's no risk of modifying the input as
1709+
# there are no flattened fields), or create one.
17141710
if not isinstance(request, agent.ValidateAgentRequest):
17151711
request = agent.ValidateAgentRequest(request)
17161712

@@ -1800,19 +1796,17 @@ def sample_get_agent_validation_result():
18001796
18011797
"""
18021798
# Create or coerce a protobuf request object.
1803-
# Quick check: If we got a request object, we should *not* have
1804-
# gotten any keyword arguments that map to the request.
1799+
# - Quick check: If we got a request object, we should *not* have
1800+
# gotten any keyword arguments that map to the request.
18051801
has_flattened_params = any([name])
18061802
if request is not None and has_flattened_params:
18071803
raise ValueError(
18081804
"If the `request` argument is set, then none of "
18091805
"the individual field arguments should be set."
18101806
)
18111807

1812-
# Minor optimization to avoid making a copy if the user passes
1813-
# in a agent.GetAgentValidationResultRequest.
1814-
# There's no risk of modifying the input as we've already verified
1815-
# there are no flattened fields.
1808+
# - Use the request object if provided (there's no risk of modifying the input as
1809+
# there are no flattened fields), or create one.
18161810
if not isinstance(request, agent.GetAgentValidationResultRequest):
18171811
request = agent.GetAgentValidationResultRequest(request)
18181812
# If we have keyword arguments corresponding to fields on the
@@ -1915,19 +1909,17 @@ def sample_get_generative_settings():
19151909
Settings for Generative AI.
19161910
"""
19171911
# Create or coerce a protobuf request object.
1918-
# Quick check: If we got a request object, we should *not* have
1919-
# gotten any keyword arguments that map to the request.
1912+
# - Quick check: If we got a request object, we should *not* have
1913+
# gotten any keyword arguments that map to the request.
19201914
has_flattened_params = any([name, language_code])
19211915
if request is not None and has_flattened_params:
19221916
raise ValueError(
19231917
"If the `request` argument is set, then none of "
19241918
"the individual field arguments should be set."
19251919
)
19261920

1927-
# Minor optimization to avoid making a copy if the user passes
1928-
# in a agent.GetGenerativeSettingsRequest.
1929-
# There's no risk of modifying the input as we've already verified
1930-
# there are no flattened fields.
1921+
# - Use the request object if provided (there's no risk of modifying the input as
1922+
# there are no flattened fields), or create one.
19311923
if not isinstance(request, agent.GetGenerativeSettingsRequest):
19321924
request = agent.GetGenerativeSettingsRequest(request)
19331925
# If we have keyword arguments corresponding to fields on the
@@ -2031,19 +2023,17 @@ def sample_update_generative_settings():
20312023
Settings for Generative AI.
20322024
"""
20332025
# Create or coerce a protobuf request object.
2034-
# Quick check: If we got a request object, we should *not* have
2035-
# gotten any keyword arguments that map to the request.
2026+
# - Quick check: If we got a request object, we should *not* have
2027+
# gotten any keyword arguments that map to the request.
20362028
has_flattened_params = any([generative_settings, update_mask])
20372029
if request is not None and has_flattened_params:
20382030
raise ValueError(
20392031
"If the `request` argument is set, then none of "
20402032
"the individual field arguments should be set."
20412033
)
20422034

2043-
# Minor optimization to avoid making a copy if the user passes
2044-
# in a agent.UpdateGenerativeSettingsRequest.
2045-
# There's no risk of modifying the input as we've already verified
2046-
# there are no flattened fields.
2035+
# - Use the request object if provided (there's no risk of modifying the input as
2036+
# there are no flattened fields), or create one.
20472037
if not isinstance(request, agent.UpdateGenerativeSettingsRequest):
20482038
request = agent.UpdateGenerativeSettingsRequest(request)
20492039
# If we have keyword arguments corresponding to fields on the

packages/google-cloud-dialogflow-cx/google/cloud/dialogflowcx_v3/services/agents/transports/grpc.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
credentials: Optional[ga_credentials.Credentials] = None,
5858
credentials_file: Optional[str] = None,
5959
scopes: Optional[Sequence[str]] = None,
60-
channel: Optional[grpc.Channel] = None,
60+
channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
6161
api_mtls_endpoint: Optional[str] = None,
6262
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
6363
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
@@ -77,14 +77,17 @@ def __init__(
7777
credentials identify the application to the service; if none
7878
are specified, the client will attempt to ascertain the
7979
credentials from the environment.
80-
This argument is ignored if ``channel`` is provided.
80+
This argument is ignored if a ``channel`` instance is provided.
8181
credentials_file (Optional[str]): A file with credentials that can
8282
be loaded with :func:`google.auth.load_credentials_from_file`.
83-
This argument is ignored if ``channel`` is provided.
83+
This argument is ignored if a ``channel`` instance is provided.
8484
scopes (Optional(Sequence[str])): A list of scopes. This argument is
85-
ignored if ``channel`` is provided.
86-
channel (Optional[grpc.Channel]): A ``Channel`` instance through
87-
which to make calls.
85+
ignored if a ``channel`` instance is provided.
86+
channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
87+
A ``Channel`` instance through which to make calls, or a Callable
88+
that constructs and returns one. If set to None, ``self.create_channel``
89+
is used to create the channel. If a Callable is given, it will be called
90+
with the same arguments as used in ``self.create_channel``.
8891
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8992
If provided, it overrides the ``host`` argument and tries to create
9093
a mutual TLS channel with client SSL credentials from
@@ -94,11 +97,11 @@ def __init__(
9497
private key bytes, both in PEM format. It is ignored if
9598
``api_mtls_endpoint`` is None.
9699
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
97-
for the grpc channel. It is ignored if ``channel`` is provided.
100+
for the grpc channel. It is ignored if a ``channel`` instance is provided.
98101
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
99102
A callback to provide client certificate bytes and private key bytes,
100103
both in PEM format. It is used to configure a mutual TLS channel. It is
101-
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
104+
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
102105
quota_project_id (Optional[str]): An optional project to use for billing
103106
and quota.
104107
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
@@ -125,7 +128,7 @@ def __init__(
125128
if client_cert_source:
126129
warnings.warn("client_cert_source is deprecated", DeprecationWarning)
127130

128-
if channel:
131+
if isinstance(channel, grpc.Channel):
129132
# Ignore credentials if a channel was passed.
130133
credentials = False
131134
# If a channel was explicitly provided, set it.
@@ -166,7 +169,9 @@ def __init__(
166169
)
167170

168171
if not self._grpc_channel:
169-
self._grpc_channel = type(self).create_channel(
172+
# initialize with the provided callable or the default channel
173+
channel_init = channel or type(self).create_channel
174+
self._grpc_channel = channel_init(
170175
self._host,
171176
# use the credentials which are saved
172177
credentials=self._credentials,

0 commit comments

Comments
 (0)