Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 3a356c9

Browse files
fix(deps): require google-api-core>=1.32.0,>=2.8.0 (#405)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 459095142 Source-Link: googleapis/googleapis@4f1be99 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ae686d9cde4fc3e36d0ac02efb8643b15890c1ed Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWU2ODZkOWNkZTRmYzNlMzZkMGFjMDJlZmI4NjQzYjE1ODkwYzFlZCJ9 docs: improve comments for protos PiperOrigin-RevId: 458250124 Source-Link: googleapis/googleapis@913b9bd Source-Link: https://github.com/googleapis/googleapis-gen/commit/5601594f1cdf45d9df26f245604c333e3ff3838d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTYwMTU5NGYxY2RmNDVkOWRmMjZmMjQ1NjA0YzMzM2UzZmYzODM4ZCJ9 docs: clarify descriptions of the AdvancedSettings and WebhookRequest data types PiperOrigin-RevId: 458000126 Source-Link: googleapis/googleapis@c425ac6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b0446dbaba086f1bf64d976b180d6ab6f338eb6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWIwNDQ2ZGJhYmEwODZmMWJmNjRkOTc2YjE4MGQ2YWI2ZjMzOGViNiJ9 feat: add audience parameter PiperOrigin-RevId: 456827138 Source-Link: googleapis/googleapis@23f1a15 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4075a8514f676691ec156688a5bbf183aa9893ce Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDA3NWE4NTE0ZjY3NjY5MWVjMTU2Njg4YTViYmYxODNhYTk4OTNjZSJ9 feat(v3): added webhook_config The webhook_config field was added to the Environment resource to support environment-level webhook overrides as a preview feature. Support for the Google Cloud Locations API has also been added. PiperOrigin-RevId: 454733966 Source-Link: googleapis/googleapis@d5d0f8d Source-Link: https://github.com/googleapis/googleapis-gen/commit/e5a3716cdc1c858af2cecb9c83b93accd8ea5f82 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTVhMzcxNmNkYzFjODU4YWYyY2VjYjljODNiOTNhY2NkOGVhNWY4MiJ9 feat(v3beta1): added webhook_config The webhook_config field was added to the Environment resource to support environment-level webhook overrides as a preview feature. Support for the Google Cloud Locations API has also been added. PiperOrigin-RevId: 454731805 Source-Link: googleapis/googleapis@585fa8c Source-Link: https://github.com/googleapis/googleapis-gen/commit/e8aee07fd3945431d5ac4dd2bd4b4e8dfa6e2c2d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZThhZWUwN2ZkMzk0NTQzMWQ1YWM0ZGQyYmQ0YjRlOGRmYTZlMmMyZCJ9
1 parent 4d264d9 commit 3a356c9

File tree

206 files changed

+50507
-259
lines changed

Some content is hidden

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

206 files changed

+50507
-259
lines changed

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- name: Report coverage results
5555
run: |
5656
coverage combine .coverage-results/.coverage*
57-
coverage report --show-missing --fail-under=100
57+
coverage report --show-missing --fail-under=99

google/cloud/dialogflowcx_v3/services/agents/async_client.py

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
from google.cloud.dialogflowcx_v3.types import agent
3939
from google.cloud.dialogflowcx_v3.types import agent as gcdc_agent
4040
from google.cloud.dialogflowcx_v3.types import flow
41+
from google.cloud.location import locations_pb2 # type: ignore
42+
from google.longrunning import operations_pb2
4143
from google.protobuf import empty_pb2 # type: ignore
4244
from google.protobuf import field_mask_pb2 # type: ignore
4345
from google.protobuf import struct_pb2 # type: ignore
@@ -1157,6 +1159,276 @@ async def sample_get_agent_validation_result():
11571159
# Done; return the response.
11581160
return response
11591161

1162+
async def list_operations(
1163+
self,
1164+
request: operations_pb2.ListOperationsRequest = None,
1165+
*,
1166+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1167+
timeout: float = None,
1168+
metadata: Sequence[Tuple[str, str]] = (),
1169+
) -> operations_pb2.ListOperationsResponse:
1170+
r"""Lists operations that match the specified filter in the request.
1171+
1172+
Args:
1173+
request (:class:`~.operations_pb2.ListOperationsRequest`):
1174+
The request object. Request message for
1175+
`ListOperations` method.
1176+
retry (google.api_core.retry.Retry): Designation of what errors,
1177+
if any, should be retried.
1178+
timeout (float): The timeout for this request.
1179+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1180+
sent along with the request as metadata.
1181+
Returns:
1182+
~.operations_pb2.ListOperationsResponse:
1183+
Response message for ``ListOperations`` method.
1184+
"""
1185+
# Create or coerce a protobuf request object.
1186+
# The request isn't a proto-plus wrapped type,
1187+
# so it must be constructed via keyword expansion.
1188+
if isinstance(request, dict):
1189+
request = operations_pb2.ListOperationsRequest(**request)
1190+
1191+
# Wrap the RPC method; this adds retry and timeout information,
1192+
# and friendly error handling.
1193+
rpc = gapic_v1.method.wrap_method(
1194+
self._client._transport.list_operations,
1195+
default_timeout=None,
1196+
client_info=DEFAULT_CLIENT_INFO,
1197+
)
1198+
1199+
# Certain fields should be provided within the metadata header;
1200+
# add these here.
1201+
metadata = tuple(metadata) + (
1202+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1203+
)
1204+
1205+
# Send the request.
1206+
response = await rpc(
1207+
request,
1208+
retry=retry,
1209+
timeout=timeout,
1210+
metadata=metadata,
1211+
)
1212+
1213+
# Done; return the response.
1214+
return response
1215+
1216+
async def get_operation(
1217+
self,
1218+
request: operations_pb2.GetOperationRequest = None,
1219+
*,
1220+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1221+
timeout: float = None,
1222+
metadata: Sequence[Tuple[str, str]] = (),
1223+
) -> operations_pb2.Operation:
1224+
r"""Gets the latest state of a long-running operation.
1225+
1226+
Args:
1227+
request (:class:`~.operations_pb2.GetOperationRequest`):
1228+
The request object. Request message for
1229+
`GetOperation` method.
1230+
retry (google.api_core.retry.Retry): Designation of what errors,
1231+
if any, should be retried.
1232+
timeout (float): The timeout for this request.
1233+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1234+
sent along with the request as metadata.
1235+
Returns:
1236+
~.operations_pb2.Operation:
1237+
An ``Operation`` object.
1238+
"""
1239+
# Create or coerce a protobuf request object.
1240+
# The request isn't a proto-plus wrapped type,
1241+
# so it must be constructed via keyword expansion.
1242+
if isinstance(request, dict):
1243+
request = operations_pb2.GetOperationRequest(**request)
1244+
1245+
# Wrap the RPC method; this adds retry and timeout information,
1246+
# and friendly error handling.
1247+
rpc = gapic_v1.method.wrap_method(
1248+
self._client._transport.get_operation,
1249+
default_timeout=None,
1250+
client_info=DEFAULT_CLIENT_INFO,
1251+
)
1252+
1253+
# Certain fields should be provided within the metadata header;
1254+
# add these here.
1255+
metadata = tuple(metadata) + (
1256+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1257+
)
1258+
1259+
# Send the request.
1260+
response = await rpc(
1261+
request,
1262+
retry=retry,
1263+
timeout=timeout,
1264+
metadata=metadata,
1265+
)
1266+
1267+
# Done; return the response.
1268+
return response
1269+
1270+
async def cancel_operation(
1271+
self,
1272+
request: operations_pb2.CancelOperationRequest = None,
1273+
*,
1274+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1275+
timeout: float = None,
1276+
metadata: Sequence[Tuple[str, str]] = (),
1277+
) -> None:
1278+
r"""Starts asynchronous cancellation on a long-running operation.
1279+
1280+
The server makes a best effort to cancel the operation, but success
1281+
is not guaranteed. If the server doesn't support this method, it returns
1282+
`google.rpc.Code.UNIMPLEMENTED`.
1283+
1284+
Args:
1285+
request (:class:`~.operations_pb2.CancelOperationRequest`):
1286+
The request object. Request message for
1287+
`CancelOperation` method.
1288+
retry (google.api_core.retry.Retry): Designation of what errors,
1289+
if any, should be retried.
1290+
timeout (float): The timeout for this request.
1291+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1292+
sent along with the request as metadata.
1293+
Returns:
1294+
None
1295+
"""
1296+
# Create or coerce a protobuf request object.
1297+
# The request isn't a proto-plus wrapped type,
1298+
# so it must be constructed via keyword expansion.
1299+
if isinstance(request, dict):
1300+
request = operations_pb2.CancelOperationRequest(**request)
1301+
1302+
# Wrap the RPC method; this adds retry and timeout information,
1303+
# and friendly error handling.
1304+
rpc = gapic_v1.method.wrap_method(
1305+
self._client._transport.cancel_operation,
1306+
default_timeout=None,
1307+
client_info=DEFAULT_CLIENT_INFO,
1308+
)
1309+
1310+
# Certain fields should be provided within the metadata header;
1311+
# add these here.
1312+
metadata = tuple(metadata) + (
1313+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1314+
)
1315+
1316+
# Send the request.
1317+
await rpc(
1318+
request,
1319+
retry=retry,
1320+
timeout=timeout,
1321+
metadata=metadata,
1322+
)
1323+
1324+
async def get_location(
1325+
self,
1326+
request: locations_pb2.GetLocationRequest = None,
1327+
*,
1328+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1329+
timeout: float = None,
1330+
metadata: Sequence[Tuple[str, str]] = (),
1331+
) -> locations_pb2.Location:
1332+
r"""Gets information about a location.
1333+
1334+
Args:
1335+
request (:class:`~.location_pb2.GetLocationRequest`):
1336+
The request object. Request message for
1337+
`GetLocation` method.
1338+
retry (google.api_core.retry.Retry): Designation of what errors,
1339+
if any, should be retried.
1340+
timeout (float): The timeout for this request.
1341+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1342+
sent along with the request as metadata.
1343+
Returns:
1344+
~.location_pb2.Location:
1345+
Location object.
1346+
"""
1347+
# Create or coerce a protobuf request object.
1348+
# The request isn't a proto-plus wrapped type,
1349+
# so it must be constructed via keyword expansion.
1350+
if isinstance(request, dict):
1351+
request = locations_pb2.GetLocationRequest(**request)
1352+
1353+
# Wrap the RPC method; this adds retry and timeout information,
1354+
# and friendly error handling.
1355+
rpc = gapic_v1.method.wrap_method(
1356+
self._client._transport.get_location,
1357+
default_timeout=None,
1358+
client_info=DEFAULT_CLIENT_INFO,
1359+
)
1360+
1361+
# Certain fields should be provided within the metadata header;
1362+
# add these here.
1363+
metadata = tuple(metadata) + (
1364+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1365+
)
1366+
1367+
# Send the request.
1368+
response = await rpc(
1369+
request,
1370+
retry=retry,
1371+
timeout=timeout,
1372+
metadata=metadata,
1373+
)
1374+
1375+
# Done; return the response.
1376+
return response
1377+
1378+
async def list_locations(
1379+
self,
1380+
request: locations_pb2.ListLocationsRequest = None,
1381+
*,
1382+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1383+
timeout: float = None,
1384+
metadata: Sequence[Tuple[str, str]] = (),
1385+
) -> locations_pb2.ListLocationsResponse:
1386+
r"""Lists information about the supported locations for this service.
1387+
1388+
Args:
1389+
request (:class:`~.location_pb2.ListLocationsRequest`):
1390+
The request object. Request message for
1391+
`ListLocations` method.
1392+
retry (google.api_core.retry.Retry): Designation of what errors,
1393+
if any, should be retried.
1394+
timeout (float): The timeout for this request.
1395+
metadata (Sequence[Tuple[str, str]]): Strings which should be
1396+
sent along with the request as metadata.
1397+
Returns:
1398+
~.location_pb2.ListLocationsResponse:
1399+
Response message for ``ListLocations`` method.
1400+
"""
1401+
# Create or coerce a protobuf request object.
1402+
# The request isn't a proto-plus wrapped type,
1403+
# so it must be constructed via keyword expansion.
1404+
if isinstance(request, dict):
1405+
request = locations_pb2.ListLocationsRequest(**request)
1406+
1407+
# Wrap the RPC method; this adds retry and timeout information,
1408+
# and friendly error handling.
1409+
rpc = gapic_v1.method.wrap_method(
1410+
self._client._transport.list_locations,
1411+
default_timeout=None,
1412+
client_info=DEFAULT_CLIENT_INFO,
1413+
)
1414+
1415+
# Certain fields should be provided within the metadata header;
1416+
# add these here.
1417+
metadata = tuple(metadata) + (
1418+
gapic_v1.routing_header.to_grpc_metadata((("name", request.name),)),
1419+
)
1420+
1421+
# Send the request.
1422+
response = await rpc(
1423+
request,
1424+
retry=retry,
1425+
timeout=timeout,
1426+
metadata=metadata,
1427+
)
1428+
1429+
# Done; return the response.
1430+
return response
1431+
11601432
async def __aenter__(self):
11611433
return self
11621434

0 commit comments

Comments
 (0)