Class NetworkServicesClient (0.3.0)

GitHub RepositoryProduct Reference

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()

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()

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()

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_DENIEDerrors.

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.

Inheritance

java.lang.Object > NetworkServicesClient

Static Methods

create()

public static final NetworkServicesClient create()

Constructs an instance of NetworkServicesClient with default settings.

Returns
Type Description
NetworkServicesClient
Exceptions
Type Description
IOException

create(NetworkServicesSettings settings)

public static final NetworkServicesClient create(NetworkServicesSettings settings)

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.

Parameter
Name Description
settings NetworkServicesSettings
Returns
Type Description
NetworkServicesClient
Exceptions
Type Description
IOException

create(NetworkServicesStub stub)

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).

Parameter
Name Description
stub NetworkServicesStub
Returns
Type Description
NetworkServicesClient

Constructors

NetworkServicesClient(NetworkServicesSettings settings)

protected NetworkServicesClient(NetworkServicesSettings settings)

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.

Parameter
Name Description
settings NetworkServicesSettings

NetworkServicesClient(NetworkServicesStub stub)

protected NetworkServicesClient(NetworkServicesStub stub)
Parameter
Name Description
stub NetworkServicesStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createEndpointPolicyAsync(CreateEndpointPolicyRequest request)

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();
 }
 
Parameter
Name Description
request CreateEndpointPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<EndpointPolicy,OperationMetadata>

createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId)

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
Name Description
parent LocationName

Required. The parent resource of the EndpointPolicy. Must be in the format projects/*/locations/global.

endpointPolicy EndpointPolicy

Required. EndpointPolicy resource to be created.

endpointPolicyId String

Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".

Returns
Type Description
OperationFuture<EndpointPolicy,OperationMetadata>

createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId)

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
Name Description
parent String

Required. The parent resource of the EndpointPolicy. Must be in the format projects/*/locations/global.

endpointPolicy EndpointPolicy

Required. EndpointPolicy resource to be created.

endpointPolicyId String

Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".

Returns
Type Description
OperationFuture<EndpointPolicy,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateEndpointPolicyRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateEndpointPolicyRequest,EndpointPolicy,OperationMetadata>

createGatewayAsync(CreateGatewayRequest request)

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();
 }
 
Parameter
Name Description
request CreateGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)

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
Name Description
parent LocationName

Required. The parent resource of the Gateway. Must be in the format projects/*/locations/*.

gateway Gateway

Required. Gateway resource to be created.

gatewayId String

Required. Short name of the Gateway resource to be created.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

createGatewayAsync(String parent, Gateway gateway, String gatewayId)

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
Name Description
parent String

Required. The parent resource of the Gateway. Must be in the format projects/*/locations/*.

gateway Gateway

Required. Gateway resource to be created.

gatewayId String

Required. Short name of the Gateway resource to be created.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateGatewayRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata>

createGrpcRouteAsync(CreateGrpcRouteRequest request)

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();
 }
 
Parameter
Name Description
request CreateGrpcRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<GrpcRoute,OperationMetadata>

createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId)

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
Name Description
parent LocationName

Required. The parent resource of the GrpcRoute. Must be in the format projects/*/locations/global.

grpcRoute GrpcRoute

Required. GrpcRoute resource to be created.

grpcRouteId String

Required. Short name of the GrpcRoute resource to be created.

Returns
Type Description
OperationFuture<GrpcRoute,OperationMetadata>

createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId)

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
Name Description
parent String

Required. The parent resource of the GrpcRoute. Must be in the format projects/*/locations/global.

grpcRoute GrpcRoute

Required. GrpcRoute resource to be created.

grpcRouteId String

Required. Short name of the GrpcRoute resource to be created.

Returns
Type Description
OperationFuture<GrpcRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateGrpcRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateGrpcRouteRequest,GrpcRoute,OperationMetadata>

createHttpRouteAsync(CreateHttpRouteRequest request)

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();
 }
 
Parameter
Name Description
request CreateHttpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<HttpRoute,OperationMetadata>

createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId)

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
Name Description
parent LocationName

Required. The parent resource of the HttpRoute. Must be in the format projects/*/locations/global.

httpRoute HttpRoute

Required. HttpRoute resource to be created.

httpRouteId String

Required. Short name of the HttpRoute resource to be created.

Returns
Type Description
OperationFuture<HttpRoute,OperationMetadata>

createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId)

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
Name Description
parent String

Required. The parent resource of the HttpRoute. Must be in the format projects/*/locations/global.

httpRoute HttpRoute

Required. HttpRoute resource to be created.

httpRouteId String

Required. Short name of the HttpRoute resource to be created.

Returns
Type Description
OperationFuture<HttpRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateHttpRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateHttpRouteRequest,HttpRoute,OperationMetadata>

createMeshAsync(CreateMeshRequest request)

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();
 }
 
Parameter
Name Description
request CreateMeshRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Mesh,OperationMetadata>

createMeshAsync(LocationName parent, Mesh mesh, String meshId)

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
Name Description
parent LocationName

Required. The parent resource of the Mesh. Must be in the format projects/*/locations/global.

mesh Mesh

Required. Mesh resource to be created.

meshId String

Required. Short name of the Mesh resource to be created.

Returns
Type Description
OperationFuture<Mesh,OperationMetadata>

createMeshAsync(String parent, Mesh mesh, String meshId)

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
Name Description
parent String

Required. The parent resource of the Mesh. Must be in the format projects/*/locations/global.

mesh Mesh

Required. Mesh resource to be created.

meshId String

Required. Short name of the Mesh resource to be created.

Returns
Type Description
OperationFuture<Mesh,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateMeshRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateMeshRequest,Mesh,OperationMetadata>

createServiceBindingAsync(CreateServiceBindingRequest request)

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();
 }
 
Parameter
Name Description
request CreateServiceBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<ServiceBinding,OperationMetadata>

createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId)

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
Name Description
parent LocationName

Required. The parent resource of the ServiceBinding. Must be in the format projects/*/locations/global.

serviceBinding ServiceBinding

Required. ServiceBinding resource to be created.

serviceBindingId String

Required. Short name of the ServiceBinding resource to be created.

Returns
Type Description
OperationFuture<ServiceBinding,OperationMetadata>

createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId)

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
Name Description
parent String

Required. The parent resource of the ServiceBinding. Must be in the format projects/*/locations/global.

serviceBinding ServiceBinding

Required. ServiceBinding resource to be created.

serviceBindingId String

Required. Short name of the ServiceBinding resource to be created.

Returns
Type Description
OperationFuture<ServiceBinding,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateServiceBindingRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateServiceBindingRequest,ServiceBinding,OperationMetadata>

createTcpRouteAsync(CreateTcpRouteRequest request)

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();
 }
 
Parameter
Name Description
request CreateTcpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<TcpRoute,OperationMetadata>

createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId)

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
Name Description
parent LocationName

Required. The parent resource of the TcpRoute. Must be in the format projects/*/locations/global.

tcpRoute TcpRoute

Required. TcpRoute resource to be created.

tcpRouteId String

Required. Short name of the TcpRoute resource to be created.

Returns
Type Description
OperationFuture<TcpRoute,OperationMetadata>

createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId)

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
Name Description
parent String

Required. The parent resource of the TcpRoute. Must be in the format projects/*/locations/global.

tcpRoute TcpRoute

Required. TcpRoute resource to be created.

tcpRouteId String

Required. Short name of the TcpRoute resource to be created.

Returns
Type Description
OperationFuture<TcpRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateTcpRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateTcpRouteRequest,TcpRoute,OperationMetadata>

createTlsRouteAsync(CreateTlsRouteRequest request)

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();
 }
 
Parameter
Name Description
request CreateTlsRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<TlsRoute,OperationMetadata>

createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId)

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
Name Description
parent LocationName

Required. The parent resource of the TlsRoute. Must be in the format projects/*/locations/global.

tlsRoute TlsRoute

Required. TlsRoute resource to be created.

tlsRouteId String

Required. Short name of the TlsRoute resource to be created.

Returns
Type Description
OperationFuture<TlsRoute,OperationMetadata>

createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId)

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
Name Description
parent String

Required. The parent resource of the TlsRoute. Must be in the format projects/*/locations/global.

tlsRoute TlsRoute

Required. TlsRoute resource to be created.

tlsRouteId String

Required. Short name of the TlsRoute resource to be created.

Returns
Type Description
OperationFuture<TlsRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<CreateTlsRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<CreateTlsRouteRequest,TlsRoute,OperationMetadata>

deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteEndpointPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteEndpointPolicyAsync(EndpointPolicyName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name EndpointPolicyName

Required. A name of the EndpointPolicy to delete. Must be in the format projects/*/locations/global/endpointPolicies/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteEndpointPolicyAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the EndpointPolicy to delete. Must be in the format projects/*/locations/global/endpointPolicies/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteEndpointPolicyRequest,Operation>

deleteEndpointPolicyOperationCallable()

public final OperationCallable<DeleteEndpointPolicyRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteEndpointPolicyRequest,Empty,OperationMetadata>

deleteGatewayAsync(DeleteGatewayRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGatewayAsync(GatewayName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name GatewayName

Required. A name of the Gateway to delete. Must be in the format projects/*/locations/*/gateways/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGatewayAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the Gateway to delete. Must be in the format projects/*/locations/*/gateways/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteGatewayRequest,Operation>

deleteGatewayOperationCallable()

public final OperationCallable<DeleteGatewayRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteGatewayRequest,Empty,OperationMetadata>

deleteGrpcRouteAsync(DeleteGrpcRouteRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteGrpcRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGrpcRouteAsync(GrpcRouteName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name GrpcRouteName

Required. A name of the GrpcRoute to delete. Must be in the format projects/*/locations/global/grpcRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGrpcRouteAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the GrpcRoute to delete. Must be in the format projects/*/locations/global/grpcRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteGrpcRouteRequest,Operation>

deleteGrpcRouteOperationCallable()

public final OperationCallable<DeleteGrpcRouteRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteGrpcRouteRequest,Empty,OperationMetadata>

deleteHttpRouteAsync(DeleteHttpRouteRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteHttpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteHttpRouteAsync(HttpRouteName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name HttpRouteName

Required. A name of the HttpRoute to delete. Must be in the format projects/*/locations/global/httpRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteHttpRouteAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the HttpRoute to delete. Must be in the format projects/*/locations/global/httpRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteHttpRouteRequest,Operation>

deleteHttpRouteOperationCallable()

public final OperationCallable<DeleteHttpRouteRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteHttpRouteRequest,Empty,OperationMetadata>

deleteMeshAsync(DeleteMeshRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteMeshRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMeshAsync(MeshName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name MeshName

Required. A name of the Mesh to delete. Must be in the format projects/*/locations/global/meshes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMeshAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the Mesh to delete. Must be in the format projects/*/locations/global/meshes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteMeshRequest,Operation>

deleteMeshOperationCallable()

public final OperationCallable<DeleteMeshRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteMeshRequest,Empty,OperationMetadata>

deleteServiceBindingAsync(DeleteServiceBindingRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteServiceBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteServiceBindingAsync(ServiceBindingName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name ServiceBindingName

Required. A name of the ServiceBinding to delete. Must be in the format projects/*/locations/global/serviceBindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteServiceBindingAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the ServiceBinding to delete. Must be in the format projects/*/locations/global/serviceBindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteServiceBindingRequest,Operation>

deleteServiceBindingOperationCallable()

public final OperationCallable<DeleteServiceBindingRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteServiceBindingRequest,Empty,OperationMetadata>

deleteTcpRouteAsync(DeleteTcpRouteRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteTcpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTcpRouteAsync(TcpRouteName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name TcpRouteName

Required. A name of the TcpRoute to delete. Must be in the format projects/*/locations/global/tcpRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTcpRouteAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the TcpRoute to delete. Must be in the format projects/*/locations/global/tcpRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteTcpRouteRequest,Operation>

deleteTcpRouteOperationCallable()

public final OperationCallable<DeleteTcpRouteRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteTcpRouteRequest,Empty,OperationMetadata>

deleteTlsRouteAsync(DeleteTlsRouteRequest request)

public final OperationFuture<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();
 }
 
Parameter
Name Description
request DeleteTlsRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTlsRouteAsync(TlsRouteName name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name TlsRouteName

Required. A name of the TlsRoute to delete. Must be in the format projects/*/locations/global/tlsRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTlsRouteAsync(String name)

public final OperationFuture<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();
 }
 
Parameter
Name Description
name String

Required. A name of the TlsRoute to delete. Must be in the format projects/*/locations/global/tlsRoutes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<DeleteTlsRouteRequest,Operation>

deleteTlsRouteOperationCallable()

public final OperationCallable<DeleteTlsRouteRequest,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();
 }
 
Returns
Type Description
OperationCallable<DeleteTlsRouteRequest,Empty,OperationMetadata>

getEndpointPolicy(EndpointPolicyName name)

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);
 }
 
Parameter
Name Description
name EndpointPolicyName

Required. A name of the EndpointPolicy to get. Must be in the format projects/*/locations/global/endpointPolicies/*.

Returns
Type Description
EndpointPolicy

getEndpointPolicy(GetEndpointPolicyRequest request)

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);
 }
 
Parameter
Name Description
request GetEndpointPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
EndpointPolicy

getEndpointPolicy(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the EndpointPolicy to get. Must be in the format projects/*/locations/global/endpointPolicies/*.

Returns
Type Description
EndpointPolicy

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();
 }
 
Returns
Type Description
UnaryCallable<GetEndpointPolicyRequest,EndpointPolicy>

getGateway(GatewayName name)

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);
 }
 
Parameter
Name Description
name GatewayName

Required. A name of the Gateway to get. Must be in the format projects/*/locations/*/gateways/*.

Returns
Type Description
Gateway

getGateway(GetGatewayRequest request)

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);
 }
 
Parameter
Name Description
request GetGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Gateway

getGateway(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the Gateway to get. Must be in the format projects/*/locations/*/gateways/*.

Returns
Type Description
Gateway

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();
 }
 
Returns
Type Description
UnaryCallable<GetGatewayRequest,Gateway>

getGrpcRoute(GetGrpcRouteRequest request)

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);
 }
 
Parameter
Name Description
request GetGrpcRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GrpcRoute

getGrpcRoute(GrpcRouteName name)

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);
 }
 
Parameter
Name Description
name GrpcRouteName

Required. A name of the GrpcRoute to get. Must be in the format projects/*/locations/global/grpcRoutes/*.

Returns
Type Description
GrpcRoute

getGrpcRoute(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the GrpcRoute to get. Must be in the format projects/*/locations/global/grpcRoutes/*.

Returns
Type Description
GrpcRoute

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();
 }
 
Returns
Type Description
UnaryCallable<GetGrpcRouteRequest,GrpcRoute>

getHttpJsonOperationsClient()

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.

Returns
Type Description
OperationsClient

getHttpRoute(GetHttpRouteRequest request)

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);
 }
 
Parameter
Name Description
request GetHttpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
HttpRoute

getHttpRoute(HttpRouteName name)

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);
 }
 
Parameter
Name Description
name HttpRouteName

Required. A name of the HttpRoute to get. Must be in the format projects/*/locations/global/httpRoutes/*.

Returns
Type Description
HttpRoute

getHttpRoute(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the HttpRoute to get. Must be in the format projects/*/locations/global/httpRoutes/*.

Returns
Type Description
HttpRoute

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();
 }
 
Returns
Type Description
UnaryCallable<GetHttpRouteRequest,HttpRoute>

getIamPolicy(GetIamPolicyRequest request)

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

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);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getMesh(GetMeshRequest request)

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);
 }
 
Parameter
Name Description
request GetMeshRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Mesh

getMesh(MeshName name)

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);
 }
 
Parameter
Name Description
name MeshName

Required. A name of the Mesh to get. Must be in the format projects/*/locations/global/meshes/*.

Returns
Type Description
Mesh

getMesh(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the Mesh to get. Must be in the format projects/*/locations/global/meshes/*.

Returns
Type Description
Mesh

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();
 }
 
Returns
Type Description
UnaryCallable<GetMeshRequest,Mesh>

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.

Returns
Type Description
OperationsClient

getServiceBinding(GetServiceBindingRequest request)

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);
 }
 
Parameter
Name Description
request GetServiceBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ServiceBinding

getServiceBinding(ServiceBindingName name)

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);
 }
 
Parameter
Name Description
name ServiceBindingName

Required. A name of the ServiceBinding to get. Must be in the format projects/*/locations/global/serviceBindings/*.

Returns
Type Description
ServiceBinding

getServiceBinding(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the ServiceBinding to get. Must be in the format projects/*/locations/global/serviceBindings/*.

Returns
Type Description
ServiceBinding

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();
 }
 
Returns
Type Description
UnaryCallable<GetServiceBindingRequest,ServiceBinding>

getSettings()

public final NetworkServicesSettings getSettings()
Returns
Type Description
NetworkServicesSettings

getStub()

public NetworkServicesStub getStub()
Returns
Type Description
NetworkServicesStub

getTcpRoute(GetTcpRouteRequest request)

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);
 }
 
Parameter
Name Description
request GetTcpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TcpRoute

getTcpRoute(TcpRouteName name)

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);
 }
 
Parameter
Name Description
name TcpRouteName

Required. A name of the TcpRoute to get. Must be in the format projects/*/locations/global/tcpRoutes/*.

Returns
Type Description
TcpRoute

getTcpRoute(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the TcpRoute to get. Must be in the format projects/*/locations/global/tcpRoutes/*.

Returns
Type Description
TcpRoute

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();
 }
 
Returns
Type Description
UnaryCallable<GetTcpRouteRequest,TcpRoute>

getTlsRoute(GetTlsRouteRequest request)

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);
 }
 
Parameter
Name Description
request GetTlsRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TlsRoute

getTlsRoute(TlsRouteName name)

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);
 }
 
Parameter
Name Description
name TlsRouteName

Required. A name of the TlsRoute to get. Must be in the format projects/*/locations/global/tlsRoutes/*.

Returns
Type Description
TlsRoute

getTlsRoute(String name)

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);
 }
 
Parameter
Name Description
name String

Required. A name of the TlsRoute to get. Must be in the format projects/*/locations/global/tlsRoutes/*.

Returns
Type Description
TlsRoute

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();
 }
 
Returns
Type Description
UnaryCallable<GetTlsRouteRequest,TlsRoute>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listEndpointPolicies(ListEndpointPoliciesRequest request)

public final NetworkServicesClient.ListEndpointPoliciesPagedResponse listEndpointPolicies(ListEndpointPoliciesRequest request)

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")
           .build();
   for (EndpointPolicy element :
       networkServicesClient.listEndpointPolicies(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListEndpointPoliciesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListEndpointPoliciesPagedResponse

listEndpointPolicies(LocationName parent)

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);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the EndpointPolicies should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListEndpointPoliciesPagedResponse

listEndpointPolicies(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the EndpointPolicies should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListEndpointPoliciesPagedResponse

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")
           .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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListEndpointPoliciesRequest,ListEndpointPoliciesResponse>

listEndpointPoliciesPagedCallable()

public final UnaryCallable<ListEndpointPoliciesRequest,NetworkServicesClient.ListEndpointPoliciesPagedResponse> 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")
           .build();
   ApiFuture<EndpointPolicy> future =
       networkServicesClient.listEndpointPoliciesPagedCallable().futureCall(request);
   // Do something.
   for (EndpointPolicy element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListEndpointPoliciesRequest,ListEndpointPoliciesPagedResponse>

listGateways(ListGatewaysRequest request)

public final NetworkServicesClient.ListGatewaysPagedResponse listGateways(ListGatewaysRequest request)

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);
   }
 }
 
Parameter
Name Description
request ListGatewaysRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListGatewaysPagedResponse

listGateways(LocationName parent)

public final NetworkServicesClient.ListGatewaysPagedResponse listGateways(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Gateway element : networkServicesClient.listGateways(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the Gateways should be listed, specified in the format projects/*/locations/*.

Returns
Type Description
NetworkServicesClient.ListGatewaysPagedResponse

listGateways(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the Gateways should be listed, specified in the format projects/*/locations/*.

Returns
Type Description
NetworkServicesClient.ListGatewaysPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGatewaysRequest,ListGatewaysResponse>

listGatewaysPagedCallable()

public final UnaryCallable<ListGatewaysRequest,NetworkServicesClient.ListGatewaysPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGatewaysRequest,ListGatewaysPagedResponse>

listGrpcRoutes(ListGrpcRoutesRequest request)

public final NetworkServicesClient.ListGrpcRoutesPagedResponse listGrpcRoutes(ListGrpcRoutesRequest request)

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")
           .build();
   for (GrpcRoute element : networkServicesClient.listGrpcRoutes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListGrpcRoutesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListGrpcRoutesPagedResponse

listGrpcRoutes(LocationName parent)

public final NetworkServicesClient.ListGrpcRoutesPagedResponse listGrpcRoutes(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (GrpcRoute element : networkServicesClient.listGrpcRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the GrpcRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListGrpcRoutesPagedResponse

listGrpcRoutes(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the GrpcRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListGrpcRoutesPagedResponse

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")
           .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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGrpcRoutesRequest,ListGrpcRoutesResponse>

listGrpcRoutesPagedCallable()

public final UnaryCallable<ListGrpcRoutesRequest,NetworkServicesClient.ListGrpcRoutesPagedResponse> 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")
           .build();
   ApiFuture<GrpcRoute> future =
       networkServicesClient.listGrpcRoutesPagedCallable().futureCall(request);
   // Do something.
   for (GrpcRoute element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGrpcRoutesRequest,ListGrpcRoutesPagedResponse>

listHttpRoutes(ListHttpRoutesRequest request)

public final NetworkServicesClient.ListHttpRoutesPagedResponse listHttpRoutes(ListHttpRoutesRequest request)

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")
           .build();
   for (HttpRoute element : networkServicesClient.listHttpRoutes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListHttpRoutesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListHttpRoutesPagedResponse

listHttpRoutes(LocationName parent)

public final NetworkServicesClient.ListHttpRoutesPagedResponse listHttpRoutes(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (HttpRoute element : networkServicesClient.listHttpRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the HttpRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListHttpRoutesPagedResponse

listHttpRoutes(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the HttpRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListHttpRoutesPagedResponse

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")
           .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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListHttpRoutesRequest,ListHttpRoutesResponse>

listHttpRoutesPagedCallable()

public final UnaryCallable<ListHttpRoutesRequest,NetworkServicesClient.ListHttpRoutesPagedResponse> 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")
           .build();
   ApiFuture<HttpRoute> future =
       networkServicesClient.listHttpRoutesPagedCallable().futureCall(request);
   // Do something.
   for (HttpRoute element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListHttpRoutesRequest,ListHttpRoutesPagedResponse>

listLocations(ListLocationsRequest request)

public final NetworkServicesClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

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);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListLocationsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,NetworkServicesClient.ListLocationsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listMeshes(ListMeshesRequest request)

public final NetworkServicesClient.ListMeshesPagedResponse listMeshes(ListMeshesRequest request)

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")
           .build();
   for (Mesh element : networkServicesClient.listMeshes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListMeshesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListMeshesPagedResponse

listMeshes(LocationName parent)

public final NetworkServicesClient.ListMeshesPagedResponse listMeshes(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Mesh element : networkServicesClient.listMeshes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the Meshes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListMeshesPagedResponse

listMeshes(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the Meshes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListMeshesPagedResponse

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")
           .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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListMeshesRequest,ListMeshesResponse>

listMeshesPagedCallable()

public final UnaryCallable<ListMeshesRequest,NetworkServicesClient.ListMeshesPagedResponse> 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")
           .build();
   ApiFuture<Mesh> future = networkServicesClient.listMeshesPagedCallable().futureCall(request);
   // Do something.
   for (Mesh element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListMeshesRequest,ListMeshesPagedResponse>

listServiceBindings(ListServiceBindingsRequest request)

public final NetworkServicesClient.ListServiceBindingsPagedResponse listServiceBindings(ListServiceBindingsRequest request)

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);
   }
 }
 
Parameter
Name Description
request ListServiceBindingsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListServiceBindingsPagedResponse

listServiceBindings(LocationName parent)

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);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the ServiceBindings should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListServiceBindingsPagedResponse

listServiceBindings(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the ServiceBindings should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListServiceBindingsPagedResponse

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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListServiceBindingsRequest,ListServiceBindingsResponse>

listServiceBindingsPagedCallable()

public final UnaryCallable<ListServiceBindingsRequest,NetworkServicesClient.ListServiceBindingsPagedResponse> 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);
   }
 }
 
Returns
Type Description
UnaryCallable<ListServiceBindingsRequest,ListServiceBindingsPagedResponse>

listTcpRoutes(ListTcpRoutesRequest request)

public final NetworkServicesClient.ListTcpRoutesPagedResponse listTcpRoutes(ListTcpRoutesRequest request)

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")
           .build();
   for (TcpRoute element : networkServicesClient.listTcpRoutes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListTcpRoutesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListTcpRoutesPagedResponse

listTcpRoutes(LocationName parent)

public final NetworkServicesClient.ListTcpRoutesPagedResponse listTcpRoutes(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (TcpRoute element : networkServicesClient.listTcpRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the TcpRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListTcpRoutesPagedResponse

listTcpRoutes(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the TcpRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListTcpRoutesPagedResponse

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")
           .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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListTcpRoutesRequest,ListTcpRoutesResponse>

listTcpRoutesPagedCallable()

public final UnaryCallable<ListTcpRoutesRequest,NetworkServicesClient.ListTcpRoutesPagedResponse> 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")
           .build();
   ApiFuture<TcpRoute> future =
       networkServicesClient.listTcpRoutesPagedCallable().futureCall(request);
   // Do something.
   for (TcpRoute element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListTcpRoutesRequest,ListTcpRoutesPagedResponse>

listTlsRoutes(ListTlsRoutesRequest request)

public final NetworkServicesClient.ListTlsRoutesPagedResponse listTlsRoutes(ListTlsRoutesRequest request)

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")
           .build();
   for (TlsRoute element : networkServicesClient.listTlsRoutes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListTlsRoutesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
NetworkServicesClient.ListTlsRoutesPagedResponse

listTlsRoutes(LocationName parent)

public final NetworkServicesClient.ListTlsRoutesPagedResponse listTlsRoutes(LocationName 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (TlsRoute element : networkServicesClient.listTlsRoutes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location from which the TlsRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListTlsRoutesPagedResponse

listTlsRoutes(String parent)

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);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location from which the TlsRoutes should be listed, specified in the format projects/*/locations/global.

