Class NetworkServicesClient

java.lang.Object
com.google.cloud.networkservices.v1.NetworkServicesClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class NetworkServicesClient extends Object implements BackgroundResource
Service Description: Service describing handlers for resources.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
   EndpointPolicyName name =
       EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]");
   EndpointPolicy response = networkServicesClient.getEndpointPolicy(name);
 }
 

Note: close() needs to be called on the NetworkServicesClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListEndpointPolicies

Lists EndpointPolicies in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listEndpointPolicies(ListEndpointPoliciesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listEndpointPolicies(LocationName parent)

  • listEndpointPolicies(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listEndpointPoliciesPagedCallable()

  • listEndpointPoliciesCallable()

GetEndpointPolicy

Gets details of a single EndpointPolicy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getEndpointPolicy(GetEndpointPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getEndpointPolicy(EndpointPolicyName name)

  • getEndpointPolicy(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getEndpointPolicyCallable()

CreateEndpointPolicy

Creates a new EndpointPolicy in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createEndpointPolicyAsync(CreateEndpointPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId)

  • createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createEndpointPolicyOperationCallable()

  • createEndpointPolicyCallable()

UpdateEndpointPolicy

Updates the parameters of a single EndpointPolicy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateEndpointPolicyAsync(UpdateEndpointPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateEndpointPolicyAsync(EndpointPolicy endpointPolicy, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateEndpointPolicyOperationCallable()

  • updateEndpointPolicyCallable()

DeleteEndpointPolicy

Deletes a single EndpointPolicy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteEndpointPolicyAsync(EndpointPolicyName name)

  • deleteEndpointPolicyAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteEndpointPolicyOperationCallable()

  • deleteEndpointPolicyCallable()

ListWasmPluginVersions

Lists `WasmPluginVersion` resources in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listWasmPluginVersions(ListWasmPluginVersionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listWasmPluginVersions(WasmPluginName parent)

  • listWasmPluginVersions(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listWasmPluginVersionsPagedCallable()

  • listWasmPluginVersionsCallable()

GetWasmPluginVersion

Gets details of the specified `WasmPluginVersion` resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getWasmPluginVersion(GetWasmPluginVersionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getWasmPluginVersion(WasmPluginVersionName name)

  • getWasmPluginVersion(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getWasmPluginVersionCallable()

CreateWasmPluginVersion

Creates a new `WasmPluginVersion` resource in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createWasmPluginVersionAsync(CreateWasmPluginVersionRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createWasmPluginVersionAsync(WasmPluginName parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId)

  • createWasmPluginVersionAsync(String parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createWasmPluginVersionOperationCallable()

  • createWasmPluginVersionCallable()

DeleteWasmPluginVersion

Deletes the specified `WasmPluginVersion` resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteWasmPluginVersionAsync(DeleteWasmPluginVersionRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteWasmPluginVersionAsync(WasmPluginVersionName name)

  • deleteWasmPluginVersionAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteWasmPluginVersionOperationCallable()

  • deleteWasmPluginVersionCallable()

ListWasmPlugins

Lists `WasmPlugin` resources in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listWasmPlugins(ListWasmPluginsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listWasmPlugins(LocationName parent)

  • listWasmPlugins(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listWasmPluginsPagedCallable()

  • listWasmPluginsCallable()

GetWasmPlugin

Gets details of the specified `WasmPlugin` resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getWasmPlugin(GetWasmPluginRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getWasmPlugin(WasmPluginName name)

  • getWasmPlugin(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getWasmPluginCallable()

CreateWasmPlugin

Creates a new `WasmPlugin` resource in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createWasmPluginAsync(CreateWasmPluginRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createWasmPluginAsync(LocationName parent, WasmPlugin wasmPlugin, String wasmPluginId)

  • createWasmPluginAsync(String parent, WasmPlugin wasmPlugin, String wasmPluginId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createWasmPluginOperationCallable()

  • createWasmPluginCallable()

UpdateWasmPlugin

Updates the parameters of the specified `WasmPlugin` resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateWasmPluginAsync(UpdateWasmPluginRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateWasmPluginAsync(WasmPlugin wasmPlugin, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateWasmPluginOperationCallable()

  • updateWasmPluginCallable()

DeleteWasmPlugin

Deletes the specified `WasmPlugin` resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteWasmPluginAsync(DeleteWasmPluginRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteWasmPluginAsync(WasmPluginName name)

  • deleteWasmPluginAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteWasmPluginOperationCallable()

  • deleteWasmPluginCallable()

ListGateways

Lists Gateways in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listGateways(ListGatewaysRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listGateways(LocationName parent)

  • listGateways(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listGatewaysPagedCallable()

  • listGatewaysCallable()

GetGateway

Gets details of a single Gateway.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getGateway(GetGatewayRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getGateway(GatewayName name)

  • getGateway(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getGatewayCallable()

CreateGateway

Creates a new Gateway in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createGatewayAsync(CreateGatewayRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)

  • createGatewayAsync(String parent, Gateway gateway, String gatewayId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createGatewayOperationCallable()

  • createGatewayCallable()

UpdateGateway

Updates the parameters of a single Gateway.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateGatewayAsync(UpdateGatewayRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateGatewayAsync(Gateway gateway, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateGatewayOperationCallable()

  • updateGatewayCallable()

DeleteGateway

Deletes a single Gateway.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteGatewayAsync(DeleteGatewayRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteGatewayAsync(GatewayName name)

  • deleteGatewayAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteGatewayOperationCallable()

  • deleteGatewayCallable()

ListGrpcRoutes

Lists GrpcRoutes in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listGrpcRoutes(ListGrpcRoutesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listGrpcRoutes(LocationName parent)

  • listGrpcRoutes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listGrpcRoutesPagedCallable()

  • listGrpcRoutesCallable()

GetGrpcRoute

Gets details of a single GrpcRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getGrpcRoute(GetGrpcRouteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getGrpcRoute(GrpcRouteName name)

  • getGrpcRoute(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getGrpcRouteCallable()

CreateGrpcRoute

Creates a new GrpcRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createGrpcRouteAsync(CreateGrpcRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId)

  • createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createGrpcRouteOperationCallable()

  • createGrpcRouteCallable()

UpdateGrpcRoute

Updates the parameters of a single GrpcRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateGrpcRouteAsync(UpdateGrpcRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateGrpcRouteAsync(GrpcRoute grpcRoute, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateGrpcRouteOperationCallable()

  • updateGrpcRouteCallable()

DeleteGrpcRoute

Deletes a single GrpcRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteGrpcRouteAsync(DeleteGrpcRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteGrpcRouteAsync(GrpcRouteName name)

  • deleteGrpcRouteAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteGrpcRouteOperationCallable()

  • deleteGrpcRouteCallable()

ListHttpRoutes

Lists HttpRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listHttpRoutes(ListHttpRoutesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listHttpRoutes(LocationName parent)

  • listHttpRoutes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listHttpRoutesPagedCallable()

  • listHttpRoutesCallable()

GetHttpRoute

Gets details of a single HttpRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getHttpRoute(GetHttpRouteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getHttpRoute(HttpRouteName name)

  • getHttpRoute(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getHttpRouteCallable()

CreateHttpRoute

Creates a new HttpRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createHttpRouteAsync(CreateHttpRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId)

  • createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createHttpRouteOperationCallable()

  • createHttpRouteCallable()

UpdateHttpRoute

Updates the parameters of a single HttpRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateHttpRouteAsync(UpdateHttpRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateHttpRouteAsync(HttpRoute httpRoute, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateHttpRouteOperationCallable()

  • updateHttpRouteCallable()

DeleteHttpRoute

Deletes a single HttpRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteHttpRouteAsync(DeleteHttpRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteHttpRouteAsync(HttpRouteName name)

  • deleteHttpRouteAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteHttpRouteOperationCallable()

  • deleteHttpRouteCallable()

ListTcpRoutes

Lists TcpRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listTcpRoutes(ListTcpRoutesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listTcpRoutes(LocationName parent)

  • listTcpRoutes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listTcpRoutesPagedCallable()

  • listTcpRoutesCallable()

GetTcpRoute

Gets details of a single TcpRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getTcpRoute(GetTcpRouteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getTcpRoute(TcpRouteName name)

  • getTcpRoute(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getTcpRouteCallable()

CreateTcpRoute

Creates a new TcpRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createTcpRouteAsync(CreateTcpRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId)

  • createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createTcpRouteOperationCallable()

  • createTcpRouteCallable()

UpdateTcpRoute

Updates the parameters of a single TcpRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateTcpRouteAsync(UpdateTcpRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateTcpRouteAsync(TcpRoute tcpRoute, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateTcpRouteOperationCallable()

  • updateTcpRouteCallable()

DeleteTcpRoute

Deletes a single TcpRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteTcpRouteAsync(DeleteTcpRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteTcpRouteAsync(TcpRouteName name)

  • deleteTcpRouteAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteTcpRouteOperationCallable()

  • deleteTcpRouteCallable()

ListTlsRoutes

Lists TlsRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listTlsRoutes(ListTlsRoutesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listTlsRoutes(LocationName parent)

  • listTlsRoutes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listTlsRoutesPagedCallable()

  • listTlsRoutesCallable()

GetTlsRoute

Gets details of a single TlsRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getTlsRoute(GetTlsRouteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getTlsRoute(TlsRouteName name)

  • getTlsRoute(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getTlsRouteCallable()

CreateTlsRoute

Creates a new TlsRoute in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createTlsRouteAsync(CreateTlsRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId)

  • createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createTlsRouteOperationCallable()

  • createTlsRouteCallable()

UpdateTlsRoute

Updates the parameters of a single TlsRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateTlsRouteAsync(UpdateTlsRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateTlsRouteAsync(TlsRoute tlsRoute, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateTlsRouteOperationCallable()

  • updateTlsRouteCallable()

DeleteTlsRoute

Deletes a single TlsRoute.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteTlsRouteAsync(DeleteTlsRouteRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteTlsRouteAsync(TlsRouteName name)

  • deleteTlsRouteAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteTlsRouteOperationCallable()

  • deleteTlsRouteCallable()

ListServiceBindings

Lists ServiceBinding in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listServiceBindings(ListServiceBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listServiceBindings(LocationName parent)

  • listServiceBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listServiceBindingsPagedCallable()

  • listServiceBindingsCallable()

GetServiceBinding

Gets details of a single ServiceBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getServiceBinding(GetServiceBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getServiceBinding(ServiceBindingName name)

  • getServiceBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getServiceBindingCallable()

CreateServiceBinding

Creates a new ServiceBinding in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createServiceBindingAsync(CreateServiceBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId)

  • createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createServiceBindingOperationCallable()

  • createServiceBindingCallable()

UpdateServiceBinding

Updates the parameters of a single ServiceBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateServiceBindingAsync(UpdateServiceBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateServiceBindingAsync(ServiceBinding serviceBinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateServiceBindingOperationCallable()

  • updateServiceBindingCallable()

DeleteServiceBinding

Deletes a single ServiceBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteServiceBindingAsync(DeleteServiceBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteServiceBindingAsync(ServiceBindingName name)

  • deleteServiceBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteServiceBindingOperationCallable()

  • deleteServiceBindingCallable()

ListMeshes

Lists Meshes in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMeshes(ListMeshesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMeshes(LocationName parent)

  • listMeshes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMeshesPagedCallable()

  • listMeshesCallable()

GetMesh

Gets details of a single Mesh.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMesh(GetMeshRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMesh(MeshName name)

  • getMesh(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMeshCallable()

CreateMesh

Creates a new Mesh in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMeshAsync(CreateMeshRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createMeshAsync(LocationName parent, Mesh mesh, String meshId)

  • createMeshAsync(String parent, Mesh mesh, String meshId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMeshOperationCallable()

  • createMeshCallable()

UpdateMesh

Updates the parameters of a single Mesh.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMeshAsync(UpdateMeshRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateMeshAsync(Mesh mesh, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMeshOperationCallable()

  • updateMeshCallable()

DeleteMesh

Deletes a single Mesh.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMeshAsync(DeleteMeshRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteMeshAsync(MeshName name)

  • deleteMeshAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMeshOperationCallable()

  • deleteMeshCallable()

ListServiceLbPolicies

Lists ServiceLbPolicies in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listServiceLbPolicies(ListServiceLbPoliciesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listServiceLbPolicies(LocationName parent)

  • listServiceLbPolicies(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listServiceLbPoliciesPagedCallable()

  • listServiceLbPoliciesCallable()

GetServiceLbPolicy

Gets details of a single ServiceLbPolicy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getServiceLbPolicy(GetServiceLbPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getServiceLbPolicy(ServiceLbPolicyName name)

  • getServiceLbPolicy(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getServiceLbPolicyCallable()

CreateServiceLbPolicy

Creates a new ServiceLbPolicy in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createServiceLbPolicyAsync(CreateServiceLbPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createServiceLbPolicyAsync(LocationName parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId)

  • createServiceLbPolicyAsync(String parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createServiceLbPolicyOperationCallable()

  • createServiceLbPolicyCallable()

UpdateServiceLbPolicy

Updates the parameters of a single ServiceLbPolicy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateServiceLbPolicyAsync(UpdateServiceLbPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateServiceLbPolicyAsync(ServiceLbPolicy serviceLbPolicy, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateServiceLbPolicyOperationCallable()

  • updateServiceLbPolicyCallable()

DeleteServiceLbPolicy

Deletes a single ServiceLbPolicy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteServiceLbPolicyAsync(DeleteServiceLbPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteServiceLbPolicyAsync(ServiceLbPolicyName name)

  • deleteServiceLbPolicyAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteServiceLbPolicyOperationCallable()

  • deleteServiceLbPolicyCallable()

GetGatewayRouteView

Get a single RouteView of a Gateway.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getGatewayRouteView(GetGatewayRouteViewRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getGatewayRouteView(GatewayRouteViewName name)

  • getGatewayRouteView(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getGatewayRouteViewCallable()

GetMeshRouteView

Get a single RouteView of a Mesh.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMeshRouteView(GetMeshRouteViewRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMeshRouteView(MeshRouteViewName name)

  • getMeshRouteView(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMeshRouteViewCallable()

ListGatewayRouteViews

Lists RouteViews

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listGatewayRouteViews(ListGatewayRouteViewsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listGatewayRouteViews(GatewayName parent)

  • listGatewayRouteViews(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listGatewayRouteViewsPagedCallable()

  • listGatewayRouteViewsCallable()

ListMeshRouteViews

Lists RouteViews

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMeshRouteViews(ListMeshRouteViewsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMeshRouteViews(MeshName parent)

  • listMeshRouteViews(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMeshRouteViewsPagedCallable()

  • listMeshRouteViewsCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of NetworkServicesSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 NetworkServicesSettings networkServicesSettings =
     NetworkServicesSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 NetworkServicesClient networkServicesClient =
     NetworkServicesClient.create(networkServicesSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 NetworkServicesSettings networkServicesSettings =
     NetworkServicesSettings.newBuilder().setEndpoint(myEndpoint).build();
 NetworkServicesClient networkServicesClient =
     NetworkServicesClient.create(networkServicesSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 NetworkServicesSettings networkServicesSettings =
     NetworkServicesSettings.newHttpJsonBuilder().build();
 NetworkServicesClient networkServicesClient =
     NetworkServicesClient.create(networkServicesSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • NetworkServicesClient

      protected NetworkServicesClient(NetworkServicesSettings settings) throws IOException
      Constructs an instance of NetworkServicesClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
      Throws:
      IOException
    • NetworkServicesClient

      protected NetworkServicesClient(NetworkServicesStub stub)
  • Method Details

    • create

      public static final NetworkServicesClient create() throws IOException
      Constructs an instance of NetworkServicesClient with default settings.
      Throws:
      IOException
    • create

      public static final NetworkServicesClient create(NetworkServicesSettings settings) throws IOException
      Constructs an instance of NetworkServicesClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      public static final NetworkServicesClient create(NetworkServicesStub stub)
      Constructs an instance of NetworkServicesClient, using the given stub for making calls. This is for advanced usage - prefer using create(NetworkServicesSettings).
    • getSettings

      public final NetworkServicesSettings getSettings()
    • getStub

      public NetworkServicesStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listEndpointPolicies

      public final NetworkServicesClient.ListEndpointPoliciesPagedResponse listEndpointPolicies(LocationName parent)
      Lists EndpointPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (EndpointPolicy element :
             networkServicesClient.listEndpointPolicies(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listEndpointPolicies

      public final NetworkServicesClient.ListEndpointPoliciesPagedResponse listEndpointPolicies(String parent)
      Lists EndpointPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (EndpointPolicy element :
             networkServicesClient.listEndpointPolicies(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listEndpointPolicies

      Lists EndpointPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListEndpointPoliciesRequest request =
             ListEndpointPoliciesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         for (EndpointPolicy element :
             networkServicesClient.listEndpointPolicies(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listEndpointPoliciesPagedCallable

      Lists EndpointPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListEndpointPoliciesRequest request =
             ListEndpointPoliciesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<EndpointPolicy> future =
             networkServicesClient.listEndpointPoliciesPagedCallable().futureCall(request);
         // Do something.
         for (EndpointPolicy element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEndpointPoliciesCallable

      public final UnaryCallable<ListEndpointPoliciesRequest,ListEndpointPoliciesResponse> listEndpointPoliciesCallable()
      Lists EndpointPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListEndpointPoliciesRequest request =
             ListEndpointPoliciesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListEndpointPoliciesResponse response =
               networkServicesClient.listEndpointPoliciesCallable().call(request);
           for (EndpointPolicy element : response.getEndpointPoliciesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getEndpointPolicy

      public final EndpointPolicy getEndpointPolicy(EndpointPolicyName name)
      Gets details of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         EndpointPolicyName name =
             EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]");
         EndpointPolicy response = networkServicesClient.getEndpointPolicy(name);
       }
       
      Parameters:
      name - Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • getEndpointPolicy

      public final EndpointPolicy getEndpointPolicy(String name)
      Gets details of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString();
         EndpointPolicy response = networkServicesClient.getEndpointPolicy(name);
       }
       
      Parameters:
      name - Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • getEndpointPolicy

      public final EndpointPolicy getEndpointPolicy(GetEndpointPolicyRequest request)
      Gets details of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetEndpointPolicyRequest request =
             GetEndpointPolicyRequest.newBuilder()
                 .setName(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .build();
         EndpointPolicy response = networkServicesClient.getEndpointPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getEndpointPolicyCallable

      public final UnaryCallable<GetEndpointPolicyRequest,EndpointPolicy> getEndpointPolicyCallable()
      Gets details of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetEndpointPolicyRequest request =
             GetEndpointPolicyRequest.newBuilder()
                 .setName(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .build();
         ApiFuture<EndpointPolicy> future =
             networkServicesClient.getEndpointPolicyCallable().futureCall(request);
         // Do something.
         EndpointPolicy response = future.get();
       }
       
    • createEndpointPolicyAsync

      public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId)
      Creates a new EndpointPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
         String endpointPolicyId = "endpointPolicyId-509458782";
         EndpointPolicy response =
             networkServicesClient
                 .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.
      endpointPolicy - Required. EndpointPolicy resource to be created.
      endpointPolicyId - Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".
      Throws:
      ApiException - if the remote call fails
    • createEndpointPolicyAsync

      public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId)
      Creates a new EndpointPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
         String endpointPolicyId = "endpointPolicyId-509458782";
         EndpointPolicy response =
             networkServicesClient
                 .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.
      endpointPolicy - Required. EndpointPolicy resource to be created.
      endpointPolicyId - Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".
      Throws:
      ApiException - if the remote call fails
    • createEndpointPolicyAsync

      public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(CreateEndpointPolicyRequest request)
      Creates a new EndpointPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateEndpointPolicyRequest request =
             CreateEndpointPolicyRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setEndpointPolicyId("endpointPolicyId-509458782")
                 .setEndpointPolicy(EndpointPolicy.newBuilder().build())
                 .build();
         EndpointPolicy response = networkServicesClient.createEndpointPolicyAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createEndpointPolicyOperationCallable

      public final OperationCallable<CreateEndpointPolicyRequest,EndpointPolicy,OperationMetadata> createEndpointPolicyOperationCallable()
      Creates a new EndpointPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateEndpointPolicyRequest request =
             CreateEndpointPolicyRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setEndpointPolicyId("endpointPolicyId-509458782")
                 .setEndpointPolicy(EndpointPolicy.newBuilder().build())
                 .build();
         OperationFuture<EndpointPolicy, OperationMetadata> future =
             networkServicesClient.createEndpointPolicyOperationCallable().futureCall(request);
         // Do something.
         EndpointPolicy response = future.get();
       }
       
    • createEndpointPolicyCallable

      public final UnaryCallable<CreateEndpointPolicyRequest,Operation> createEndpointPolicyCallable()
      Creates a new EndpointPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateEndpointPolicyRequest request =
             CreateEndpointPolicyRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setEndpointPolicyId("endpointPolicyId-509458782")
                 .setEndpointPolicy(EndpointPolicy.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createEndpointPolicyCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateEndpointPolicyAsync

      public final OperationFuture<EndpointPolicy,OperationMetadata> updateEndpointPolicyAsync(EndpointPolicy endpointPolicy, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         EndpointPolicy response =
             networkServicesClient.updateEndpointPolicyAsync(endpointPolicy, updateMask).get();
       }
       
      Parameters:
      endpointPolicy - Required. Updated EndpointPolicy resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateEndpointPolicyAsync

      public final OperationFuture<EndpointPolicy,OperationMetadata> updateEndpointPolicyAsync(UpdateEndpointPolicyRequest request)
      Updates the parameters of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateEndpointPolicyRequest request =
             UpdateEndpointPolicyRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setEndpointPolicy(EndpointPolicy.newBuilder().build())
                 .build();
         EndpointPolicy response = networkServicesClient.updateEndpointPolicyAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateEndpointPolicyOperationCallable

      public final OperationCallable<UpdateEndpointPolicyRequest,EndpointPolicy,OperationMetadata> updateEndpointPolicyOperationCallable()
      Updates the parameters of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateEndpointPolicyRequest request =
             UpdateEndpointPolicyRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setEndpointPolicy(EndpointPolicy.newBuilder().build())
                 .build();
         OperationFuture<EndpointPolicy, OperationMetadata> future =
             networkServicesClient.updateEndpointPolicyOperationCallable().futureCall(request);
         // Do something.
         EndpointPolicy response = future.get();
       }
       
    • updateEndpointPolicyCallable

      public final UnaryCallable<UpdateEndpointPolicyRequest,Operation> updateEndpointPolicyCallable()
      Updates the parameters of a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateEndpointPolicyRequest request =
             UpdateEndpointPolicyRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setEndpointPolicy(EndpointPolicy.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateEndpointPolicyCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteEndpointPolicyAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyAsync(EndpointPolicyName name)
      Deletes a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         EndpointPolicyName name =
             EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]");
         networkServicesClient.deleteEndpointPolicyAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteEndpointPolicyAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyAsync(String name)
      Deletes a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString();
         networkServicesClient.deleteEndpointPolicyAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteEndpointPolicyAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest request)
      Deletes a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteEndpointPolicyRequest request =
             DeleteEndpointPolicyRequest.newBuilder()
                 .setName(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .build();
         networkServicesClient.deleteEndpointPolicyAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteEndpointPolicyOperationCallable

      public final OperationCallable<DeleteEndpointPolicyRequest,com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyOperationCallable()
      Deletes a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteEndpointPolicyRequest request =
             DeleteEndpointPolicyRequest.newBuilder()
                 .setName(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteEndpointPolicyOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteEndpointPolicyCallable

      public final UnaryCallable<DeleteEndpointPolicyRequest,Operation> deleteEndpointPolicyCallable()
      Deletes a single EndpointPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteEndpointPolicyRequest request =
             DeleteEndpointPolicyRequest.newBuilder()
                 .setName(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteEndpointPolicyCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listWasmPluginVersions

      public final NetworkServicesClient.ListWasmPluginVersionsPagedResponse listWasmPluginVersions(WasmPluginName parent)
      Lists `WasmPluginVersion` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
         for (WasmPluginVersion element :
             networkServicesClient.listWasmPluginVersions(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, specified in the following format: `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      Throws:
      ApiException - if the remote call fails
    • listWasmPluginVersions

      public final NetworkServicesClient.ListWasmPluginVersionsPagedResponse listWasmPluginVersions(String parent)
      Lists `WasmPluginVersion` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString();
         for (WasmPluginVersion element :
             networkServicesClient.listWasmPluginVersions(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, specified in the following format: `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      Throws:
      ApiException - if the remote call fails
    • listWasmPluginVersions

      Lists `WasmPluginVersion` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListWasmPluginVersionsRequest request =
             ListWasmPluginVersionsRequest.newBuilder()
                 .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (WasmPluginVersion element :
             networkServicesClient.listWasmPluginVersions(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listWasmPluginVersionsPagedCallable

      Lists `WasmPluginVersion` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListWasmPluginVersionsRequest request =
             ListWasmPluginVersionsRequest.newBuilder()
                 .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<WasmPluginVersion> future =
             networkServicesClient.listWasmPluginVersionsPagedCallable().futureCall(request);
         // Do something.
         for (WasmPluginVersion element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listWasmPluginVersionsCallable

      public final UnaryCallable<ListWasmPluginVersionsRequest,ListWasmPluginVersionsResponse> listWasmPluginVersionsCallable()
      Lists `WasmPluginVersion` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListWasmPluginVersionsRequest request =
             ListWasmPluginVersionsRequest.newBuilder()
                 .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListWasmPluginVersionsResponse response =
               networkServicesClient.listWasmPluginVersionsCallable().call(request);
           for (WasmPluginVersion element : response.getWasmPluginVersionsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getWasmPluginVersion

      public final WasmPluginVersion getWasmPluginVersion(WasmPluginVersionName name)
      Gets details of the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPluginVersionName name =
             WasmPluginVersionName.of(
                 "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]");
         WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name);
       }
       
      Parameters:
      name - Required. A name of the `WasmPluginVersion` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
      Throws:
      ApiException - if the remote call fails
    • getWasmPluginVersion

      public final WasmPluginVersion getWasmPluginVersion(String name)
      Gets details of the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             WasmPluginVersionName.of(
                     "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                 .toString();
         WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name);
       }
       
      Parameters:
      name - Required. A name of the `WasmPluginVersion` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
      Throws:
      ApiException - if the remote call fails
    • getWasmPluginVersion

      public final WasmPluginVersion getWasmPluginVersion(GetWasmPluginVersionRequest request)
      Gets details of the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetWasmPluginVersionRequest request =
             GetWasmPluginVersionRequest.newBuilder()
                 .setName(
                     WasmPluginVersionName.of(
                             "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                         .toString())
                 .build();
         WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getWasmPluginVersionCallable

      public final UnaryCallable<GetWasmPluginVersionRequest,WasmPluginVersion> getWasmPluginVersionCallable()
      Gets details of the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetWasmPluginVersionRequest request =
             GetWasmPluginVersionRequest.newBuilder()
                 .setName(
                     WasmPluginVersionName.of(
                             "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                         .toString())
                 .build();
         ApiFuture<WasmPluginVersion> future =
             networkServicesClient.getWasmPluginVersionCallable().futureCall(request);
         // Do something.
         WasmPluginVersion response = future.get();
       }
       
    • createWasmPluginVersionAsync

      public final OperationFuture<WasmPluginVersion,OperationMetadata> createWasmPluginVersionAsync(WasmPluginName parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId)
      Creates a new `WasmPluginVersion` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
         WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build();
         String wasmPluginVersionId = "wasmPluginVersionId38892252";
         WasmPluginVersion response =
             networkServicesClient
                 .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the `WasmPluginVersion` resource. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      wasmPluginVersion - Required. `WasmPluginVersion` resource to be created.
      wasmPluginVersionId - Required. User-provided ID of the `WasmPluginVersion` resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createWasmPluginVersionAsync

      public final OperationFuture<WasmPluginVersion,OperationMetadata> createWasmPluginVersionAsync(String parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId)
      Creates a new `WasmPluginVersion` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString();
         WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build();
         String wasmPluginVersionId = "wasmPluginVersionId38892252";
         WasmPluginVersion response =
             networkServicesClient
                 .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the `WasmPluginVersion` resource. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      wasmPluginVersion - Required. `WasmPluginVersion` resource to be created.
      wasmPluginVersionId - Required. User-provided ID of the `WasmPluginVersion` resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createWasmPluginVersionAsync

      public final OperationFuture<WasmPluginVersion,OperationMetadata> createWasmPluginVersionAsync(CreateWasmPluginVersionRequest request)
      Creates a new `WasmPluginVersion` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateWasmPluginVersionRequest request =
             CreateWasmPluginVersionRequest.newBuilder()
                 .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setWasmPluginVersionId("wasmPluginVersionId38892252")
                 .setWasmPluginVersion(WasmPluginVersion.newBuilder().build())
                 .build();
         WasmPluginVersion response =
             networkServicesClient.createWasmPluginVersionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createWasmPluginVersionOperationCallable

      public final OperationCallable<CreateWasmPluginVersionRequest,WasmPluginVersion,OperationMetadata> createWasmPluginVersionOperationCallable()
      Creates a new `WasmPluginVersion` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateWasmPluginVersionRequest request =
             CreateWasmPluginVersionRequest.newBuilder()
                 .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setWasmPluginVersionId("wasmPluginVersionId38892252")
                 .setWasmPluginVersion(WasmPluginVersion.newBuilder().build())
                 .build();
         OperationFuture<WasmPluginVersion, OperationMetadata> future =
             networkServicesClient.createWasmPluginVersionOperationCallable().futureCall(request);
         // Do something.
         WasmPluginVersion response = future.get();
       }
       
    • createWasmPluginVersionCallable

      public final UnaryCallable<CreateWasmPluginVersionRequest,Operation> createWasmPluginVersionCallable()
      Creates a new `WasmPluginVersion` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateWasmPluginVersionRequest request =
             CreateWasmPluginVersionRequest.newBuilder()
                 .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setWasmPluginVersionId("wasmPluginVersionId38892252")
                 .setWasmPluginVersion(WasmPluginVersion.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createWasmPluginVersionCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteWasmPluginVersionAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionAsync(WasmPluginVersionName name)
      Deletes the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPluginVersionName name =
             WasmPluginVersionName.of(
                 "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]");
         networkServicesClient.deleteWasmPluginVersionAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the `WasmPluginVersion` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
      Throws:
      ApiException - if the remote call fails
    • deleteWasmPluginVersionAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionAsync(String name)
      Deletes the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             WasmPluginVersionName.of(
                     "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                 .toString();
         networkServicesClient.deleteWasmPluginVersionAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the `WasmPluginVersion` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.
      Throws:
      ApiException - if the remote call fails
    • deleteWasmPluginVersionAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionAsync(DeleteWasmPluginVersionRequest request)
      Deletes the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteWasmPluginVersionRequest request =
             DeleteWasmPluginVersionRequest.newBuilder()
                 .setName(
                     WasmPluginVersionName.of(
                             "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                         .toString())
                 .build();
         networkServicesClient.deleteWasmPluginVersionAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteWasmPluginVersionOperationCallable

      public final OperationCallable<DeleteWasmPluginVersionRequest,com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionOperationCallable()
      Deletes the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteWasmPluginVersionRequest request =
             DeleteWasmPluginVersionRequest.newBuilder()
                 .setName(
                     WasmPluginVersionName.of(
                             "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteWasmPluginVersionOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteWasmPluginVersionCallable

      public final UnaryCallable<DeleteWasmPluginVersionRequest,Operation> deleteWasmPluginVersionCallable()
      Deletes the specified `WasmPluginVersion` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteWasmPluginVersionRequest request =
             DeleteWasmPluginVersionRequest.newBuilder()
                 .setName(
                     WasmPluginVersionName.of(
                             "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteWasmPluginVersionCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listWasmPlugins

      Lists `WasmPlugin` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the `WasmPlugin` resources are listed, specified in the following format: `projects/{project}/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listWasmPlugins

      public final NetworkServicesClient.ListWasmPluginsPagedResponse listWasmPlugins(String parent)
      Lists `WasmPlugin` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the `WasmPlugin` resources are listed, specified in the following format: `projects/{project}/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listWasmPlugins

      Lists `WasmPlugin` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListWasmPluginsRequest request =
             ListWasmPluginsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (WasmPlugin element : networkServicesClient.listWasmPlugins(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listWasmPluginsPagedCallable

      Lists `WasmPlugin` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListWasmPluginsRequest request =
             ListWasmPluginsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<WasmPlugin> future =
             networkServicesClient.listWasmPluginsPagedCallable().futureCall(request);
         // Do something.
         for (WasmPlugin element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listWasmPluginsCallable

      public final UnaryCallable<ListWasmPluginsRequest,ListWasmPluginsResponse> listWasmPluginsCallable()
      Lists `WasmPlugin` resources in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListWasmPluginsRequest request =
             ListWasmPluginsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListWasmPluginsResponse response =
               networkServicesClient.listWasmPluginsCallable().call(request);
           for (WasmPlugin element : response.getWasmPluginsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getWasmPlugin

      public final WasmPlugin getWasmPlugin(WasmPluginName name)
      Gets details of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
         WasmPlugin response = networkServicesClient.getWasmPlugin(name);
       }
       
      Parameters:
      name - Required. A name of the `WasmPlugin` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      Throws:
      ApiException - if the remote call fails
    • getWasmPlugin

      public final WasmPlugin getWasmPlugin(String name)
      Gets details of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString();
         WasmPlugin response = networkServicesClient.getWasmPlugin(name);
       }
       
      Parameters:
      name - Required. A name of the `WasmPlugin` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      Throws:
      ApiException - if the remote call fails
    • getWasmPlugin

      public final WasmPlugin getWasmPlugin(GetWasmPluginRequest request)
      Gets details of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetWasmPluginRequest request =
             GetWasmPluginRequest.newBuilder()
                 .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setView(WasmPluginView.forNumber(0))
                 .build();
         WasmPlugin response = networkServicesClient.getWasmPlugin(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getWasmPluginCallable

      public final UnaryCallable<GetWasmPluginRequest,WasmPlugin> getWasmPluginCallable()
      Gets details of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetWasmPluginRequest request =
             GetWasmPluginRequest.newBuilder()
                 .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .setView(WasmPluginView.forNumber(0))
                 .build();
         ApiFuture<WasmPlugin> future =
             networkServicesClient.getWasmPluginCallable().futureCall(request);
         // Do something.
         WasmPlugin response = future.get();
       }
       
    • createWasmPluginAsync

      public final OperationFuture<WasmPlugin,OperationMetadata> createWasmPluginAsync(LocationName parent, WasmPlugin wasmPlugin, String wasmPluginId)
      Creates a new `WasmPlugin` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build();
         String wasmPluginId = "wasmPluginId1902086770";
         WasmPlugin response =
             networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the `WasmPlugin` resource. Must be in the format `projects/{project}/locations/global`.
      wasmPlugin - Required. `WasmPlugin` resource to be created.
      wasmPluginId - Required. User-provided ID of the `WasmPlugin` resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createWasmPluginAsync

      public final OperationFuture<WasmPlugin,OperationMetadata> createWasmPluginAsync(String parent, WasmPlugin wasmPlugin, String wasmPluginId)
      Creates a new `WasmPlugin` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build();
         String wasmPluginId = "wasmPluginId1902086770";
         WasmPlugin response =
             networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the `WasmPlugin` resource. Must be in the format `projects/{project}/locations/global`.
      wasmPlugin - Required. `WasmPlugin` resource to be created.
      wasmPluginId - Required. User-provided ID of the `WasmPlugin` resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createWasmPluginAsync

      public final OperationFuture<WasmPlugin,OperationMetadata> createWasmPluginAsync(CreateWasmPluginRequest request)
      Creates a new `WasmPlugin` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateWasmPluginRequest request =
             CreateWasmPluginRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setWasmPluginId("wasmPluginId1902086770")
                 .setWasmPlugin(WasmPlugin.newBuilder().build())
                 .build();
         WasmPlugin response = networkServicesClient.createWasmPluginAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createWasmPluginOperationCallable

      public final OperationCallable<CreateWasmPluginRequest,WasmPlugin,OperationMetadata> createWasmPluginOperationCallable()
      Creates a new `WasmPlugin` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateWasmPluginRequest request =
             CreateWasmPluginRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setWasmPluginId("wasmPluginId1902086770")
                 .setWasmPlugin(WasmPlugin.newBuilder().build())
                 .build();
         OperationFuture<WasmPlugin, OperationMetadata> future =
             networkServicesClient.createWasmPluginOperationCallable().futureCall(request);
         // Do something.
         WasmPlugin response = future.get();
       }
       
    • createWasmPluginCallable

      public final UnaryCallable<CreateWasmPluginRequest,Operation> createWasmPluginCallable()
      Creates a new `WasmPlugin` resource in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateWasmPluginRequest request =
             CreateWasmPluginRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setWasmPluginId("wasmPluginId1902086770")
                 .setWasmPlugin(WasmPlugin.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createWasmPluginCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateWasmPluginAsync

      public final OperationFuture<WasmPlugin,OperationMetadata> updateWasmPluginAsync(WasmPlugin wasmPlugin, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         WasmPlugin response =
             networkServicesClient.updateWasmPluginAsync(wasmPlugin, updateMask).get();
       }
       
      Parameters:
      wasmPlugin - Required. Updated `WasmPlugin` resource.
      updateMask - Optional. Used to specify the fields to be overwritten in the `WasmPlugin` resource by the update. The fields specified in the `update_mask` field are relative to the resource, not the full request. An omitted `update_mask` field is treated as an implied `update_mask` field equivalent to all fields that are populated (that have a non-empty value). The `update_mask` field supports a special value `*`, which means that each field in the given `WasmPlugin` resource (including the empty ones) replaces the current value.
      Throws:
      ApiException - if the remote call fails
    • updateWasmPluginAsync

      public final OperationFuture<WasmPlugin,OperationMetadata> updateWasmPluginAsync(UpdateWasmPluginRequest request)
      Updates the parameters of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateWasmPluginRequest request =
             UpdateWasmPluginRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setWasmPlugin(WasmPlugin.newBuilder().build())
                 .build();
         WasmPlugin response = networkServicesClient.updateWasmPluginAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateWasmPluginOperationCallable

      public final OperationCallable<UpdateWasmPluginRequest,WasmPlugin,OperationMetadata> updateWasmPluginOperationCallable()
      Updates the parameters of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateWasmPluginRequest request =
             UpdateWasmPluginRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setWasmPlugin(WasmPlugin.newBuilder().build())
                 .build();
         OperationFuture<WasmPlugin, OperationMetadata> future =
             networkServicesClient.updateWasmPluginOperationCallable().futureCall(request);
         // Do something.
         WasmPlugin response = future.get();
       }
       
    • updateWasmPluginCallable

      public final UnaryCallable<UpdateWasmPluginRequest,Operation> updateWasmPluginCallable()
      Updates the parameters of the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateWasmPluginRequest request =
             UpdateWasmPluginRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setWasmPlugin(WasmPlugin.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateWasmPluginCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteWasmPluginAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(WasmPluginName name)
      Deletes the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]");
         networkServicesClient.deleteWasmPluginAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the `WasmPlugin` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      Throws:
      ApiException - if the remote call fails
    • deleteWasmPluginAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(String name)
      Deletes the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString();
         networkServicesClient.deleteWasmPluginAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the `WasmPlugin` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.
      Throws:
      ApiException - if the remote call fails
    • deleteWasmPluginAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(DeleteWasmPluginRequest request)
      Deletes the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteWasmPluginRequest request =
             DeleteWasmPluginRequest.newBuilder()
                 .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .build();
         networkServicesClient.deleteWasmPluginAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteWasmPluginOperationCallable

      public final OperationCallable<DeleteWasmPluginRequest,com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginOperationCallable()
      Deletes the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteWasmPluginRequest request =
             DeleteWasmPluginRequest.newBuilder()
                 .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteWasmPluginOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteWasmPluginCallable

      public final UnaryCallable<DeleteWasmPluginRequest,Operation> deleteWasmPluginCallable()
      Deletes the specified `WasmPlugin` resource.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteWasmPluginRequest request =
             DeleteWasmPluginRequest.newBuilder()
                 .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteWasmPluginCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listGateways

      Lists Gateways in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Gateway element : networkServicesClient.listGateways(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listGateways

      public final NetworkServicesClient.ListGatewaysPagedResponse listGateways(String parent)
      Lists Gateways in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Gateway element : networkServicesClient.listGateways(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listGateways

      Lists Gateways in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGatewaysRequest request =
             ListGatewaysRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Gateway element : networkServicesClient.listGateways(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listGatewaysPagedCallable

      Lists Gateways in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGatewaysRequest request =
             ListGatewaysRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Gateway> future =
             networkServicesClient.listGatewaysPagedCallable().futureCall(request);
         // Do something.
         for (Gateway element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listGatewaysCallable

      public final UnaryCallable<ListGatewaysRequest,ListGatewaysResponse> listGatewaysCallable()
      Lists Gateways in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGatewaysRequest request =
             ListGatewaysRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListGatewaysResponse response = networkServicesClient.listGatewaysCallable().call(request);
           for (Gateway element : response.getGatewaysList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getGateway

      public final Gateway getGateway(GatewayName name)
      Gets details of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
         Gateway response = networkServicesClient.getGateway(name);
       }
       
      Parameters:
      name - Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.
      Throws:
      ApiException - if the remote call fails
    • getGateway

      public final Gateway getGateway(String name)
      Gets details of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString();
         Gateway response = networkServicesClient.getGateway(name);
       }
       
      Parameters:
      name - Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.
      Throws:
      ApiException - if the remote call fails
    • getGateway

      public final Gateway getGateway(GetGatewayRequest request)
      Gets details of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetGatewayRequest request =
             GetGatewayRequest.newBuilder()
                 .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .build();
         Gateway response = networkServicesClient.getGateway(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getGatewayCallable

      public final UnaryCallable<GetGatewayRequest,Gateway> getGatewayCallable()
      Gets details of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetGatewayRequest request =
             GetGatewayRequest.newBuilder()
                 .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .build();
         ApiFuture<Gateway> future = networkServicesClient.getGatewayCallable().futureCall(request);
         // Do something.
         Gateway response = future.get();
       }
       
    • createGatewayAsync

      public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)
      Creates a new Gateway in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Gateway gateway = Gateway.newBuilder().build();
         String gatewayId = "gatewayId-1354641793";
         Gateway response = networkServicesClient.createGatewayAsync(parent, gateway, gatewayId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.
      gateway - Required. Gateway resource to be created.
      gatewayId - Required. Short name of the Gateway resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createGatewayAsync

      public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(String parent, Gateway gateway, String gatewayId)
      Creates a new Gateway in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Gateway gateway = Gateway.newBuilder().build();
         String gatewayId = "gatewayId-1354641793";
         Gateway response = networkServicesClient.createGatewayAsync(parent, gateway, gatewayId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.
      gateway - Required. Gateway resource to be created.
      gatewayId - Required. Short name of the Gateway resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createGatewayAsync

      public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(CreateGatewayRequest request)
      Creates a new Gateway in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateGatewayRequest request =
             CreateGatewayRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGatewayId("gatewayId-1354641793")
                 .setGateway(Gateway.newBuilder().build())
                 .build();
         Gateway response = networkServicesClient.createGatewayAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createGatewayOperationCallable

      public final OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata> createGatewayOperationCallable()
      Creates a new Gateway in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateGatewayRequest request =
             CreateGatewayRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGatewayId("gatewayId-1354641793")
                 .setGateway(Gateway.newBuilder().build())
                 .build();
         OperationFuture<Gateway, OperationMetadata> future =
             networkServicesClient.createGatewayOperationCallable().futureCall(request);
         // Do something.
         Gateway response = future.get();
       }
       
    • createGatewayCallable

      public final UnaryCallable<CreateGatewayRequest,Operation> createGatewayCallable()
      Creates a new Gateway in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateGatewayRequest request =
             CreateGatewayRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGatewayId("gatewayId-1354641793")
                 .setGateway(Gateway.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createGatewayCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateGatewayAsync

      public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(Gateway gateway, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         Gateway gateway = Gateway.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Gateway response = networkServicesClient.updateGatewayAsync(gateway, updateMask).get();
       }
       
      Parameters:
      gateway - Required. Updated Gateway resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateGatewayAsync

      public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(UpdateGatewayRequest request)
      Updates the parameters of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateGatewayRequest request =
             UpdateGatewayRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setGateway(Gateway.newBuilder().build())
                 .build();
         Gateway response = networkServicesClient.updateGatewayAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateGatewayOperationCallable

      public final OperationCallable<UpdateGatewayRequest,Gateway,OperationMetadata> updateGatewayOperationCallable()
      Updates the parameters of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateGatewayRequest request =
             UpdateGatewayRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setGateway(Gateway.newBuilder().build())
                 .build();
         OperationFuture<Gateway, OperationMetadata> future =
             networkServicesClient.updateGatewayOperationCallable().futureCall(request);
         // Do something.
         Gateway response = future.get();
       }
       
    • updateGatewayCallable

      public final UnaryCallable<UpdateGatewayRequest,Operation> updateGatewayCallable()
      Updates the parameters of a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateGatewayRequest request =
             UpdateGatewayRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setGateway(Gateway.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateGatewayCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteGatewayAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(GatewayName name)
      Deletes a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
         networkServicesClient.deleteGatewayAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteGatewayAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(String name)
      Deletes a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString();
         networkServicesClient.deleteGatewayAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteGatewayAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(DeleteGatewayRequest request)
      Deletes a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteGatewayRequest request =
             DeleteGatewayRequest.newBuilder()
                 .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .build();
         networkServicesClient.deleteGatewayAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteGatewayOperationCallable

      public final OperationCallable<DeleteGatewayRequest,com.google.protobuf.Empty,OperationMetadata> deleteGatewayOperationCallable()
      Deletes a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteGatewayRequest request =
             DeleteGatewayRequest.newBuilder()
                 .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteGatewayOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteGatewayCallable

      public final UnaryCallable<DeleteGatewayRequest,Operation> deleteGatewayCallable()
      Deletes a single Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteGatewayRequest request =
             DeleteGatewayRequest.newBuilder()
                 .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteGatewayCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listGrpcRoutes

      Lists GrpcRoutes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (GrpcRoute element : networkServicesClient.listGrpcRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listGrpcRoutes

      public final NetworkServicesClient.ListGrpcRoutesPagedResponse listGrpcRoutes(String parent)
      Lists GrpcRoutes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (GrpcRoute element : networkServicesClient.listGrpcRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listGrpcRoutes

      Lists GrpcRoutes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGrpcRoutesRequest request =
             ListGrpcRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         for (GrpcRoute element : networkServicesClient.listGrpcRoutes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listGrpcRoutesPagedCallable

      Lists GrpcRoutes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGrpcRoutesRequest request =
             ListGrpcRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<GrpcRoute> future =
             networkServicesClient.listGrpcRoutesPagedCallable().futureCall(request);
         // Do something.
         for (GrpcRoute element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listGrpcRoutesCallable

      public final UnaryCallable<ListGrpcRoutesRequest,ListGrpcRoutesResponse> listGrpcRoutesCallable()
      Lists GrpcRoutes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGrpcRoutesRequest request =
             ListGrpcRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListGrpcRoutesResponse response =
               networkServicesClient.listGrpcRoutesCallable().call(request);
           for (GrpcRoute element : response.getGrpcRoutesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getGrpcRoute

      public final GrpcRoute getGrpcRoute(GrpcRouteName name)
      Gets details of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GrpcRouteName name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]");
         GrpcRoute response = networkServicesClient.getGrpcRoute(name);
       }
       
      Parameters:
      name - Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getGrpcRoute

      public final GrpcRoute getGrpcRoute(String name)
      Gets details of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString();
         GrpcRoute response = networkServicesClient.getGrpcRoute(name);
       }
       
      Parameters:
      name - Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getGrpcRoute

      public final GrpcRoute getGrpcRoute(GetGrpcRouteRequest request)
      Gets details of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetGrpcRouteRequest request =
             GetGrpcRouteRequest.newBuilder()
                 .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
                 .build();
         GrpcRoute response = networkServicesClient.getGrpcRoute(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getGrpcRouteCallable

      public final UnaryCallable<GetGrpcRouteRequest,GrpcRoute> getGrpcRouteCallable()
      Gets details of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetGrpcRouteRequest request =
             GetGrpcRouteRequest.newBuilder()
                 .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
                 .build();
         ApiFuture<GrpcRoute> future =
             networkServicesClient.getGrpcRouteCallable().futureCall(request);
         // Do something.
         GrpcRoute response = future.get();
       }
       
    • createGrpcRouteAsync

      public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId)
      Creates a new GrpcRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         GrpcRoute grpcRoute = GrpcRoute.newBuilder().build();
         String grpcRouteId = "grpcRouteId1888295750";
         GrpcRoute response =
             networkServicesClient.createGrpcRouteAsync(parent, grpcRoute, grpcRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.
      grpcRoute - Required. GrpcRoute resource to be created.
      grpcRouteId - Required. Short name of the GrpcRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createGrpcRouteAsync

      public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId)
      Creates a new GrpcRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         GrpcRoute grpcRoute = GrpcRoute.newBuilder().build();
         String grpcRouteId = "grpcRouteId1888295750";
         GrpcRoute response =
             networkServicesClient.createGrpcRouteAsync(parent, grpcRoute, grpcRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.
      grpcRoute - Required. GrpcRoute resource to be created.
      grpcRouteId - Required. Short name of the GrpcRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createGrpcRouteAsync

      public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(CreateGrpcRouteRequest request)
      Creates a new GrpcRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateGrpcRouteRequest request =
             CreateGrpcRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGrpcRouteId("grpcRouteId1888295750")
                 .setGrpcRoute(GrpcRoute.newBuilder().build())
                 .build();
         GrpcRoute response = networkServicesClient.createGrpcRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createGrpcRouteOperationCallable

      public final OperationCallable<CreateGrpcRouteRequest,GrpcRoute,OperationMetadata> createGrpcRouteOperationCallable()
      Creates a new GrpcRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateGrpcRouteRequest request =
             CreateGrpcRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGrpcRouteId("grpcRouteId1888295750")
                 .setGrpcRoute(GrpcRoute.newBuilder().build())
                 .build();
         OperationFuture<GrpcRoute, OperationMetadata> future =
             networkServicesClient.createGrpcRouteOperationCallable().futureCall(request);
         // Do something.
         GrpcRoute response = future.get();
       }
       
    • createGrpcRouteCallable

      public final UnaryCallable<CreateGrpcRouteRequest,Operation> createGrpcRouteCallable()
      Creates a new GrpcRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateGrpcRouteRequest request =
             CreateGrpcRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setGrpcRouteId("grpcRouteId1888295750")
                 .setGrpcRoute(GrpcRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createGrpcRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateGrpcRouteAsync

      public final OperationFuture<GrpcRoute,OperationMetadata> updateGrpcRouteAsync(GrpcRoute grpcRoute, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GrpcRoute grpcRoute = GrpcRoute.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         GrpcRoute response = networkServicesClient.updateGrpcRouteAsync(grpcRoute, updateMask).get();
       }
       
      Parameters:
      grpcRoute - Required. Updated GrpcRoute resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateGrpcRouteAsync

      public final OperationFuture<GrpcRoute,OperationMetadata> updateGrpcRouteAsync(UpdateGrpcRouteRequest request)
      Updates the parameters of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateGrpcRouteRequest request =
             UpdateGrpcRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setGrpcRoute(GrpcRoute.newBuilder().build())
                 .build();
         GrpcRoute response = networkServicesClient.updateGrpcRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateGrpcRouteOperationCallable

      public final OperationCallable<UpdateGrpcRouteRequest,GrpcRoute,OperationMetadata> updateGrpcRouteOperationCallable()
      Updates the parameters of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateGrpcRouteRequest request =
             UpdateGrpcRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setGrpcRoute(GrpcRoute.newBuilder().build())
                 .build();
         OperationFuture<GrpcRoute, OperationMetadata> future =
             networkServicesClient.updateGrpcRouteOperationCallable().futureCall(request);
         // Do something.
         GrpcRoute response = future.get();
       }
       
    • updateGrpcRouteCallable

      public final UnaryCallable<UpdateGrpcRouteRequest,Operation> updateGrpcRouteCallable()
      Updates the parameters of a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateGrpcRouteRequest request =
             UpdateGrpcRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setGrpcRoute(GrpcRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateGrpcRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteGrpcRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(GrpcRouteName name)
      Deletes a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GrpcRouteName name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]");
         networkServicesClient.deleteGrpcRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteGrpcRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(String name)
      Deletes a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString();
         networkServicesClient.deleteGrpcRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteGrpcRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(DeleteGrpcRouteRequest request)
      Deletes a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteGrpcRouteRequest request =
             DeleteGrpcRouteRequest.newBuilder()
                 .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
                 .build();
         networkServicesClient.deleteGrpcRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteGrpcRouteOperationCallable

      public final OperationCallable<DeleteGrpcRouteRequest,com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteOperationCallable()
      Deletes a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteGrpcRouteRequest request =
             DeleteGrpcRouteRequest.newBuilder()
                 .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteGrpcRouteOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteGrpcRouteCallable

      public final UnaryCallable<DeleteGrpcRouteRequest,Operation> deleteGrpcRouteCallable()
      Deletes a single GrpcRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteGrpcRouteRequest request =
             DeleteGrpcRouteRequest.newBuilder()
                 .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteGrpcRouteCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listHttpRoutes

      Lists HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (HttpRoute element : networkServicesClient.listHttpRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listHttpRoutes

      public final NetworkServicesClient.ListHttpRoutesPagedResponse listHttpRoutes(String parent)
      Lists HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (HttpRoute element : networkServicesClient.listHttpRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listHttpRoutes

      Lists HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListHttpRoutesRequest request =
             ListHttpRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         for (HttpRoute element : networkServicesClient.listHttpRoutes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listHttpRoutesPagedCallable

      Lists HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListHttpRoutesRequest request =
             ListHttpRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<HttpRoute> future =
             networkServicesClient.listHttpRoutesPagedCallable().futureCall(request);
         // Do something.
         for (HttpRoute element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listHttpRoutesCallable

      public final UnaryCallable<ListHttpRoutesRequest,ListHttpRoutesResponse> listHttpRoutesCallable()
      Lists HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListHttpRoutesRequest request =
             ListHttpRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListHttpRoutesResponse response =
               networkServicesClient.listHttpRoutesCallable().call(request);
           for (HttpRoute element : response.getHttpRoutesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getHttpRoute

      public final HttpRoute getHttpRoute(HttpRouteName name)
      Gets details of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         HttpRouteName name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]");
         HttpRoute response = networkServicesClient.getHttpRoute(name);
       }
       
      Parameters:
      name - Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getHttpRoute

      public final HttpRoute getHttpRoute(String name)
      Gets details of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString();
         HttpRoute response = networkServicesClient.getHttpRoute(name);
       }
       
      Parameters:
      name - Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getHttpRoute

      public final HttpRoute getHttpRoute(GetHttpRouteRequest request)
      Gets details of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetHttpRouteRequest request =
             GetHttpRouteRequest.newBuilder()
                 .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
                 .build();
         HttpRoute response = networkServicesClient.getHttpRoute(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getHttpRouteCallable

      public final UnaryCallable<GetHttpRouteRequest,HttpRoute> getHttpRouteCallable()
      Gets details of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetHttpRouteRequest request =
             GetHttpRouteRequest.newBuilder()
                 .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
                 .build();
         ApiFuture<HttpRoute> future =
             networkServicesClient.getHttpRouteCallable().futureCall(request);
         // Do something.
         HttpRoute response = future.get();
       }
       
    • createHttpRouteAsync

      public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId)
      Creates a new HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         HttpRoute httpRoute = HttpRoute.newBuilder().build();
         String httpRouteId = "httpRouteId-2054835300";
         HttpRoute response =
             networkServicesClient.createHttpRouteAsync(parent, httpRoute, httpRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.
      httpRoute - Required. HttpRoute resource to be created.
      httpRouteId - Required. Short name of the HttpRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createHttpRouteAsync

      public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId)
      Creates a new HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         HttpRoute httpRoute = HttpRoute.newBuilder().build();
         String httpRouteId = "httpRouteId-2054835300";
         HttpRoute response =
             networkServicesClient.createHttpRouteAsync(parent, httpRoute, httpRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.
      httpRoute - Required. HttpRoute resource to be created.
      httpRouteId - Required. Short name of the HttpRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createHttpRouteAsync

      public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(CreateHttpRouteRequest request)
      Creates a new HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateHttpRouteRequest request =
             CreateHttpRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setHttpRouteId("httpRouteId-2054835300")
                 .setHttpRoute(HttpRoute.newBuilder().build())
                 .build();
         HttpRoute response = networkServicesClient.createHttpRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createHttpRouteOperationCallable

      public final OperationCallable<CreateHttpRouteRequest,HttpRoute,OperationMetadata> createHttpRouteOperationCallable()
      Creates a new HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateHttpRouteRequest request =
             CreateHttpRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setHttpRouteId("httpRouteId-2054835300")
                 .setHttpRoute(HttpRoute.newBuilder().build())
                 .build();
         OperationFuture<HttpRoute, OperationMetadata> future =
             networkServicesClient.createHttpRouteOperationCallable().futureCall(request);
         // Do something.
         HttpRoute response = future.get();
       }
       
    • createHttpRouteCallable

      public final UnaryCallable<CreateHttpRouteRequest,Operation> createHttpRouteCallable()
      Creates a new HttpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateHttpRouteRequest request =
             CreateHttpRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setHttpRouteId("httpRouteId-2054835300")
                 .setHttpRoute(HttpRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createHttpRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateHttpRouteAsync

      public final OperationFuture<HttpRoute,OperationMetadata> updateHttpRouteAsync(HttpRoute httpRoute, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         HttpRoute httpRoute = HttpRoute.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         HttpRoute response = networkServicesClient.updateHttpRouteAsync(httpRoute, updateMask).get();
       }
       
      Parameters:
      httpRoute - Required. Updated HttpRoute resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateHttpRouteAsync

      public final OperationFuture<HttpRoute,OperationMetadata> updateHttpRouteAsync(UpdateHttpRouteRequest request)
      Updates the parameters of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateHttpRouteRequest request =
             UpdateHttpRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setHttpRoute(HttpRoute.newBuilder().build())
                 .build();
         HttpRoute response = networkServicesClient.updateHttpRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateHttpRouteOperationCallable

      public final OperationCallable<UpdateHttpRouteRequest,HttpRoute,OperationMetadata> updateHttpRouteOperationCallable()
      Updates the parameters of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateHttpRouteRequest request =
             UpdateHttpRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setHttpRoute(HttpRoute.newBuilder().build())
                 .build();
         OperationFuture<HttpRoute, OperationMetadata> future =
             networkServicesClient.updateHttpRouteOperationCallable().futureCall(request);
         // Do something.
         HttpRoute response = future.get();
       }
       
    • updateHttpRouteCallable

      public final UnaryCallable<UpdateHttpRouteRequest,Operation> updateHttpRouteCallable()
      Updates the parameters of a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateHttpRouteRequest request =
             UpdateHttpRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setHttpRoute(HttpRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateHttpRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteHttpRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(HttpRouteName name)
      Deletes a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         HttpRouteName name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]");
         networkServicesClient.deleteHttpRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteHttpRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(String name)
      Deletes a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString();
         networkServicesClient.deleteHttpRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteHttpRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(DeleteHttpRouteRequest request)
      Deletes a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteHttpRouteRequest request =
             DeleteHttpRouteRequest.newBuilder()
                 .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
                 .build();
         networkServicesClient.deleteHttpRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteHttpRouteOperationCallable

      public final OperationCallable<DeleteHttpRouteRequest,com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteOperationCallable()
      Deletes a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteHttpRouteRequest request =
             DeleteHttpRouteRequest.newBuilder()
                 .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteHttpRouteOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteHttpRouteCallable

      public final UnaryCallable<DeleteHttpRouteRequest,Operation> deleteHttpRouteCallable()
      Deletes a single HttpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteHttpRouteRequest request =
             DeleteHttpRouteRequest.newBuilder()
                 .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteHttpRouteCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listTcpRoutes

      Lists TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (TcpRoute element : networkServicesClient.listTcpRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listTcpRoutes

      public final NetworkServicesClient.ListTcpRoutesPagedResponse listTcpRoutes(String parent)
      Lists TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (TcpRoute element : networkServicesClient.listTcpRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listTcpRoutes

      Lists TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListTcpRoutesRequest request =
             ListTcpRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         for (TcpRoute element : networkServicesClient.listTcpRoutes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listTcpRoutesPagedCallable

      Lists TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListTcpRoutesRequest request =
             ListTcpRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<TcpRoute> future =
             networkServicesClient.listTcpRoutesPagedCallable().futureCall(request);
         // Do something.
         for (TcpRoute element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listTcpRoutesCallable

      public final UnaryCallable<ListTcpRoutesRequest,ListTcpRoutesResponse> listTcpRoutesCallable()
      Lists TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListTcpRoutesRequest request =
             ListTcpRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListTcpRoutesResponse response =
               networkServicesClient.listTcpRoutesCallable().call(request);
           for (TcpRoute element : response.getTcpRoutesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getTcpRoute

      public final TcpRoute getTcpRoute(TcpRouteName name)
      Gets details of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TcpRouteName name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]");
         TcpRoute response = networkServicesClient.getTcpRoute(name);
       }
       
      Parameters:
      name - Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getTcpRoute

      public final TcpRoute getTcpRoute(String name)
      Gets details of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString();
         TcpRoute response = networkServicesClient.getTcpRoute(name);
       }
       
      Parameters:
      name - Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getTcpRoute

      public final TcpRoute getTcpRoute(GetTcpRouteRequest request)
      Gets details of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetTcpRouteRequest request =
             GetTcpRouteRequest.newBuilder()
                 .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString())
                 .build();
         TcpRoute response = networkServicesClient.getTcpRoute(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getTcpRouteCallable

      public final UnaryCallable<GetTcpRouteRequest,TcpRoute> getTcpRouteCallable()
      Gets details of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetTcpRouteRequest request =
             GetTcpRouteRequest.newBuilder()
                 .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString())
                 .build();
         ApiFuture<TcpRoute> future = networkServicesClient.getTcpRouteCallable().futureCall(request);
         // Do something.
         TcpRoute response = future.get();
       }
       
    • createTcpRouteAsync

      public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId)
      Creates a new TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         TcpRoute tcpRoute = TcpRoute.newBuilder().build();
         String tcpRouteId = "tcpRouteId806467107";
         TcpRoute response =
             networkServicesClient.createTcpRouteAsync(parent, tcpRoute, tcpRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.
      tcpRoute - Required. TcpRoute resource to be created.
      tcpRouteId - Required. Short name of the TcpRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createTcpRouteAsync

      public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId)
      Creates a new TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         TcpRoute tcpRoute = TcpRoute.newBuilder().build();
         String tcpRouteId = "tcpRouteId806467107";
         TcpRoute response =
             networkServicesClient.createTcpRouteAsync(parent, tcpRoute, tcpRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.
      tcpRoute - Required. TcpRoute resource to be created.
      tcpRouteId - Required. Short name of the TcpRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createTcpRouteAsync

      public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(CreateTcpRouteRequest request)
      Creates a new TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateTcpRouteRequest request =
             CreateTcpRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTcpRouteId("tcpRouteId806467107")
                 .setTcpRoute(TcpRoute.newBuilder().build())
                 .build();
         TcpRoute response = networkServicesClient.createTcpRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createTcpRouteOperationCallable

      public final OperationCallable<CreateTcpRouteRequest,TcpRoute,OperationMetadata> createTcpRouteOperationCallable()
      Creates a new TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateTcpRouteRequest request =
             CreateTcpRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTcpRouteId("tcpRouteId806467107")
                 .setTcpRoute(TcpRoute.newBuilder().build())
                 .build();
         OperationFuture<TcpRoute, OperationMetadata> future =
             networkServicesClient.createTcpRouteOperationCallable().futureCall(request);
         // Do something.
         TcpRoute response = future.get();
       }
       
    • createTcpRouteCallable

      public final UnaryCallable<CreateTcpRouteRequest,Operation> createTcpRouteCallable()
      Creates a new TcpRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateTcpRouteRequest request =
             CreateTcpRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTcpRouteId("tcpRouteId806467107")
                 .setTcpRoute(TcpRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createTcpRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateTcpRouteAsync

      public final OperationFuture<TcpRoute,OperationMetadata> updateTcpRouteAsync(TcpRoute tcpRoute, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TcpRoute tcpRoute = TcpRoute.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         TcpRoute response = networkServicesClient.updateTcpRouteAsync(tcpRoute, updateMask).get();
       }
       
      Parameters:
      tcpRoute - Required. Updated TcpRoute resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateTcpRouteAsync

      public final OperationFuture<TcpRoute,OperationMetadata> updateTcpRouteAsync(UpdateTcpRouteRequest request)
      Updates the parameters of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateTcpRouteRequest request =
             UpdateTcpRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTcpRoute(TcpRoute.newBuilder().build())
                 .build();
         TcpRoute response = networkServicesClient.updateTcpRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateTcpRouteOperationCallable

      public final OperationCallable<UpdateTcpRouteRequest,TcpRoute,OperationMetadata> updateTcpRouteOperationCallable()
      Updates the parameters of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateTcpRouteRequest request =
             UpdateTcpRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTcpRoute(TcpRoute.newBuilder().build())
                 .build();
         OperationFuture<TcpRoute, OperationMetadata> future =
             networkServicesClient.updateTcpRouteOperationCallable().futureCall(request);
         // Do something.
         TcpRoute response = future.get();
       }
       
    • updateTcpRouteCallable

      public final UnaryCallable<UpdateTcpRouteRequest,Operation> updateTcpRouteCallable()
      Updates the parameters of a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateTcpRouteRequest request =
             UpdateTcpRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTcpRoute(TcpRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateTcpRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteTcpRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(TcpRouteName name)
      Deletes a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TcpRouteName name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]");
         networkServicesClient.deleteTcpRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteTcpRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(String name)
      Deletes a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString();
         networkServicesClient.deleteTcpRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteTcpRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(DeleteTcpRouteRequest request)
      Deletes a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteTcpRouteRequest request =
             DeleteTcpRouteRequest.newBuilder()
                 .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString())
                 .build();
         networkServicesClient.deleteTcpRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteTcpRouteOperationCallable

      public final OperationCallable<DeleteTcpRouteRequest,com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteOperationCallable()
      Deletes a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteTcpRouteRequest request =
             DeleteTcpRouteRequest.newBuilder()
                 .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteTcpRouteOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteTcpRouteCallable

      public final UnaryCallable<DeleteTcpRouteRequest,Operation> deleteTcpRouteCallable()
      Deletes a single TcpRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteTcpRouteRequest request =
             DeleteTcpRouteRequest.newBuilder()
                 .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteTcpRouteCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listTlsRoutes

      Lists TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (TlsRoute element : networkServicesClient.listTlsRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listTlsRoutes

      public final NetworkServicesClient.ListTlsRoutesPagedResponse listTlsRoutes(String parent)
      Lists TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (TlsRoute element : networkServicesClient.listTlsRoutes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listTlsRoutes

      Lists TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListTlsRoutesRequest request =
             ListTlsRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         for (TlsRoute element : networkServicesClient.listTlsRoutes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listTlsRoutesPagedCallable

      Lists TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListTlsRoutesRequest request =
             ListTlsRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<TlsRoute> future =
             networkServicesClient.listTlsRoutesPagedCallable().futureCall(request);
         // Do something.
         for (TlsRoute element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listTlsRoutesCallable

      public final UnaryCallable<ListTlsRoutesRequest,ListTlsRoutesResponse> listTlsRoutesCallable()
      Lists TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListTlsRoutesRequest request =
             ListTlsRoutesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListTlsRoutesResponse response =
               networkServicesClient.listTlsRoutesCallable().call(request);
           for (TlsRoute element : response.getTlsRoutesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getTlsRoute

      public final TlsRoute getTlsRoute(TlsRouteName name)
      Gets details of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TlsRouteName name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]");
         TlsRoute response = networkServicesClient.getTlsRoute(name);
       }
       
      Parameters:
      name - Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getTlsRoute

      public final TlsRoute getTlsRoute(String name)
      Gets details of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString();
         TlsRoute response = networkServicesClient.getTlsRoute(name);
       }
       
      Parameters:
      name - Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • getTlsRoute

      public final TlsRoute getTlsRoute(GetTlsRouteRequest request)
      Gets details of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetTlsRouteRequest request =
             GetTlsRouteRequest.newBuilder()
                 .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString())
                 .build();
         TlsRoute response = networkServicesClient.getTlsRoute(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getTlsRouteCallable

      public final UnaryCallable<GetTlsRouteRequest,TlsRoute> getTlsRouteCallable()
      Gets details of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetTlsRouteRequest request =
             GetTlsRouteRequest.newBuilder()
                 .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString())
                 .build();
         ApiFuture<TlsRoute> future = networkServicesClient.getTlsRouteCallable().futureCall(request);
         // Do something.
         TlsRoute response = future.get();
       }
       
    • createTlsRouteAsync

      public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId)
      Creates a new TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         TlsRoute tlsRoute = TlsRoute.newBuilder().build();
         String tlsRouteId = "tlsRouteId-1642257463";
         TlsRoute response =
             networkServicesClient.createTlsRouteAsync(parent, tlsRoute, tlsRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.
      tlsRoute - Required. TlsRoute resource to be created.
      tlsRouteId - Required. Short name of the TlsRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createTlsRouteAsync

      public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId)
      Creates a new TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         TlsRoute tlsRoute = TlsRoute.newBuilder().build();
         String tlsRouteId = "tlsRouteId-1642257463";
         TlsRoute response =
             networkServicesClient.createTlsRouteAsync(parent, tlsRoute, tlsRouteId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.
      tlsRoute - Required. TlsRoute resource to be created.
      tlsRouteId - Required. Short name of the TlsRoute resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createTlsRouteAsync

      public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(CreateTlsRouteRequest request)
      Creates a new TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateTlsRouteRequest request =
             CreateTlsRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTlsRouteId("tlsRouteId-1642257463")
                 .setTlsRoute(TlsRoute.newBuilder().build())
                 .build();
         TlsRoute response = networkServicesClient.createTlsRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createTlsRouteOperationCallable

      public final OperationCallable<CreateTlsRouteRequest,TlsRoute,OperationMetadata> createTlsRouteOperationCallable()
      Creates a new TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateTlsRouteRequest request =
             CreateTlsRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTlsRouteId("tlsRouteId-1642257463")
                 .setTlsRoute(TlsRoute.newBuilder().build())
                 .build();
         OperationFuture<TlsRoute, OperationMetadata> future =
             networkServicesClient.createTlsRouteOperationCallable().futureCall(request);
         // Do something.
         TlsRoute response = future.get();
       }
       
    • createTlsRouteCallable

      public final UnaryCallable<CreateTlsRouteRequest,Operation> createTlsRouteCallable()
      Creates a new TlsRoute in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateTlsRouteRequest request =
             CreateTlsRouteRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setTlsRouteId("tlsRouteId-1642257463")
                 .setTlsRoute(TlsRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createTlsRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateTlsRouteAsync

      public final OperationFuture<TlsRoute,OperationMetadata> updateTlsRouteAsync(TlsRoute tlsRoute, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TlsRoute tlsRoute = TlsRoute.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         TlsRoute response = networkServicesClient.updateTlsRouteAsync(tlsRoute, updateMask).get();
       }
       
      Parameters:
      tlsRoute - Required. Updated TlsRoute resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateTlsRouteAsync

      public final OperationFuture<TlsRoute,OperationMetadata> updateTlsRouteAsync(UpdateTlsRouteRequest request)
      Updates the parameters of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateTlsRouteRequest request =
             UpdateTlsRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTlsRoute(TlsRoute.newBuilder().build())
                 .build();
         TlsRoute response = networkServicesClient.updateTlsRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateTlsRouteOperationCallable

      public final OperationCallable<UpdateTlsRouteRequest,TlsRoute,OperationMetadata> updateTlsRouteOperationCallable()
      Updates the parameters of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateTlsRouteRequest request =
             UpdateTlsRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTlsRoute(TlsRoute.newBuilder().build())
                 .build();
         OperationFuture<TlsRoute, OperationMetadata> future =
             networkServicesClient.updateTlsRouteOperationCallable().futureCall(request);
         // Do something.
         TlsRoute response = future.get();
       }
       
    • updateTlsRouteCallable

      public final UnaryCallable<UpdateTlsRouteRequest,Operation> updateTlsRouteCallable()
      Updates the parameters of a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateTlsRouteRequest request =
             UpdateTlsRouteRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setTlsRoute(TlsRoute.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateTlsRouteCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteTlsRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(TlsRouteName name)
      Deletes a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TlsRouteName name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]");
         networkServicesClient.deleteTlsRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteTlsRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(String name)
      Deletes a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString();
         networkServicesClient.deleteTlsRouteAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteTlsRouteAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(DeleteTlsRouteRequest request)
      Deletes a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteTlsRouteRequest request =
             DeleteTlsRouteRequest.newBuilder()
                 .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString())
                 .build();
         networkServicesClient.deleteTlsRouteAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteTlsRouteOperationCallable

      public final OperationCallable<DeleteTlsRouteRequest,com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteOperationCallable()
      Deletes a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteTlsRouteRequest request =
             DeleteTlsRouteRequest.newBuilder()
                 .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteTlsRouteOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteTlsRouteCallable

      public final UnaryCallable<DeleteTlsRouteRequest,Operation> deleteTlsRouteCallable()
      Deletes a single TlsRoute.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteTlsRouteRequest request =
             DeleteTlsRouteRequest.newBuilder()
                 .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteTlsRouteCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listServiceBindings

      public final NetworkServicesClient.ListServiceBindingsPagedResponse listServiceBindings(LocationName parent)
      Lists ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (ServiceBinding element :
             networkServicesClient.listServiceBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listServiceBindings

      public final NetworkServicesClient.ListServiceBindingsPagedResponse listServiceBindings(String parent)
      Lists ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (ServiceBinding element :
             networkServicesClient.listServiceBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listServiceBindings

      Lists ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListServiceBindingsRequest request =
             ListServiceBindingsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (ServiceBinding element :
             networkServicesClient.listServiceBindings(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listServiceBindingsPagedCallable

      Lists ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListServiceBindingsRequest request =
             ListServiceBindingsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<ServiceBinding> future =
             networkServicesClient.listServiceBindingsPagedCallable().futureCall(request);
         // Do something.
         for (ServiceBinding element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listServiceBindingsCallable

      public final UnaryCallable<ListServiceBindingsRequest,ListServiceBindingsResponse> listServiceBindingsCallable()
      Lists ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListServiceBindingsRequest request =
             ListServiceBindingsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListServiceBindingsResponse response =
               networkServicesClient.listServiceBindingsCallable().call(request);
           for (ServiceBinding element : response.getServiceBindingsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getServiceBinding

      public final ServiceBinding getServiceBinding(ServiceBindingName name)
      Gets details of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ServiceBindingName name =
             ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]");
         ServiceBinding response = networkServicesClient.getServiceBinding(name);
       }
       
      Parameters:
      name - Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/*/serviceBindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getServiceBinding

      public final ServiceBinding getServiceBinding(String name)
      Gets details of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString();
         ServiceBinding response = networkServicesClient.getServiceBinding(name);
       }
       
      Parameters:
      name - Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/*/serviceBindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getServiceBinding

      public final ServiceBinding getServiceBinding(GetServiceBindingRequest request)
      Gets details of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetServiceBindingRequest request =
             GetServiceBindingRequest.newBuilder()
                 .setName(
                     ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString())
                 .build();
         ServiceBinding response = networkServicesClient.getServiceBinding(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getServiceBindingCallable

      public final UnaryCallable<GetServiceBindingRequest,ServiceBinding> getServiceBindingCallable()
      Gets details of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetServiceBindingRequest request =
             GetServiceBindingRequest.newBuilder()
                 .setName(
                     ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString())
                 .build();
         ApiFuture<ServiceBinding> future =
             networkServicesClient.getServiceBindingCallable().futureCall(request);
         // Do something.
         ServiceBinding response = future.get();
       }
       
    • createServiceBindingAsync

      public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId)
      Creates a new ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         ServiceBinding serviceBinding = ServiceBinding.newBuilder().build();
         String serviceBindingId = "serviceBindingId-1424670901";
         ServiceBinding response =
             networkServicesClient
                 .createServiceBindingAsync(parent, serviceBinding, serviceBindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/*`.
      serviceBinding - Required. ServiceBinding resource to be created.
      serviceBindingId - Required. Short name of the ServiceBinding resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createServiceBindingAsync

      public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId)
      Creates a new ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         ServiceBinding serviceBinding = ServiceBinding.newBuilder().build();
         String serviceBindingId = "serviceBindingId-1424670901";
         ServiceBinding response =
             networkServicesClient
                 .createServiceBindingAsync(parent, serviceBinding, serviceBindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/*`.
      serviceBinding - Required. ServiceBinding resource to be created.
      serviceBindingId - Required. Short name of the ServiceBinding resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createServiceBindingAsync

      public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(CreateServiceBindingRequest request)
      Creates a new ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateServiceBindingRequest request =
             CreateServiceBindingRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setServiceBindingId("serviceBindingId-1424670901")
                 .setServiceBinding(ServiceBinding.newBuilder().build())
                 .build();
         ServiceBinding response = networkServicesClient.createServiceBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createServiceBindingOperationCallable

      public final OperationCallable<CreateServiceBindingRequest,ServiceBinding,OperationMetadata> createServiceBindingOperationCallable()
      Creates a new ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateServiceBindingRequest request =
             CreateServiceBindingRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setServiceBindingId("serviceBindingId-1424670901")
                 .setServiceBinding(ServiceBinding.newBuilder().build())
                 .build();
         OperationFuture<ServiceBinding, OperationMetadata> future =
             networkServicesClient.createServiceBindingOperationCallable().futureCall(request);
         // Do something.
         ServiceBinding response = future.get();
       }
       
    • createServiceBindingCallable

      public final UnaryCallable<CreateServiceBindingRequest,Operation> createServiceBindingCallable()
      Creates a new ServiceBinding in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateServiceBindingRequest request =
             CreateServiceBindingRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setServiceBindingId("serviceBindingId-1424670901")
                 .setServiceBinding(ServiceBinding.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createServiceBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateServiceBindingAsync

      public final OperationFuture<ServiceBinding,OperationMetadata> updateServiceBindingAsync(ServiceBinding serviceBinding, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ServiceBinding serviceBinding = ServiceBinding.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         ServiceBinding response =
             networkServicesClient.updateServiceBindingAsync(serviceBinding, updateMask).get();
       }
       
      Parameters:
      serviceBinding - Required. Updated ServiceBinding resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateServiceBindingAsync

      public final OperationFuture<ServiceBinding,OperationMetadata> updateServiceBindingAsync(UpdateServiceBindingRequest request)
      Updates the parameters of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateServiceBindingRequest request =
             UpdateServiceBindingRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setServiceBinding(ServiceBinding.newBuilder().build())
                 .build();
         ServiceBinding response = networkServicesClient.updateServiceBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateServiceBindingOperationCallable

      public final OperationCallable<UpdateServiceBindingRequest,ServiceBinding,OperationMetadata> updateServiceBindingOperationCallable()
      Updates the parameters of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateServiceBindingRequest request =
             UpdateServiceBindingRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setServiceBinding(ServiceBinding.newBuilder().build())
                 .build();
         OperationFuture<ServiceBinding, OperationMetadata> future =
             networkServicesClient.updateServiceBindingOperationCallable().futureCall(request);
         // Do something.
         ServiceBinding response = future.get();
       }
       
    • updateServiceBindingCallable

      public final UnaryCallable<UpdateServiceBindingRequest,Operation> updateServiceBindingCallable()
      Updates the parameters of a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateServiceBindingRequest request =
             UpdateServiceBindingRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setServiceBinding(ServiceBinding.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateServiceBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteServiceBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingAsync(ServiceBindingName name)
      Deletes a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ServiceBindingName name =
             ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]");
         networkServicesClient.deleteServiceBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/*/serviceBindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteServiceBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingAsync(String name)
      Deletes a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString();
         networkServicesClient.deleteServiceBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/*/serviceBindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteServiceBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingAsync(DeleteServiceBindingRequest request)
      Deletes a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteServiceBindingRequest request =
             DeleteServiceBindingRequest.newBuilder()
                 .setName(
                     ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString())
                 .build();
         networkServicesClient.deleteServiceBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteServiceBindingOperationCallable

      public final OperationCallable<DeleteServiceBindingRequest,com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingOperationCallable()
      Deletes a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteServiceBindingRequest request =
             DeleteServiceBindingRequest.newBuilder()
                 .setName(
                     ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteServiceBindingOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteServiceBindingCallable

      public final UnaryCallable<DeleteServiceBindingRequest,Operation> deleteServiceBindingCallable()
      Deletes a single ServiceBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteServiceBindingRequest request =
             DeleteServiceBindingRequest.newBuilder()
                 .setName(
                     ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteServiceBindingCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listMeshes

      Lists Meshes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Mesh element : networkServicesClient.listMeshes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listMeshes

      public final NetworkServicesClient.ListMeshesPagedResponse listMeshes(String parent)
      Lists Meshes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Mesh element : networkServicesClient.listMeshes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.
      Throws:
      ApiException - if the remote call fails
    • listMeshes

      Lists Meshes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListMeshesRequest request =
             ListMeshesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         for (Mesh element : networkServicesClient.listMeshes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMeshesPagedCallable

      Lists Meshes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListMeshesRequest request =
             ListMeshesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<Mesh> future = networkServicesClient.listMeshesPagedCallable().futureCall(request);
         // Do something.
         for (Mesh element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMeshesCallable

      public final UnaryCallable<ListMeshesRequest,ListMeshesResponse> listMeshesCallable()
      Lists Meshes in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListMeshesRequest request =
             ListMeshesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListMeshesResponse response = networkServicesClient.listMeshesCallable().call(request);
           for (Mesh element : response.getMeshesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getMesh

      public final Mesh getMesh(MeshName name)
      Gets details of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         MeshName name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]");
         Mesh response = networkServicesClient.getMesh(name);
       }
       
      Parameters:
      name - Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.
      Throws:
      ApiException - if the remote call fails
    • getMesh

      public final Mesh getMesh(String name)
      Gets details of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString();
         Mesh response = networkServicesClient.getMesh(name);
       }
       
      Parameters:
      name - Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.
      Throws:
      ApiException - if the remote call fails
    • getMesh

      public final Mesh getMesh(GetMeshRequest request)
      Gets details of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetMeshRequest request =
             GetMeshRequest.newBuilder()
                 .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .build();
         Mesh response = networkServicesClient.getMesh(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMeshCallable

      public final UnaryCallable<GetMeshRequest,Mesh> getMeshCallable()
      Gets details of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetMeshRequest request =
             GetMeshRequest.newBuilder()
                 .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .build();
         ApiFuture<Mesh> future = networkServicesClient.getMeshCallable().futureCall(request);
         // Do something.
         Mesh response = future.get();
       }
       
    • createMeshAsync

      public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(LocationName parent, Mesh mesh, String meshId)
      Creates a new Mesh in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Mesh mesh = Mesh.newBuilder().build();
         String meshId = "meshId-1077585944";
         Mesh response = networkServicesClient.createMeshAsync(parent, mesh, meshId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.
      mesh - Required. Mesh resource to be created.
      meshId - Required. Short name of the Mesh resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createMeshAsync

      public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(String parent, Mesh mesh, String meshId)
      Creates a new Mesh in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Mesh mesh = Mesh.newBuilder().build();
         String meshId = "meshId-1077585944";
         Mesh response = networkServicesClient.createMeshAsync(parent, mesh, meshId).get();
       }
       
      Parameters:
      parent - Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.
      mesh - Required. Mesh resource to be created.
      meshId - Required. Short name of the Mesh resource to be created.
      Throws:
      ApiException - if the remote call fails
    • createMeshAsync

      public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(CreateMeshRequest request)
      Creates a new Mesh in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateMeshRequest request =
             CreateMeshRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMeshId("meshId-1077585944")
                 .setMesh(Mesh.newBuilder().build())
                 .build();
         Mesh response = networkServicesClient.createMeshAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMeshOperationCallable

      public final OperationCallable<CreateMeshRequest,Mesh,OperationMetadata> createMeshOperationCallable()
      Creates a new Mesh in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateMeshRequest request =
             CreateMeshRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMeshId("meshId-1077585944")
                 .setMesh(Mesh.newBuilder().build())
                 .build();
         OperationFuture<Mesh, OperationMetadata> future =
             networkServicesClient.createMeshOperationCallable().futureCall(request);
         // Do something.
         Mesh response = future.get();
       }
       
    • createMeshCallable

      public final UnaryCallable<CreateMeshRequest,Operation> createMeshCallable()
      Creates a new Mesh in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateMeshRequest request =
             CreateMeshRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMeshId("meshId-1077585944")
                 .setMesh(Mesh.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = networkServicesClient.createMeshCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateMeshAsync

      public final OperationFuture<Mesh,OperationMetadata> updateMeshAsync(Mesh mesh, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         Mesh mesh = Mesh.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Mesh response = networkServicesClient.updateMeshAsync(mesh, updateMask).get();
       }
       
      Parameters:
      mesh - Required. Updated Mesh resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateMeshAsync

      public final OperationFuture<Mesh,OperationMetadata> updateMeshAsync(UpdateMeshRequest request)
      Updates the parameters of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateMeshRequest request =
             UpdateMeshRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setMesh(Mesh.newBuilder().build())
                 .build();
         Mesh response = networkServicesClient.updateMeshAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMeshOperationCallable

      public final OperationCallable<UpdateMeshRequest,Mesh,OperationMetadata> updateMeshOperationCallable()
      Updates the parameters of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateMeshRequest request =
             UpdateMeshRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setMesh(Mesh.newBuilder().build())
                 .build();
         OperationFuture<Mesh, OperationMetadata> future =
             networkServicesClient.updateMeshOperationCallable().futureCall(request);
         // Do something.
         Mesh response = future.get();
       }
       
    • updateMeshCallable

      public final UnaryCallable<UpdateMeshRequest,Operation> updateMeshCallable()
      Updates the parameters of a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateMeshRequest request =
             UpdateMeshRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setMesh(Mesh.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = networkServicesClient.updateMeshCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteMeshAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(MeshName name)
      Deletes a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         MeshName name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]");
         networkServicesClient.deleteMeshAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMeshAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(String name)
      Deletes a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString();
         networkServicesClient.deleteMeshAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMeshAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(DeleteMeshRequest request)
      Deletes a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteMeshRequest request =
             DeleteMeshRequest.newBuilder()
                 .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .build();
         networkServicesClient.deleteMeshAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMeshOperationCallable

      public final OperationCallable<DeleteMeshRequest,com.google.protobuf.Empty,OperationMetadata> deleteMeshOperationCallable()
      Deletes a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteMeshRequest request =
             DeleteMeshRequest.newBuilder()
                 .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteMeshOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteMeshCallable

      public final UnaryCallable<DeleteMeshRequest,Operation> deleteMeshCallable()
      Deletes a single Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteMeshRequest request =
             DeleteMeshRequest.newBuilder()
                 .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .build();
         ApiFuture<Operation> future = networkServicesClient.deleteMeshCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listServiceLbPolicies

      public final NetworkServicesClient.ListServiceLbPoliciesPagedResponse listServiceLbPolicies(LocationName parent)
      Lists ServiceLbPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (ServiceLbPolicy element :
             networkServicesClient.listServiceLbPolicies(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listServiceLbPolicies

      public final NetworkServicesClient.ListServiceLbPoliciesPagedResponse listServiceLbPolicies(String parent)
      Lists ServiceLbPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (ServiceLbPolicy element :
             networkServicesClient.listServiceLbPolicies(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listServiceLbPolicies

      Lists ServiceLbPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListServiceLbPoliciesRequest request =
             ListServiceLbPoliciesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (ServiceLbPolicy element :
             networkServicesClient.listServiceLbPolicies(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listServiceLbPoliciesPagedCallable

      Lists ServiceLbPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListServiceLbPoliciesRequest request =
             ListServiceLbPoliciesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<ServiceLbPolicy> future =
             networkServicesClient.listServiceLbPoliciesPagedCallable().futureCall(request);
         // Do something.
         for (ServiceLbPolicy element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listServiceLbPoliciesCallable

      public final UnaryCallable<ListServiceLbPoliciesRequest,ListServiceLbPoliciesResponse> listServiceLbPoliciesCallable()
      Lists ServiceLbPolicies in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListServiceLbPoliciesRequest request =
             ListServiceLbPoliciesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListServiceLbPoliciesResponse response =
               networkServicesClient.listServiceLbPoliciesCallable().call(request);
           for (ServiceLbPolicy element : response.getServiceLbPoliciesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getServiceLbPolicy

      public final ServiceLbPolicy getServiceLbPolicy(ServiceLbPolicyName name)
      Gets details of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ServiceLbPolicyName name =
             ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]");
         ServiceLbPolicy response = networkServicesClient.getServiceLbPolicy(name);
       }
       
      Parameters:
      name - Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • getServiceLbPolicy

      public final ServiceLbPolicy getServiceLbPolicy(String name)
      Gets details of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]").toString();
         ServiceLbPolicy response = networkServicesClient.getServiceLbPolicy(name);
       }
       
      Parameters:
      name - Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • getServiceLbPolicy

      public final ServiceLbPolicy getServiceLbPolicy(GetServiceLbPolicyRequest request)
      Gets details of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetServiceLbPolicyRequest request =
             GetServiceLbPolicyRequest.newBuilder()
                 .setName(
                     ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]")
                         .toString())
                 .build();
         ServiceLbPolicy response = networkServicesClient.getServiceLbPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getServiceLbPolicyCallable

      public final UnaryCallable<GetServiceLbPolicyRequest,ServiceLbPolicy> getServiceLbPolicyCallable()
      Gets details of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetServiceLbPolicyRequest request =
             GetServiceLbPolicyRequest.newBuilder()
                 .setName(
                     ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]")
                         .toString())
                 .build();
         ApiFuture<ServiceLbPolicy> future =
             networkServicesClient.getServiceLbPolicyCallable().futureCall(request);
         // Do something.
         ServiceLbPolicy response = future.get();
       }
       
    • createServiceLbPolicyAsync

      public final OperationFuture<ServiceLbPolicy,OperationMetadata> createServiceLbPolicyAsync(LocationName parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId)
      Creates a new ServiceLbPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         ServiceLbPolicy serviceLbPolicy = ServiceLbPolicy.newBuilder().build();
         String serviceLbPolicyId = "serviceLbPolicyId1391086104";
         ServiceLbPolicy response =
             networkServicesClient
                 .createServiceLbPolicyAsync(parent, serviceLbPolicy, serviceLbPolicyId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.
      serviceLbPolicy - Required. ServiceLbPolicy resource to be created.
      serviceLbPolicyId - Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}
      Throws:
      ApiException - if the remote call fails
    • createServiceLbPolicyAsync

      public final OperationFuture<ServiceLbPolicy,OperationMetadata> createServiceLbPolicyAsync(String parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId)
      Creates a new ServiceLbPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         ServiceLbPolicy serviceLbPolicy = ServiceLbPolicy.newBuilder().build();
         String serviceLbPolicyId = "serviceLbPolicyId1391086104";
         ServiceLbPolicy response =
             networkServicesClient
                 .createServiceLbPolicyAsync(parent, serviceLbPolicy, serviceLbPolicyId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.
      serviceLbPolicy - Required. ServiceLbPolicy resource to be created.
      serviceLbPolicyId - Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}
      Throws:
      ApiException - if the remote call fails
    • createServiceLbPolicyAsync

      public final OperationFuture<ServiceLbPolicy,OperationMetadata> createServiceLbPolicyAsync(CreateServiceLbPolicyRequest request)
      Creates a new ServiceLbPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateServiceLbPolicyRequest request =
             CreateServiceLbPolicyRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setServiceLbPolicyId("serviceLbPolicyId1391086104")
                 .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build())
                 .build();
         ServiceLbPolicy response = networkServicesClient.createServiceLbPolicyAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createServiceLbPolicyOperationCallable

      public final OperationCallable<CreateServiceLbPolicyRequest,ServiceLbPolicy,OperationMetadata> createServiceLbPolicyOperationCallable()
      Creates a new ServiceLbPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateServiceLbPolicyRequest request =
             CreateServiceLbPolicyRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setServiceLbPolicyId("serviceLbPolicyId1391086104")
                 .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build())
                 .build();
         OperationFuture<ServiceLbPolicy, OperationMetadata> future =
             networkServicesClient.createServiceLbPolicyOperationCallable().futureCall(request);
         // Do something.
         ServiceLbPolicy response = future.get();
       }
       
    • createServiceLbPolicyCallable

      public final UnaryCallable<CreateServiceLbPolicyRequest,Operation> createServiceLbPolicyCallable()
      Creates a new ServiceLbPolicy in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         CreateServiceLbPolicyRequest request =
             CreateServiceLbPolicyRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setServiceLbPolicyId("serviceLbPolicyId1391086104")
                 .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.createServiceLbPolicyCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateServiceLbPolicyAsync

      public final OperationFuture<ServiceLbPolicy,OperationMetadata> updateServiceLbPolicyAsync(ServiceLbPolicy serviceLbPolicy, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ServiceLbPolicy serviceLbPolicy = ServiceLbPolicy.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         ServiceLbPolicy response =
             networkServicesClient.updateServiceLbPolicyAsync(serviceLbPolicy, updateMask).get();
       }
       
      Parameters:
      serviceLbPolicy - Required. Updated ServiceLbPolicy resource.
      updateMask - Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateServiceLbPolicyAsync

      public final OperationFuture<ServiceLbPolicy,OperationMetadata> updateServiceLbPolicyAsync(UpdateServiceLbPolicyRequest request)
      Updates the parameters of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateServiceLbPolicyRequest request =
             UpdateServiceLbPolicyRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build())
                 .build();
         ServiceLbPolicy response = networkServicesClient.updateServiceLbPolicyAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateServiceLbPolicyOperationCallable

      public final OperationCallable<UpdateServiceLbPolicyRequest,ServiceLbPolicy,OperationMetadata> updateServiceLbPolicyOperationCallable()
      Updates the parameters of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateServiceLbPolicyRequest request =
             UpdateServiceLbPolicyRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build())
                 .build();
         OperationFuture<ServiceLbPolicy, OperationMetadata> future =
             networkServicesClient.updateServiceLbPolicyOperationCallable().futureCall(request);
         // Do something.
         ServiceLbPolicy response = future.get();
       }
       
    • updateServiceLbPolicyCallable

      public final UnaryCallable<UpdateServiceLbPolicyRequest,Operation> updateServiceLbPolicyCallable()
      Updates the parameters of a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         UpdateServiceLbPolicyRequest request =
             UpdateServiceLbPolicyRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.updateServiceLbPolicyCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteServiceLbPolicyAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyAsync(ServiceLbPolicyName name)
      Deletes a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ServiceLbPolicyName name =
             ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]");
         networkServicesClient.deleteServiceLbPolicyAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteServiceLbPolicyAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyAsync(String name)
      Deletes a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]").toString();
         networkServicesClient.deleteServiceLbPolicyAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteServiceLbPolicyAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyAsync(DeleteServiceLbPolicyRequest request)
      Deletes a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteServiceLbPolicyRequest request =
             DeleteServiceLbPolicyRequest.newBuilder()
                 .setName(
                     ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]")
                         .toString())
                 .build();
         networkServicesClient.deleteServiceLbPolicyAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteServiceLbPolicyOperationCallable

      public final OperationCallable<DeleteServiceLbPolicyRequest,com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyOperationCallable()
      Deletes a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteServiceLbPolicyRequest request =
             DeleteServiceLbPolicyRequest.newBuilder()
                 .setName(
                     ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             networkServicesClient.deleteServiceLbPolicyOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteServiceLbPolicyCallable

      public final UnaryCallable<DeleteServiceLbPolicyRequest,Operation> deleteServiceLbPolicyCallable()
      Deletes a single ServiceLbPolicy.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         DeleteServiceLbPolicyRequest request =
             DeleteServiceLbPolicyRequest.newBuilder()
                 .setName(
                     ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             networkServicesClient.deleteServiceLbPolicyCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getGatewayRouteView

      public final GatewayRouteView getGatewayRouteView(GatewayRouteViewName name)
      Get a single RouteView of a Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GatewayRouteViewName name =
             GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]");
         GatewayRouteView response = networkServicesClient.getGatewayRouteView(name);
       }
       
      Parameters:
      name - Required. Name of the GatewayRouteView resource. Formats: projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}
      Throws:
      ApiException - if the remote call fails
    • getGatewayRouteView

      public final GatewayRouteView getGatewayRouteView(String name)
      Get a single RouteView of a Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]")
                 .toString();
         GatewayRouteView response = networkServicesClient.getGatewayRouteView(name);
       }
       
      Parameters:
      name - Required. Name of the GatewayRouteView resource. Formats: projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}
      Throws:
      ApiException - if the remote call fails
    • getGatewayRouteView

      public final GatewayRouteView getGatewayRouteView(GetGatewayRouteViewRequest request)
      Get a single RouteView of a Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetGatewayRouteViewRequest request =
             GetGatewayRouteViewRequest.newBuilder()
                 .setName(
                     GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]")
                         .toString())
                 .build();
         GatewayRouteView response = networkServicesClient.getGatewayRouteView(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getGatewayRouteViewCallable

      public final UnaryCallable<GetGatewayRouteViewRequest,GatewayRouteView> getGatewayRouteViewCallable()
      Get a single RouteView of a Gateway.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetGatewayRouteViewRequest request =
             GetGatewayRouteViewRequest.newBuilder()
                 .setName(
                     GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]")
                         .toString())
                 .build();
         ApiFuture<GatewayRouteView> future =
             networkServicesClient.getGatewayRouteViewCallable().futureCall(request);
         // Do something.
         GatewayRouteView response = future.get();
       }
       
    • getMeshRouteView

      public final MeshRouteView getMeshRouteView(MeshRouteViewName name)
      Get a single RouteView of a Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         MeshRouteViewName name =
             MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]");
         MeshRouteView response = networkServicesClient.getMeshRouteView(name);
       }
       
      Parameters:
      name - Required. Name of the MeshRouteView resource. Format: projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}
      Throws:
      ApiException - if the remote call fails
    • getMeshRouteView

      public final MeshRouteView getMeshRouteView(String name)
      Get a single RouteView of a Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String name =
             MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]").toString();
         MeshRouteView response = networkServicesClient.getMeshRouteView(name);
       }
       
      Parameters:
      name - Required. Name of the MeshRouteView resource. Format: projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}
      Throws:
      ApiException - if the remote call fails
    • getMeshRouteView

      public final MeshRouteView getMeshRouteView(GetMeshRouteViewRequest request)
      Get a single RouteView of a Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetMeshRouteViewRequest request =
             GetMeshRouteViewRequest.newBuilder()
                 .setName(
                     MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]")
                         .toString())
                 .build();
         MeshRouteView response = networkServicesClient.getMeshRouteView(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMeshRouteViewCallable

      public final UnaryCallable<GetMeshRouteViewRequest,MeshRouteView> getMeshRouteViewCallable()
      Get a single RouteView of a Mesh.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetMeshRouteViewRequest request =
             GetMeshRouteViewRequest.newBuilder()
                 .setName(
                     MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]")
                         .toString())
                 .build();
         ApiFuture<MeshRouteView> future =
             networkServicesClient.getMeshRouteViewCallable().futureCall(request);
         // Do something.
         MeshRouteView response = future.get();
       }
       
    • listGatewayRouteViews

      public final NetworkServicesClient.ListGatewayRouteViewsPagedResponse listGatewayRouteViews(GatewayName parent)
      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GatewayName parent = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
         for (GatewayRouteView element :
             networkServicesClient.listGatewayRouteViews(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The Gateway to which a Route is associated. Formats: projects/{project}/locations/{location}/gateways/{gateway}
      Throws:
      ApiException - if the remote call fails
    • listGatewayRouteViews

      public final NetworkServicesClient.ListGatewayRouteViewsPagedResponse listGatewayRouteViews(String parent)
      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString();
         for (GatewayRouteView element :
             networkServicesClient.listGatewayRouteViews(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The Gateway to which a Route is associated. Formats: projects/{project}/locations/{location}/gateways/{gateway}
      Throws:
      ApiException - if the remote call fails
    • listGatewayRouteViews

      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGatewayRouteViewsRequest request =
             ListGatewayRouteViewsRequest.newBuilder()
                 .setParent(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (GatewayRouteView element :
             networkServicesClient.listGatewayRouteViews(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listGatewayRouteViewsPagedCallable

      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGatewayRouteViewsRequest request =
             ListGatewayRouteViewsRequest.newBuilder()
                 .setParent(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<GatewayRouteView> future =
             networkServicesClient.listGatewayRouteViewsPagedCallable().futureCall(request);
         // Do something.
         for (GatewayRouteView element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listGatewayRouteViewsCallable

      public final UnaryCallable<ListGatewayRouteViewsRequest,ListGatewayRouteViewsResponse> listGatewayRouteViewsCallable()
      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListGatewayRouteViewsRequest request =
             ListGatewayRouteViewsRequest.newBuilder()
                 .setParent(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListGatewayRouteViewsResponse response =
               networkServicesClient.listGatewayRouteViewsCallable().call(request);
           for (GatewayRouteView element : response.getGatewayRouteViewsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listMeshRouteViews

      public final NetworkServicesClient.ListMeshRouteViewsPagedResponse listMeshRouteViews(MeshName parent)
      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         MeshName parent = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]");
         for (MeshRouteView element : networkServicesClient.listMeshRouteViews(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The Mesh to which a Route is associated. Format: projects/{project}/locations/{location}/meshes/{mesh}
      Throws:
      ApiException - if the remote call fails
    • listMeshRouteViews

      public final NetworkServicesClient.ListMeshRouteViewsPagedResponse listMeshRouteViews(String parent)
      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         String parent = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString();
         for (MeshRouteView element : networkServicesClient.listMeshRouteViews(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The Mesh to which a Route is associated. Format: projects/{project}/locations/{location}/meshes/{mesh}
      Throws:
      ApiException - if the remote call fails
    • listMeshRouteViews

      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListMeshRouteViewsRequest request =
             ListMeshRouteViewsRequest.newBuilder()
                 .setParent(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (MeshRouteView element : networkServicesClient.listMeshRouteViews(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMeshRouteViewsPagedCallable

      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListMeshRouteViewsRequest request =
             ListMeshRouteViewsRequest.newBuilder()
                 .setParent(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<MeshRouteView> future =
             networkServicesClient.listMeshRouteViewsPagedCallable().futureCall(request);
         // Do something.
         for (MeshRouteView element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMeshRouteViewsCallable

      public final UnaryCallable<ListMeshRouteViewsRequest,ListMeshRouteViewsResponse> listMeshRouteViewsCallable()
      Lists RouteViews

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListMeshRouteViewsRequest request =
             ListMeshRouteViewsRequest.newBuilder()
                 .setParent(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListMeshRouteViewsResponse response =
               networkServicesClient.listMeshRouteViewsCallable().call(request);
           for (MeshRouteView element : response.getMeshRouteViewsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : networkServicesClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             networkServicesClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               networkServicesClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = networkServicesClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future = networkServicesClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = networkServicesClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = networkServicesClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = networkServicesClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = networkServicesClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response = networkServicesClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             networkServicesClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException