@@ -422,6 +422,96 @@ def __init__(
422422 api_audience = client_options .api_audience ,
423423 )
424424
425+ def aggregated_list (
426+ self ,
427+ request : Optional [
428+ Union [compute .AggregatedListTargetTcpProxiesRequest , dict ]
429+ ] = None ,
430+ * ,
431+ project : Optional [str ] = None ,
432+ retry : OptionalRetry = gapic_v1 .method .DEFAULT ,
433+ timeout : Optional [float ] = None ,
434+ metadata : Sequence [Tuple [str , str ]] = (),
435+ ) -> pagers .AggregatedListPager :
436+ r"""Retrieves the list of all TargetTcpProxy resources,
437+ regional and global, available to the specified project.
438+
439+ Args:
440+ request (Union[google.cloud.compute_v1.types.AggregatedListTargetTcpProxiesRequest, dict]):
441+ The request object. A request message for
442+ TargetTcpProxies.AggregatedList. See the method
443+ description for details.
444+ project (str):
445+ Name of the project scoping this
446+ request.
447+
448+ This corresponds to the ``project`` field
449+ on the ``request`` instance; if ``request`` is provided, this
450+ should not be set.
451+ retry (google.api_core.retry.Retry): Designation of what errors, if any,
452+ should be retried.
453+ timeout (float): The timeout for this request.
454+ metadata (Sequence[Tuple[str, str]]): Strings which should be
455+ sent along with the request as metadata.
456+
457+ Returns:
458+ google.cloud.compute_v1.services.target_tcp_proxies.pagers.AggregatedListPager:
459+ Iterating over this object will yield
460+ results and resolve additional pages
461+ automatically.
462+
463+ """
464+ # Create or coerce a protobuf request object.
465+ # Quick check: If we got a request object, we should *not* have
466+ # gotten any keyword arguments that map to the request.
467+ has_flattened_params = any ([project ])
468+ if request is not None and has_flattened_params :
469+ raise ValueError (
470+ "If the `request` argument is set, then none of "
471+ "the individual field arguments should be set."
472+ )
473+
474+ # Minor optimization to avoid making a copy if the user passes
475+ # in a compute.AggregatedListTargetTcpProxiesRequest.
476+ # There's no risk of modifying the input as we've already verified
477+ # there are no flattened fields.
478+ if not isinstance (request , compute .AggregatedListTargetTcpProxiesRequest ):
479+ request = compute .AggregatedListTargetTcpProxiesRequest (request )
480+ # If we have keyword arguments corresponding to fields on the
481+ # request, apply these.
482+ if project is not None :
483+ request .project = project
484+
485+ # Wrap the RPC method; this adds retry and timeout information,
486+ # and friendly error handling.
487+ rpc = self ._transport ._wrapped_methods [self ._transport .aggregated_list ]
488+
489+ # Certain fields should be provided within the metadata header;
490+ # add these here.
491+ metadata = tuple (metadata ) + (
492+ gapic_v1 .routing_header .to_grpc_metadata ((("project" , request .project ),)),
493+ )
494+
495+ # Send the request.
496+ response = rpc (
497+ request ,
498+ retry = retry ,
499+ timeout = timeout ,
500+ metadata = metadata ,
501+ )
502+
503+ # This method is paged; wrap the response in a pager, which provides
504+ # an `__iter__` convenience method.
505+ response = pagers .AggregatedListPager (
506+ method = rpc ,
507+ request = request ,
508+ response = response ,
509+ metadata = metadata ,
510+ )
511+
512+ # Done; return the response.
513+ return response
514+
425515 def delete_unary (
426516 self ,
427517 request : Optional [Union [compute .DeleteTargetTcpProxyRequest , dict ]] = None ,
0 commit comments