Returns
Type Description
NetworkServicesClient.ListTlsRoutesPagedResponse

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")
           .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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListTlsRoutesRequest,ListTlsRoutesResponse>

listTlsRoutesPagedCallable()

public final UnaryCallable<ListTlsRoutesRequest,NetworkServicesClient.ListTlsRoutesPagedResponse> 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")
           .build();
   ApiFuture<TlsRoute> future =
       networkServicesClient.listTlsRoutesPagedCallable().futureCall(request);
   // Do something.
   for (TlsRoute element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListTlsRoutesRequest,ListTlsRoutesPagedResponse>

setIamPolicy(SetIamPolicyRequest request)

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_DENIEDerrors.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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);
 }
 
Parameter
Name Description
request com.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

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_DENIEDerrors.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating 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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

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);
 }
 
Parameter
Name Description
request com.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.TestIamPermissionsResponse

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();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

updateEndpointPolicyAsync(EndpointPolicy endpointPolicy, FieldMask updateMask)

public final OperationFuture<EndpointPolicy,OperationMetadata> updateEndpointPolicyAsync(EndpointPolicy endpointPolicy, 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
Name Description
endpointPolicy EndpointPolicy

Required. Updated EndpointPolicy resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<EndpointPolicy,OperationMetadata>

updateEndpointPolicyAsync(UpdateEndpointPolicyRequest request)

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();
 }
 
Parameter
Name Description
request UpdateEndpointPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<EndpointPolicy,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateEndpointPolicyRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateEndpointPolicyRequest,EndpointPolicy,OperationMetadata>

updateGatewayAsync(Gateway gateway, FieldMask updateMask)

public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(Gateway gateway, 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
Name Description
gateway Gateway

Required. Updated Gateway resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

updateGatewayAsync(UpdateGatewayRequest request)

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();
 }
 
Parameter
Name Description
request UpdateGatewayRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Gateway,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateGatewayRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateGatewayRequest,Gateway,OperationMetadata>

updateGrpcRouteAsync(GrpcRoute grpcRoute, FieldMask updateMask)

public final OperationFuture<GrpcRoute,OperationMetadata> updateGrpcRouteAsync(GrpcRoute grpcRoute, 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
Name Description
grpcRoute GrpcRoute

Required. Updated GrpcRoute resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<GrpcRoute,OperationMetadata>

updateGrpcRouteAsync(UpdateGrpcRouteRequest request)

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();
 }
 
Parameter
Name Description
request UpdateGrpcRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<GrpcRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateGrpcRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateGrpcRouteRequest,GrpcRoute,OperationMetadata>

updateHttpRouteAsync(HttpRoute httpRoute, FieldMask updateMask)

public final OperationFuture<HttpRoute,OperationMetadata> updateHttpRouteAsync(HttpRoute httpRoute, 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
Name Description
httpRoute HttpRoute

Required. Updated HttpRoute resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<HttpRoute,OperationMetadata>

updateHttpRouteAsync(UpdateHttpRouteRequest request)

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();
 }
 
Parameter
Name Description
request UpdateHttpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<HttpRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateHttpRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateHttpRouteRequest,HttpRoute,OperationMetadata>

updateMeshAsync(Mesh mesh, FieldMask updateMask)

public final OperationFuture<Mesh,OperationMetadata> updateMeshAsync(Mesh mesh, 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
Name Description
mesh Mesh

Required. Updated Mesh resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Mesh,OperationMetadata>

updateMeshAsync(UpdateMeshRequest request)

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();
 }
 
Parameter
Name Description
request UpdateMeshRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Mesh,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateMeshRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateMeshRequest,Mesh,OperationMetadata>

updateTcpRouteAsync(TcpRoute tcpRoute, FieldMask updateMask)

public final OperationFuture<TcpRoute,OperationMetadata> updateTcpRouteAsync(TcpRoute tcpRoute, 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
Name Description
tcpRoute TcpRoute

Required. Updated TcpRoute resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<TcpRoute,OperationMetadata>

updateTcpRouteAsync(UpdateTcpRouteRequest request)

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();
 }
 
Parameter
Name Description
request UpdateTcpRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<TcpRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateTcpRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateTcpRouteRequest,TcpRoute,OperationMetadata>

updateTlsRouteAsync(TlsRoute tlsRoute, FieldMask updateMask)

public final OperationFuture<TlsRoute,OperationMetadata> updateTlsRouteAsync(TlsRoute tlsRoute, 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
Name Description
tlsRoute TlsRoute

Required. Updated TlsRoute resource.

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<TlsRoute,OperationMetadata>

updateTlsRouteAsync(UpdateTlsRouteRequest request)

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();
 }
 
Parameter
Name Description
request UpdateTlsRouteRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<TlsRoute,OperationMetadata>

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();
 }
 
Returns
Type Description
UnaryCallable<UpdateTlsRouteRequest,Operation>

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();
 }
 
Returns
Type Description
OperationCallable<UpdateTlsRouteRequest,TlsRoute,OperationMetadata>