Class NetworkServicesClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEndpointPolicy |
Deletes a single EndpointPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListWasmPluginVersions |
Lists `WasmPluginVersion` resources in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetWasmPluginVersion |
Gets details of the specified `WasmPluginVersion` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateWasmPluginVersion |
Creates a new `WasmPluginVersion` resource in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteWasmPluginVersion |
Deletes the specified `WasmPluginVersion` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListWasmPlugins |
Lists `WasmPlugin` resources in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetWasmPlugin |
Gets details of the specified `WasmPlugin` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateWasmPlugin |
Creates a new `WasmPlugin` resource in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateWasmPlugin |
Updates the parameters of the specified `WasmPlugin` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteWasmPlugin |
Deletes the specified `WasmPlugin` resource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGateway |
Deletes a single Gateway. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGrpcRoute |
Deletes a single GrpcRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteHttpRoute |
Deletes a single HttpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTcpRoute |
Deletes a single TcpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTlsRoute |
Deletes a single TlsRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateServiceBinding |
Updates the parameters of a single ServiceBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteServiceBinding |
Deletes a single ServiceBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMesh |
Deletes a single Mesh. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListServiceLbPolicies |
Lists ServiceLbPolicies in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetServiceLbPolicy |
Gets details of a single ServiceLbPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateServiceLbPolicy |
Creates a new ServiceLbPolicy in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateServiceLbPolicy |
Updates the parameters of a single ServiceLbPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteServiceLbPolicy |
Deletes a single ServiceLbPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGatewayRouteView |
Get a single RouteView of a Gateway. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMeshRouteView |
Get a single RouteView of a Mesh. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGatewayRouteViews |
Lists RouteViews |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMeshRouteViews |
Lists RouteViews |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNetworkServicesClient(NetworkServicesSettings settings) Constructs an instance of NetworkServicesClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final NetworkServicesClientcreate()Constructs an instance of NetworkServicesClient with default settings.static final NetworkServicesClientcreate(NetworkServicesSettings settings) Constructs an instance of NetworkServicesClient, using the given settings.static final NetworkServicesClientcreate(NetworkServicesStub stub) Constructs an instance of NetworkServicesClient, using the given stub for making calls.Creates a new EndpointPolicy in a given project and location.createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId) Creates a new EndpointPolicy in a given project and location.createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId) Creates a new EndpointPolicy in a given project and location.Creates a new EndpointPolicy in a given project and location.Creates a new EndpointPolicy in a given project and location.createGatewayAsync(CreateGatewayRequest request) Creates a new Gateway in a given project and location.createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId) Creates a new Gateway in a given project and location.createGatewayAsync(String parent, Gateway gateway, String gatewayId) Creates a new Gateway in a given project and location.Creates a new Gateway in a given project and location.Creates a new Gateway in a given project and location.Creates a new GrpcRoute in a given project and location.createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId) Creates a new GrpcRoute in a given project and location.createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId) Creates a new GrpcRoute in a given project and location.Creates a new GrpcRoute in a given project and location.Creates a new GrpcRoute in a given project and location.Creates a new HttpRoute in a given project and location.createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId) Creates a new HttpRoute in a given project and location.createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId) Creates a new HttpRoute in a given project and location.Creates a new HttpRoute in a given project and location.Creates a new HttpRoute in a given project and location.final OperationFuture<Mesh,OperationMetadata> createMeshAsync(CreateMeshRequest request) Creates a new Mesh in a given project and location.final OperationFuture<Mesh,OperationMetadata> createMeshAsync(LocationName parent, Mesh mesh, String meshId) Creates a new Mesh in a given project and location.final OperationFuture<Mesh,OperationMetadata> createMeshAsync(String parent, Mesh mesh, String meshId) Creates a new Mesh in a given project and location.Creates a new Mesh in a given project and location.Creates a new Mesh in a given project and location.Creates a new ServiceBinding in a given project and location.createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId) Creates a new ServiceBinding in a given project and location.createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId) Creates a new ServiceBinding in a given project and location.Creates a new ServiceBinding in a given project and location.Creates a new ServiceBinding in a given project and location.Creates a new ServiceLbPolicy in a given project and location.createServiceLbPolicyAsync(LocationName parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId) Creates a new ServiceLbPolicy in a given project and location.createServiceLbPolicyAsync(String parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId) Creates a new ServiceLbPolicy in a given project and location.Creates a new ServiceLbPolicy in a given project and location.Creates a new ServiceLbPolicy in a given project and location.createTcpRouteAsync(CreateTcpRouteRequest request) Creates a new TcpRoute in a given project and location.createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId) Creates a new TcpRoute in a given project and location.createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId) Creates a new TcpRoute in a given project and location.Creates a new TcpRoute in a given project and location.Creates a new TcpRoute in a given project and location.createTlsRouteAsync(CreateTlsRouteRequest request) Creates a new TlsRoute in a given project and location.createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId) Creates a new TlsRoute in a given project and location.createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId) Creates a new TlsRoute in a given project and location.Creates a new TlsRoute in a given project and location.Creates a new TlsRoute in a given project and location.Creates a new `WasmPlugin` resource in a given project and location.createWasmPluginAsync(LocationName parent, WasmPlugin wasmPlugin, String wasmPluginId) Creates a new `WasmPlugin` resource in a given project and location.createWasmPluginAsync(String parent, WasmPlugin wasmPlugin, String wasmPluginId) Creates a new `WasmPlugin` resource in a given project and location.Creates a new `WasmPlugin` resource in a given project and location.Creates a new `WasmPlugin` resource in a given project and location.Creates a new `WasmPluginVersion` resource in a given project and location.createWasmPluginVersionAsync(WasmPluginName parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) Creates a new `WasmPluginVersion` resource in a given project and location.createWasmPluginVersionAsync(String parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) Creates a new `WasmPluginVersion` resource in a given project and location.Creates a new `WasmPluginVersion` resource in a given project and location.Creates a new `WasmPluginVersion` resource in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single EndpointPolicy.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single EndpointPolicy.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single EndpointPolicy.Deletes a single EndpointPolicy.final OperationCallable<DeleteEndpointPolicyRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single EndpointPolicy.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(DeleteGatewayRequest request) Deletes a single Gateway.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single Gateway.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(String name) Deletes a single Gateway.Deletes a single Gateway.final OperationCallable<DeleteGatewayRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Gateway.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single GrpcRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single GrpcRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(String name) Deletes a single GrpcRoute.Deletes a single GrpcRoute.final OperationCallable<DeleteGrpcRouteRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single GrpcRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single HttpRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single HttpRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(String name) Deletes a single HttpRoute.Deletes a single HttpRoute.final OperationCallable<DeleteHttpRouteRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single HttpRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(DeleteMeshRequest request) Deletes a single Mesh.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(MeshName name) Deletes a single Mesh.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(String name) Deletes a single Mesh.Deletes a single Mesh.final OperationCallable<DeleteMeshRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Mesh.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single ServiceBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single ServiceBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single ServiceBinding.Deletes a single ServiceBinding.final OperationCallable<DeleteServiceBindingRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single ServiceBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single ServiceLbPolicy.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single ServiceLbPolicy.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single ServiceLbPolicy.Deletes a single ServiceLbPolicy.final OperationCallable<DeleteServiceLbPolicyRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single ServiceLbPolicy.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(DeleteTcpRouteRequest request) Deletes a single TcpRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single TcpRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(String name) Deletes a single TcpRoute.Deletes a single TcpRoute.final OperationCallable<DeleteTcpRouteRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single TcpRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(DeleteTlsRouteRequest request) Deletes a single TlsRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a single TlsRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(String name) Deletes a single TlsRoute.Deletes a single TlsRoute.final OperationCallable<DeleteTlsRouteRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single TlsRoute.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `WasmPlugin` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `WasmPlugin` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(String name) Deletes the specified `WasmPlugin` resource.Deletes the specified `WasmPlugin` resource.final OperationCallable<DeleteWasmPluginRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified `WasmPlugin` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `WasmPluginVersion` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `WasmPluginVersion` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `WasmPluginVersion` resource.Deletes the specified `WasmPluginVersion` resource.final OperationCallable<DeleteWasmPluginVersionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified `WasmPluginVersion` resource.final EndpointPolicyGets details of a single EndpointPolicy.final EndpointPolicyGets details of a single EndpointPolicy.final EndpointPolicygetEndpointPolicy(String name) Gets details of a single EndpointPolicy.Gets details of a single EndpointPolicy.final GatewaygetGateway(GatewayName name) Gets details of a single Gateway.final GatewaygetGateway(GetGatewayRequest request) Gets details of a single Gateway.final GatewaygetGateway(String name) Gets details of a single Gateway.Gets details of a single Gateway.final GatewayRouteViewGet a single RouteView of a Gateway.final GatewayRouteViewGet a single RouteView of a Gateway.final GatewayRouteViewgetGatewayRouteView(String name) Get a single RouteView of a Gateway.Get a single RouteView of a Gateway.final GrpcRoutegetGrpcRoute(GetGrpcRouteRequest request) Gets details of a single GrpcRoute.final GrpcRoutegetGrpcRoute(GrpcRouteName name) Gets details of a single GrpcRoute.final GrpcRoutegetGrpcRoute(String name) Gets details of a single GrpcRoute.Gets details of a single GrpcRoute.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final HttpRoutegetHttpRoute(GetHttpRouteRequest request) Gets details of a single HttpRoute.final HttpRoutegetHttpRoute(HttpRouteName name) Gets details of a single HttpRoute.final HttpRoutegetHttpRoute(String name) Gets details of a single HttpRoute.Gets details of a single HttpRoute.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final MeshgetMesh(GetMeshRequest request) Gets details of a single Mesh.final MeshGets details of a single Mesh.final MeshGets details of a single Mesh.final UnaryCallable<GetMeshRequest,Mesh> Gets details of a single Mesh.final MeshRouteViewgetMeshRouteView(GetMeshRouteViewRequest request) Get a single RouteView of a Mesh.final MeshRouteViewGet a single RouteView of a Mesh.final MeshRouteViewgetMeshRouteView(String name) Get a single RouteView of a Mesh.Get a single RouteView of a Mesh.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ServiceBindingGets details of a single ServiceBinding.final ServiceBindingGets details of a single ServiceBinding.final ServiceBindinggetServiceBinding(String name) Gets details of a single ServiceBinding.Gets details of a single ServiceBinding.final ServiceLbPolicyGets details of a single ServiceLbPolicy.final ServiceLbPolicyGets details of a single ServiceLbPolicy.final ServiceLbPolicygetServiceLbPolicy(String name) Gets details of a single ServiceLbPolicy.Gets details of a single ServiceLbPolicy.final NetworkServicesSettingsgetStub()final TcpRoutegetTcpRoute(GetTcpRouteRequest request) Gets details of a single TcpRoute.final TcpRoutegetTcpRoute(TcpRouteName name) Gets details of a single TcpRoute.final TcpRoutegetTcpRoute(String name) Gets details of a single TcpRoute.Gets details of a single TcpRoute.final TlsRoutegetTlsRoute(GetTlsRouteRequest request) Gets details of a single TlsRoute.final TlsRoutegetTlsRoute(TlsRouteName name) Gets details of a single TlsRoute.final TlsRoutegetTlsRoute(String name) Gets details of a single TlsRoute.Gets details of a single TlsRoute.final WasmPlugingetWasmPlugin(GetWasmPluginRequest request) Gets details of the specified `WasmPlugin` resource.final WasmPlugingetWasmPlugin(WasmPluginName name) Gets details of the specified `WasmPlugin` resource.final WasmPlugingetWasmPlugin(String name) Gets details of the specified `WasmPlugin` resource.Gets details of the specified `WasmPlugin` resource.final WasmPluginVersionGets details of the specified `WasmPluginVersion` resource.final WasmPluginVersionGets details of the specified `WasmPluginVersion` resource.final WasmPluginVersiongetWasmPluginVersion(String name) Gets details of the specified `WasmPluginVersion` resource.Gets details of the specified `WasmPluginVersion` resource.booleanbooleanLists EndpointPolicies in a given project and location.listEndpointPolicies(LocationName parent) Lists EndpointPolicies in a given project and location.listEndpointPolicies(String parent) Lists EndpointPolicies in a given project and location.Lists EndpointPolicies in a given project and location.final UnaryCallable<ListEndpointPoliciesRequest,NetworkServicesClient.ListEndpointPoliciesPagedResponse> Lists EndpointPolicies in a given project and location.listGatewayRouteViews(GatewayName parent) Lists RouteViewsLists RouteViewslistGatewayRouteViews(String parent) Lists RouteViewsLists RouteViewsfinal UnaryCallable<ListGatewayRouteViewsRequest,NetworkServicesClient.ListGatewayRouteViewsPagedResponse> Lists RouteViewslistGateways(ListGatewaysRequest request) Lists Gateways in a given project and location.listGateways(LocationName parent) Lists Gateways in a given project and location.listGateways(String parent) Lists Gateways in a given project and location.Lists Gateways in a given project and location.Lists Gateways in a given project and location.listGrpcRoutes(ListGrpcRoutesRequest request) Lists GrpcRoutes in a given project and location.listGrpcRoutes(LocationName parent) Lists GrpcRoutes in a given project and location.listGrpcRoutes(String parent) Lists GrpcRoutes in a given project and location.Lists GrpcRoutes in a given project and location.Lists GrpcRoutes in a given project and location.listHttpRoutes(ListHttpRoutesRequest request) Lists HttpRoute in a given project and location.listHttpRoutes(LocationName parent) Lists HttpRoute in a given project and location.listHttpRoutes(String parent) Lists HttpRoute in a given project and location.Lists HttpRoute in a given project and location.Lists HttpRoute in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listMeshes(ListMeshesRequest request) Lists Meshes in a given project and location.listMeshes(LocationName parent) Lists Meshes in a given project and location.listMeshes(String parent) Lists Meshes in a given project and location.Lists Meshes in a given project and location.Lists Meshes in a given project and location.Lists RouteViewslistMeshRouteViews(MeshName parent) Lists RouteViewslistMeshRouteViews(String parent) Lists RouteViewsLists RouteViewsfinal UnaryCallable<ListMeshRouteViewsRequest,NetworkServicesClient.ListMeshRouteViewsPagedResponse> Lists RouteViewsLists ServiceBinding in a given project and location.listServiceBindings(LocationName parent) Lists ServiceBinding in a given project and location.listServiceBindings(String parent) Lists ServiceBinding in a given project and location.Lists ServiceBinding in a given project and location.final UnaryCallable<ListServiceBindingsRequest,NetworkServicesClient.ListServiceBindingsPagedResponse> Lists ServiceBinding in a given project and location.Lists ServiceLbPolicies in a given project and location.listServiceLbPolicies(LocationName parent) Lists ServiceLbPolicies in a given project and location.listServiceLbPolicies(String parent) Lists ServiceLbPolicies in a given project and location.Lists ServiceLbPolicies in a given project and location.final UnaryCallable<ListServiceLbPoliciesRequest,NetworkServicesClient.ListServiceLbPoliciesPagedResponse> Lists ServiceLbPolicies in a given project and location.listTcpRoutes(ListTcpRoutesRequest request) Lists TcpRoute in a given project and location.listTcpRoutes(LocationName parent) Lists TcpRoute in a given project and location.listTcpRoutes(String parent) Lists TcpRoute in a given project and location.Lists TcpRoute in a given project and location.Lists TcpRoute in a given project and location.listTlsRoutes(ListTlsRoutesRequest request) Lists TlsRoute in a given project and location.listTlsRoutes(LocationName parent) Lists TlsRoute in a given project and location.listTlsRoutes(String parent) Lists TlsRoute in a given project and location.Lists TlsRoute in a given project and location.Lists TlsRoute in a given project and location.listWasmPlugins(ListWasmPluginsRequest request) Lists `WasmPlugin` resources in a given project and location.listWasmPlugins(LocationName parent) Lists `WasmPlugin` resources in a given project and location.listWasmPlugins(String parent) Lists `WasmPlugin` resources in a given project and location.Lists `WasmPlugin` resources in a given project and location.Lists `WasmPlugin` resources in a given project and location.Lists `WasmPluginVersion` resources in a given project and location.listWasmPluginVersions(WasmPluginName parent) Lists `WasmPluginVersion` resources in a given project and location.listWasmPluginVersions(String parent) Lists `WasmPluginVersion` resources in a given project and location.Lists `WasmPluginVersion` resources in a given project and location.final UnaryCallable<ListWasmPluginVersionsRequest,NetworkServicesClient.ListWasmPluginVersionsPagedResponse> Lists `WasmPluginVersion` resources in a given project and location.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateEndpointPolicyAsync(EndpointPolicy endpointPolicy, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single EndpointPolicy.Updates the parameters of a single EndpointPolicy.Updates the parameters of a single EndpointPolicy.Updates the parameters of a single EndpointPolicy.updateGatewayAsync(Gateway gateway, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Gateway.updateGatewayAsync(UpdateGatewayRequest request) Updates the parameters of a single Gateway.Updates the parameters of a single Gateway.Updates the parameters of a single Gateway.updateGrpcRouteAsync(GrpcRoute grpcRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single GrpcRoute.Updates the parameters of a single GrpcRoute.Updates the parameters of a single GrpcRoute.Updates the parameters of a single GrpcRoute.updateHttpRouteAsync(HttpRoute httpRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single HttpRoute.Updates the parameters of a single HttpRoute.Updates the parameters of a single HttpRoute.Updates the parameters of a single HttpRoute.final OperationFuture<Mesh,OperationMetadata> updateMeshAsync(Mesh mesh, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Mesh.final OperationFuture<Mesh,OperationMetadata> updateMeshAsync(UpdateMeshRequest request) Updates the parameters of a single Mesh.Updates the parameters of a single Mesh.Updates the parameters of a single Mesh.updateServiceBindingAsync(ServiceBinding serviceBinding, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single ServiceBinding.Updates the parameters of a single ServiceBinding.Updates the parameters of a single ServiceBinding.Updates the parameters of a single ServiceBinding.updateServiceLbPolicyAsync(ServiceLbPolicy serviceLbPolicy, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single ServiceLbPolicy.Updates the parameters of a single ServiceLbPolicy.Updates the parameters of a single ServiceLbPolicy.Updates the parameters of a single ServiceLbPolicy.updateTcpRouteAsync(TcpRoute tcpRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single TcpRoute.updateTcpRouteAsync(UpdateTcpRouteRequest request) Updates the parameters of a single TcpRoute.Updates the parameters of a single TcpRoute.Updates the parameters of a single TcpRoute.updateTlsRouteAsync(TlsRoute tlsRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single TlsRoute.updateTlsRouteAsync(UpdateTlsRouteRequest request) Updates the parameters of a single TlsRoute.Updates the parameters of a single TlsRoute.Updates the parameters of a single TlsRoute.Updates the parameters of the specified `WasmPlugin` resource.updateWasmPluginAsync(WasmPlugin wasmPlugin, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `WasmPlugin` resource.Updates the parameters of the specified `WasmPlugin` resource.Updates the parameters of the specified `WasmPlugin` resource.
-
Constructor Details
-
NetworkServicesClient
Constructs an instance of NetworkServicesClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
NetworkServicesClient
-
-
Method Details
-
create
Constructs an instance of NetworkServicesClient with default settings.- Throws:
IOException
-
create
public static final NetworkServicesClient create(NetworkServicesSettings settings) throws IOException Constructs an instance of NetworkServicesClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of NetworkServicesClient, using the given stub for making calls. This is for advanced usage - prefer using create(NetworkServicesSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listEndpointPolicies
public final NetworkServicesClient.ListEndpointPoliciesPagedResponse listEndpointPolicies(LocationName parent) Lists EndpointPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (EndpointPolicy element : networkServicesClient.listEndpointPolicies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listEndpointPolicies
public final NetworkServicesClient.ListEndpointPoliciesPagedResponse listEndpointPolicies(String parent) Lists EndpointPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (EndpointPolicy element : networkServicesClient.listEndpointPolicies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listEndpointPolicies
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") .setReturnPartialSuccess(true) .build(); for (EndpointPolicy element : networkServicesClient.listEndpointPolicies(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listEndpointPoliciesPagedCallable
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") .setReturnPartialSuccess(true) .build(); ApiFuture<EndpointPolicy> future = networkServicesClient.listEndpointPoliciesPagedCallable().futureCall(request); // Do something. for (EndpointPolicy element : future.get().iterateAll()) { // doThingsWith(element); } } -
listEndpointPoliciesCallable
public final UnaryCallable<ListEndpointPoliciesRequest,ListEndpointPoliciesResponse> listEndpointPoliciesCallable()Lists EndpointPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListEndpointPoliciesRequest request = ListEndpointPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); while (true) { ListEndpointPoliciesResponse response = networkServicesClient.listEndpointPoliciesCallable().call(request); for (EndpointPolicy element : response.getEndpointPoliciesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getEndpointPolicy
Gets details of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { EndpointPolicyName name = EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]"); EndpointPolicy response = networkServicesClient.getEndpointPolicy(name); }- Parameters:
name- Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.- Throws:
ApiException- if the remote call fails
-
getEndpointPolicy
Gets details of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString(); EndpointPolicy response = networkServicesClient.getEndpointPolicy(name); }- Parameters:
name- Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.- Throws:
ApiException- if the remote call fails
-
getEndpointPolicy
Gets details of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetEndpointPolicyRequest request = GetEndpointPolicyRequest.newBuilder() .setName( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .build(); EndpointPolicy response = networkServicesClient.getEndpointPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getEndpointPolicyCallable
Gets details of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetEndpointPolicyRequest request = GetEndpointPolicyRequest.newBuilder() .setName( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .build(); ApiFuture<EndpointPolicy> future = networkServicesClient.getEndpointPolicyCallable().futureCall(request); // Do something. EndpointPolicy response = future.get(); } -
createEndpointPolicyAsync
public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId) Creates a new EndpointPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build(); String endpointPolicyId = "endpointPolicyId-509458782"; EndpointPolicy response = networkServicesClient .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId) .get(); }- Parameters:
parent- Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.endpointPolicy- Required. EndpointPolicy resource to be created.endpointPolicyId- Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".- Throws:
ApiException- if the remote call fails
-
createEndpointPolicyAsync
public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId) Creates a new EndpointPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build(); String endpointPolicyId = "endpointPolicyId-509458782"; EndpointPolicy response = networkServicesClient .createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId) .get(); }- Parameters:
parent- Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.endpointPolicy- Required. EndpointPolicy resource to be created.endpointPolicyId- Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".- Throws:
ApiException- if the remote call fails
-
createEndpointPolicyAsync
public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(CreateEndpointPolicyRequest request) Creates a new EndpointPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateEndpointPolicyRequest request = CreateEndpointPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setEndpointPolicyId("endpointPolicyId-509458782") .setEndpointPolicy(EndpointPolicy.newBuilder().build()) .build(); EndpointPolicy response = networkServicesClient.createEndpointPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createEndpointPolicyOperationCallable
public final OperationCallable<CreateEndpointPolicyRequest,EndpointPolicy, createEndpointPolicyOperationCallable()OperationMetadata> Creates a new EndpointPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateEndpointPolicyRequest request = CreateEndpointPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setEndpointPolicyId("endpointPolicyId-509458782") .setEndpointPolicy(EndpointPolicy.newBuilder().build()) .build(); OperationFuture<EndpointPolicy, OperationMetadata> future = networkServicesClient.createEndpointPolicyOperationCallable().futureCall(request); // Do something. EndpointPolicy response = future.get(); } -
createEndpointPolicyCallable
Creates a new EndpointPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateEndpointPolicyRequest request = CreateEndpointPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setEndpointPolicyId("endpointPolicyId-509458782") .setEndpointPolicy(EndpointPolicy.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createEndpointPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateEndpointPolicyAsync
public final OperationFuture<EndpointPolicy,OperationMetadata> updateEndpointPolicyAsync(EndpointPolicy endpointPolicy, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); EndpointPolicy response = networkServicesClient.updateEndpointPolicyAsync(endpointPolicy, updateMask).get(); }- Parameters:
endpointPolicy- Required. Updated EndpointPolicy resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateEndpointPolicyAsync
public final OperationFuture<EndpointPolicy,OperationMetadata> updateEndpointPolicyAsync(UpdateEndpointPolicyRequest request) Updates the parameters of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateEndpointPolicyRequest request = UpdateEndpointPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setEndpointPolicy(EndpointPolicy.newBuilder().build()) .build(); EndpointPolicy response = networkServicesClient.updateEndpointPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateEndpointPolicyOperationCallable
public final OperationCallable<UpdateEndpointPolicyRequest,EndpointPolicy, updateEndpointPolicyOperationCallable()OperationMetadata> Updates the parameters of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateEndpointPolicyRequest request = UpdateEndpointPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setEndpointPolicy(EndpointPolicy.newBuilder().build()) .build(); OperationFuture<EndpointPolicy, OperationMetadata> future = networkServicesClient.updateEndpointPolicyOperationCallable().futureCall(request); // Do something. EndpointPolicy response = future.get(); } -
updateEndpointPolicyCallable
Updates the parameters of a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateEndpointPolicyRequest request = UpdateEndpointPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setEndpointPolicy(EndpointPolicy.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateEndpointPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteEndpointPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyAsync(EndpointPolicyName name) Deletes a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { EndpointPolicyName name = EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]"); networkServicesClient.deleteEndpointPolicyAsync(name).get(); }- Parameters:
name- Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.- Throws:
ApiException- if the remote call fails
-
deleteEndpointPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyAsync(String name) Deletes a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString(); networkServicesClient.deleteEndpointPolicyAsync(name).get(); }- Parameters:
name- Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.- Throws:
ApiException- if the remote call fails
-
deleteEndpointPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest request) Deletes a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteEndpointPolicyRequest request = DeleteEndpointPolicyRequest.newBuilder() .setName( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .build(); networkServicesClient.deleteEndpointPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteEndpointPolicyOperationCallable
public final OperationCallable<DeleteEndpointPolicyRequest,com.google.protobuf.Empty, deleteEndpointPolicyOperationCallable()OperationMetadata> Deletes a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteEndpointPolicyRequest request = DeleteEndpointPolicyRequest.newBuilder() .setName( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteEndpointPolicyOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteEndpointPolicyCallable
Deletes a single EndpointPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteEndpointPolicyRequest request = DeleteEndpointPolicyRequest.newBuilder() .setName( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteEndpointPolicyCallable().futureCall(request); // Do something. future.get(); } -
listWasmPluginVersions
public final NetworkServicesClient.ListWasmPluginVersionsPagedResponse listWasmPluginVersions(WasmPluginName parent) Lists `WasmPluginVersion` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); for (WasmPluginVersion element : networkServicesClient.listWasmPluginVersions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, specified in the following format: `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.- Throws:
ApiException- if the remote call fails
-
listWasmPluginVersions
public final NetworkServicesClient.ListWasmPluginVersionsPagedResponse listWasmPluginVersions(String parent) Lists `WasmPluginVersion` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); for (WasmPluginVersion element : networkServicesClient.listWasmPluginVersions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The `WasmPlugin` resource whose `WasmPluginVersion`s are listed, specified in the following format: `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.- Throws:
ApiException- if the remote call fails
-
listWasmPluginVersions
public final NetworkServicesClient.ListWasmPluginVersionsPagedResponse listWasmPluginVersions(ListWasmPluginVersionsRequest request) Lists `WasmPluginVersion` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListWasmPluginVersionsRequest request = ListWasmPluginVersionsRequest.newBuilder() .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (WasmPluginVersion element : networkServicesClient.listWasmPluginVersions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listWasmPluginVersionsPagedCallable
public final UnaryCallable<ListWasmPluginVersionsRequest,NetworkServicesClient.ListWasmPluginVersionsPagedResponse> listWasmPluginVersionsPagedCallable()Lists `WasmPluginVersion` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListWasmPluginVersionsRequest request = ListWasmPluginVersionsRequest.newBuilder() .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<WasmPluginVersion> future = networkServicesClient.listWasmPluginVersionsPagedCallable().futureCall(request); // Do something. for (WasmPluginVersion element : future.get().iterateAll()) { // doThingsWith(element); } } -
listWasmPluginVersionsCallable
public final UnaryCallable<ListWasmPluginVersionsRequest,ListWasmPluginVersionsResponse> listWasmPluginVersionsCallable()Lists `WasmPluginVersion` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListWasmPluginVersionsRequest request = ListWasmPluginVersionsRequest.newBuilder() .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListWasmPluginVersionsResponse response = networkServicesClient.listWasmPluginVersionsCallable().call(request); for (WasmPluginVersion element : response.getWasmPluginVersionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getWasmPluginVersion
Gets details of the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPluginVersionName name = WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name); }- Parameters:
name- Required. A name of the `WasmPluginVersion` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.- Throws:
ApiException- if the remote call fails
-
getWasmPluginVersion
Gets details of the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString(); WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(name); }- Parameters:
name- Required. A name of the `WasmPluginVersion` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.- Throws:
ApiException- if the remote call fails
-
getWasmPluginVersion
Gets details of the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetWasmPluginVersionRequest request = GetWasmPluginVersionRequest.newBuilder() .setName( WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString()) .build(); WasmPluginVersion response = networkServicesClient.getWasmPluginVersion(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getWasmPluginVersionCallable
public final UnaryCallable<GetWasmPluginVersionRequest,WasmPluginVersion> getWasmPluginVersionCallable()Gets details of the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetWasmPluginVersionRequest request = GetWasmPluginVersionRequest.newBuilder() .setName( WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString()) .build(); ApiFuture<WasmPluginVersion> future = networkServicesClient.getWasmPluginVersionCallable().futureCall(request); // Do something. WasmPluginVersion response = future.get(); } -
createWasmPluginVersionAsync
public final OperationFuture<WasmPluginVersion,OperationMetadata> createWasmPluginVersionAsync(WasmPluginName parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) Creates a new `WasmPluginVersion` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPluginName parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); String wasmPluginVersionId = "wasmPluginVersionId38892252"; WasmPluginVersion response = networkServicesClient .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId) .get(); }- Parameters:
parent- Required. The parent resource of the `WasmPluginVersion` resource. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.wasmPluginVersion- Required. `WasmPluginVersion` resource to be created.wasmPluginVersionId- Required. User-provided ID of the `WasmPluginVersion` resource to be created.- Throws:
ApiException- if the remote call fails
-
createWasmPluginVersionAsync
public final OperationFuture<WasmPluginVersion,OperationMetadata> createWasmPluginVersionAsync(String parent, WasmPluginVersion wasmPluginVersion, String wasmPluginVersionId) Creates a new `WasmPluginVersion` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); WasmPluginVersion wasmPluginVersion = WasmPluginVersion.newBuilder().build(); String wasmPluginVersionId = "wasmPluginVersionId38892252"; WasmPluginVersion response = networkServicesClient .createWasmPluginVersionAsync(parent, wasmPluginVersion, wasmPluginVersionId) .get(); }- Parameters:
parent- Required. The parent resource of the `WasmPluginVersion` resource. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.wasmPluginVersion- Required. `WasmPluginVersion` resource to be created.wasmPluginVersionId- Required. User-provided ID of the `WasmPluginVersion` resource to be created.- Throws:
ApiException- if the remote call fails
-
createWasmPluginVersionAsync
public final OperationFuture<WasmPluginVersion,OperationMetadata> createWasmPluginVersionAsync(CreateWasmPluginVersionRequest request) Creates a new `WasmPluginVersion` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateWasmPluginVersionRequest request = CreateWasmPluginVersionRequest.newBuilder() .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setWasmPluginVersionId("wasmPluginVersionId38892252") .setWasmPluginVersion(WasmPluginVersion.newBuilder().build()) .build(); WasmPluginVersion response = networkServicesClient.createWasmPluginVersionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createWasmPluginVersionOperationCallable
public final OperationCallable<CreateWasmPluginVersionRequest,WasmPluginVersion, createWasmPluginVersionOperationCallable()OperationMetadata> Creates a new `WasmPluginVersion` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateWasmPluginVersionRequest request = CreateWasmPluginVersionRequest.newBuilder() .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setWasmPluginVersionId("wasmPluginVersionId38892252") .setWasmPluginVersion(WasmPluginVersion.newBuilder().build()) .build(); OperationFuture<WasmPluginVersion, OperationMetadata> future = networkServicesClient.createWasmPluginVersionOperationCallable().futureCall(request); // Do something. WasmPluginVersion response = future.get(); } -
createWasmPluginVersionCallable
public final UnaryCallable<CreateWasmPluginVersionRequest,Operation> createWasmPluginVersionCallable()Creates a new `WasmPluginVersion` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateWasmPluginVersionRequest request = CreateWasmPluginVersionRequest.newBuilder() .setParent(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setWasmPluginVersionId("wasmPluginVersionId38892252") .setWasmPluginVersion(WasmPluginVersion.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createWasmPluginVersionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteWasmPluginVersionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionAsync(WasmPluginVersionName name) Deletes the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPluginVersionName name = WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]"); networkServicesClient.deleteWasmPluginVersionAsync(name).get(); }- Parameters:
name- Required. A name of the `WasmPluginVersion` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.- Throws:
ApiException- if the remote call fails
-
deleteWasmPluginVersionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionAsync(String name) Deletes the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString(); networkServicesClient.deleteWasmPluginVersionAsync(name).get(); }- Parameters:
name- Required. A name of the `WasmPluginVersion` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}/versions/{wasm_plugin_version}`.- Throws:
ApiException- if the remote call fails
-
deleteWasmPluginVersionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginVersionAsync(DeleteWasmPluginVersionRequest request) Deletes the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteWasmPluginVersionRequest request = DeleteWasmPluginVersionRequest.newBuilder() .setName( WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString()) .build(); networkServicesClient.deleteWasmPluginVersionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteWasmPluginVersionOperationCallable
public final OperationCallable<DeleteWasmPluginVersionRequest,com.google.protobuf.Empty, deleteWasmPluginVersionOperationCallable()OperationMetadata> Deletes the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteWasmPluginVersionRequest request = DeleteWasmPluginVersionRequest.newBuilder() .setName( WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteWasmPluginVersionOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteWasmPluginVersionCallable
public final UnaryCallable<DeleteWasmPluginVersionRequest,Operation> deleteWasmPluginVersionCallable()Deletes the specified `WasmPluginVersion` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteWasmPluginVersionRequest request = DeleteWasmPluginVersionRequest.newBuilder() .setName( WasmPluginVersionName.of( "[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]", "[WASM_PLUGIN_VERSION]") .toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteWasmPluginVersionCallable().futureCall(request); // Do something. future.get(); } -
listWasmPlugins
public final NetworkServicesClient.ListWasmPluginsPagedResponse listWasmPlugins(LocationName parent) Lists `WasmPlugin` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the `WasmPlugin` resources are listed, specified in the following format: `projects/{project}/locations/global`.- Throws:
ApiException- if the remote call fails
-
listWasmPlugins
Lists `WasmPlugin` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (WasmPlugin element : networkServicesClient.listWasmPlugins(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the `WasmPlugin` resources are listed, specified in the following format: `projects/{project}/locations/global`.- Throws:
ApiException- if the remote call fails
-
listWasmPlugins
public final NetworkServicesClient.ListWasmPluginsPagedResponse listWasmPlugins(ListWasmPluginsRequest request) Lists `WasmPlugin` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListWasmPluginsRequest request = ListWasmPluginsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (WasmPlugin element : networkServicesClient.listWasmPlugins(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listWasmPluginsPagedCallable
public final UnaryCallable<ListWasmPluginsRequest,NetworkServicesClient.ListWasmPluginsPagedResponse> listWasmPluginsPagedCallable()Lists `WasmPlugin` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListWasmPluginsRequest request = ListWasmPluginsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<WasmPlugin> future = networkServicesClient.listWasmPluginsPagedCallable().futureCall(request); // Do something. for (WasmPlugin element : future.get().iterateAll()) { // doThingsWith(element); } } -
listWasmPluginsCallable
public final UnaryCallable<ListWasmPluginsRequest,ListWasmPluginsResponse> listWasmPluginsCallable()Lists `WasmPlugin` resources in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListWasmPluginsRequest request = ListWasmPluginsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListWasmPluginsResponse response = networkServicesClient.listWasmPluginsCallable().call(request); for (WasmPlugin element : response.getWasmPluginsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getWasmPlugin
Gets details of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); WasmPlugin response = networkServicesClient.getWasmPlugin(name); }- Parameters:
name- Required. A name of the `WasmPlugin` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.- Throws:
ApiException- if the remote call fails
-
getWasmPlugin
Gets details of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); WasmPlugin response = networkServicesClient.getWasmPlugin(name); }- Parameters:
name- Required. A name of the `WasmPlugin` resource to get. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.- Throws:
ApiException- if the remote call fails
-
getWasmPlugin
Gets details of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetWasmPluginRequest request = GetWasmPluginRequest.newBuilder() .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setView(WasmPluginView.forNumber(0)) .build(); WasmPlugin response = networkServicesClient.getWasmPlugin(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getWasmPluginCallable
Gets details of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetWasmPluginRequest request = GetWasmPluginRequest.newBuilder() .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .setView(WasmPluginView.forNumber(0)) .build(); ApiFuture<WasmPlugin> future = networkServicesClient.getWasmPluginCallable().futureCall(request); // Do something. WasmPlugin response = future.get(); } -
createWasmPluginAsync
public final OperationFuture<WasmPlugin,OperationMetadata> createWasmPluginAsync(LocationName parent, WasmPlugin wasmPlugin, String wasmPluginId) Creates a new `WasmPlugin` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); String wasmPluginId = "wasmPluginId1902086770"; WasmPlugin response = networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); }- Parameters:
parent- Required. The parent resource of the `WasmPlugin` resource. Must be in the format `projects/{project}/locations/global`.wasmPlugin- Required. `WasmPlugin` resource to be created.wasmPluginId- Required. User-provided ID of the `WasmPlugin` resource to be created.- Throws:
ApiException- if the remote call fails
-
createWasmPluginAsync
public final OperationFuture<WasmPlugin,OperationMetadata> createWasmPluginAsync(String parent, WasmPlugin wasmPlugin, String wasmPluginId) Creates a new `WasmPlugin` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); String wasmPluginId = "wasmPluginId1902086770"; WasmPlugin response = networkServicesClient.createWasmPluginAsync(parent, wasmPlugin, wasmPluginId).get(); }- Parameters:
parent- Required. The parent resource of the `WasmPlugin` resource. Must be in the format `projects/{project}/locations/global`.wasmPlugin- Required. `WasmPlugin` resource to be created.wasmPluginId- Required. User-provided ID of the `WasmPlugin` resource to be created.- Throws:
ApiException- if the remote call fails
-
createWasmPluginAsync
public final OperationFuture<WasmPlugin,OperationMetadata> createWasmPluginAsync(CreateWasmPluginRequest request) Creates a new `WasmPlugin` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateWasmPluginRequest request = CreateWasmPluginRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setWasmPluginId("wasmPluginId1902086770") .setWasmPlugin(WasmPlugin.newBuilder().build()) .build(); WasmPlugin response = networkServicesClient.createWasmPluginAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createWasmPluginOperationCallable
public final OperationCallable<CreateWasmPluginRequest,WasmPlugin, createWasmPluginOperationCallable()OperationMetadata> Creates a new `WasmPlugin` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateWasmPluginRequest request = CreateWasmPluginRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setWasmPluginId("wasmPluginId1902086770") .setWasmPlugin(WasmPlugin.newBuilder().build()) .build(); OperationFuture<WasmPlugin, OperationMetadata> future = networkServicesClient.createWasmPluginOperationCallable().futureCall(request); // Do something. WasmPlugin response = future.get(); } -
createWasmPluginCallable
Creates a new `WasmPlugin` resource in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateWasmPluginRequest request = CreateWasmPluginRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setWasmPluginId("wasmPluginId1902086770") .setWasmPlugin(WasmPlugin.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createWasmPluginCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateWasmPluginAsync
public final OperationFuture<WasmPlugin,OperationMetadata> updateWasmPluginAsync(WasmPlugin wasmPlugin, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPlugin wasmPlugin = WasmPlugin.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); WasmPlugin response = networkServicesClient.updateWasmPluginAsync(wasmPlugin, updateMask).get(); }- Parameters:
wasmPlugin- Required. Updated `WasmPlugin` resource.updateMask- Optional. Used to specify the fields to be overwritten in the `WasmPlugin` resource by the update. The fields specified in the `update_mask` field are relative to the resource, not the full request. An omitted `update_mask` field is treated as an implied `update_mask` field equivalent to all fields that are populated (that have a non-empty value). The `update_mask` field supports a special value `*`, which means that each field in the given `WasmPlugin` resource (including the empty ones) replaces the current value.- Throws:
ApiException- if the remote call fails
-
updateWasmPluginAsync
public final OperationFuture<WasmPlugin,OperationMetadata> updateWasmPluginAsync(UpdateWasmPluginRequest request) Updates the parameters of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateWasmPluginRequest request = UpdateWasmPluginRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setWasmPlugin(WasmPlugin.newBuilder().build()) .build(); WasmPlugin response = networkServicesClient.updateWasmPluginAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateWasmPluginOperationCallable
public final OperationCallable<UpdateWasmPluginRequest,WasmPlugin, updateWasmPluginOperationCallable()OperationMetadata> Updates the parameters of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateWasmPluginRequest request = UpdateWasmPluginRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setWasmPlugin(WasmPlugin.newBuilder().build()) .build(); OperationFuture<WasmPlugin, OperationMetadata> future = networkServicesClient.updateWasmPluginOperationCallable().futureCall(request); // Do something. WasmPlugin response = future.get(); } -
updateWasmPluginCallable
Updates the parameters of the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateWasmPluginRequest request = UpdateWasmPluginRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setWasmPlugin(WasmPlugin.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateWasmPluginCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteWasmPluginAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(WasmPluginName name) Deletes the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { WasmPluginName name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]"); networkServicesClient.deleteWasmPluginAsync(name).get(); }- Parameters:
name- Required. A name of the `WasmPlugin` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.- Throws:
ApiException- if the remote call fails
-
deleteWasmPluginAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(String name) Deletes the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString(); networkServicesClient.deleteWasmPluginAsync(name).get(); }- Parameters:
name- Required. A name of the `WasmPlugin` resource to delete. Must be in the format `projects/{project}/locations/global/wasmPlugins/{wasm_plugin}`.- Throws:
ApiException- if the remote call fails
-
deleteWasmPluginAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteWasmPluginAsync(DeleteWasmPluginRequest request) Deletes the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteWasmPluginRequest request = DeleteWasmPluginRequest.newBuilder() .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .build(); networkServicesClient.deleteWasmPluginAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteWasmPluginOperationCallable
public final OperationCallable<DeleteWasmPluginRequest,com.google.protobuf.Empty, deleteWasmPluginOperationCallable()OperationMetadata> Deletes the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteWasmPluginRequest request = DeleteWasmPluginRequest.newBuilder() .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteWasmPluginOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteWasmPluginCallable
Deletes the specified `WasmPlugin` resource.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteWasmPluginRequest request = DeleteWasmPluginRequest.newBuilder() .setName(WasmPluginName.of("[PROJECT]", "[LOCATION]", "[WASM_PLUGIN]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteWasmPluginCallable().futureCall(request); // Do something. future.get(); } -
listGateways
Lists Gateways in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Gateway element : networkServicesClient.listGateways(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listGateways
Lists Gateways in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Gateway element : networkServicesClient.listGateways(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listGateways
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
listGatewaysCallable
Lists Gateways in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListGatewaysRequest request = ListGatewaysRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListGatewaysResponse response = networkServicesClient.listGatewaysCallable().call(request); for (Gateway element : response.getGatewaysList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getGateway
Gets details of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]"); Gateway response = networkServicesClient.getGateway(name); }- Parameters:
name- Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.- Throws:
ApiException- if the remote call fails
-
getGateway
Gets details of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString(); Gateway response = networkServicesClient.getGateway(name); }- Parameters:
name- Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.- Throws:
ApiException- if the remote call fails
-
getGateway
Gets details of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetGatewayRequest request = GetGatewayRequest.newBuilder() .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .build(); Gateway response = networkServicesClient.getGateway(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getGatewayCallable
Gets details of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetGatewayRequest request = GetGatewayRequest.newBuilder() .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .build(); ApiFuture<Gateway> future = networkServicesClient.getGatewayCallable().futureCall(request); // Do something. Gateway response = future.get(); } -
createGatewayAsync
public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId) Creates a new Gateway in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Gateway gateway = Gateway.newBuilder().build(); String gatewayId = "gatewayId-1354641793"; Gateway response = networkServicesClient.createGatewayAsync(parent, gateway, gatewayId).get(); }- Parameters:
parent- Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.gateway- Required. Gateway resource to be created.gatewayId- Required. Short name of the Gateway resource to be created.- Throws:
ApiException- if the remote call fails
-
createGatewayAsync
public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(String parent, Gateway gateway, String gatewayId) Creates a new Gateway in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Gateway gateway = Gateway.newBuilder().build(); String gatewayId = "gatewayId-1354641793"; Gateway response = networkServicesClient.createGatewayAsync(parent, gateway, gatewayId).get(); }- Parameters:
parent- Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.gateway- Required. Gateway resource to be created.gatewayId- Required. Short name of the Gateway resource to be created.- Throws:
ApiException- if the remote call fails
-
createGatewayAsync
public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(CreateGatewayRequest request) Creates a new Gateway in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateGatewayRequest request = CreateGatewayRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGatewayId("gatewayId-1354641793") .setGateway(Gateway.newBuilder().build()) .build(); Gateway response = networkServicesClient.createGatewayAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createGatewayOperationCallable
public final OperationCallable<CreateGatewayRequest,Gateway, createGatewayOperationCallable()OperationMetadata> Creates a new Gateway in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateGatewayRequest request = CreateGatewayRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGatewayId("gatewayId-1354641793") .setGateway(Gateway.newBuilder().build()) .build(); OperationFuture<Gateway, OperationMetadata> future = networkServicesClient.createGatewayOperationCallable().futureCall(request); // Do something. Gateway response = future.get(); } -
createGatewayCallable
Creates a new Gateway in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateGatewayRequest request = CreateGatewayRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGatewayId("gatewayId-1354641793") .setGateway(Gateway.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createGatewayCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateGatewayAsync
public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(Gateway gateway, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { Gateway gateway = Gateway.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Gateway response = networkServicesClient.updateGatewayAsync(gateway, updateMask).get(); }- Parameters:
gateway- Required. Updated Gateway resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateGatewayAsync
public final OperationFuture<Gateway,OperationMetadata> updateGatewayAsync(UpdateGatewayRequest request) Updates the parameters of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateGatewayRequest request = UpdateGatewayRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGateway(Gateway.newBuilder().build()) .build(); Gateway response = networkServicesClient.updateGatewayAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateGatewayOperationCallable
public final OperationCallable<UpdateGatewayRequest,Gateway, updateGatewayOperationCallable()OperationMetadata> Updates the parameters of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateGatewayRequest request = UpdateGatewayRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGateway(Gateway.newBuilder().build()) .build(); OperationFuture<Gateway, OperationMetadata> future = networkServicesClient.updateGatewayOperationCallable().futureCall(request); // Do something. Gateway response = future.get(); } -
updateGatewayCallable
Updates the parameters of a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateGatewayRequest request = UpdateGatewayRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGateway(Gateway.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateGatewayCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteGatewayAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(GatewayName name) Deletes a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]"); networkServicesClient.deleteGatewayAsync(name).get(); }- Parameters:
name- Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.- Throws:
ApiException- if the remote call fails
-
deleteGatewayAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(String name) Deletes a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString(); networkServicesClient.deleteGatewayAsync(name).get(); }- Parameters:
name- Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.- Throws:
ApiException- if the remote call fails
-
deleteGatewayAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGatewayAsync(DeleteGatewayRequest request) Deletes a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteGatewayRequest request = DeleteGatewayRequest.newBuilder() .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .build(); networkServicesClient.deleteGatewayAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteGatewayOperationCallable
public final OperationCallable<DeleteGatewayRequest,com.google.protobuf.Empty, deleteGatewayOperationCallable()OperationMetadata> Deletes a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteGatewayRequest request = DeleteGatewayRequest.newBuilder() .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteGatewayOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteGatewayCallable
Deletes a single Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteGatewayRequest request = DeleteGatewayRequest.newBuilder() .setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteGatewayCallable().futureCall(request); // Do something. future.get(); } -
listGrpcRoutes
Lists GrpcRoutes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (GrpcRoute element : networkServicesClient.listGrpcRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listGrpcRoutes
Lists GrpcRoutes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (GrpcRoute element : networkServicesClient.listGrpcRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listGrpcRoutes
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") .setReturnPartialSuccess(true) .build(); for (GrpcRoute element : networkServicesClient.listGrpcRoutes(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listGrpcRoutesPagedCallable
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") .setReturnPartialSuccess(true) .build(); ApiFuture<GrpcRoute> future = networkServicesClient.listGrpcRoutesPagedCallable().futureCall(request); // Do something. for (GrpcRoute element : future.get().iterateAll()) { // doThingsWith(element); } } -
listGrpcRoutesCallable
Lists GrpcRoutes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListGrpcRoutesRequest request = ListGrpcRoutesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); while (true) { ListGrpcRoutesResponse response = networkServicesClient.listGrpcRoutesCallable().call(request); for (GrpcRoute element : response.getGrpcRoutesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getGrpcRoute
Gets details of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GrpcRouteName name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]"); GrpcRoute response = networkServicesClient.getGrpcRoute(name); }- Parameters:
name- Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getGrpcRoute
Gets details of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString(); GrpcRoute response = networkServicesClient.getGrpcRoute(name); }- Parameters:
name- Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getGrpcRoute
Gets details of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetGrpcRouteRequest request = GetGrpcRouteRequest.newBuilder() .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString()) .build(); GrpcRoute response = networkServicesClient.getGrpcRoute(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getGrpcRouteCallable
Gets details of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetGrpcRouteRequest request = GetGrpcRouteRequest.newBuilder() .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString()) .build(); ApiFuture<GrpcRoute> future = networkServicesClient.getGrpcRouteCallable().futureCall(request); // Do something. GrpcRoute response = future.get(); } -
createGrpcRouteAsync
public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId) Creates a new GrpcRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); GrpcRoute grpcRoute = GrpcRoute.newBuilder().build(); String grpcRouteId = "grpcRouteId1888295750"; GrpcRoute response = networkServicesClient.createGrpcRouteAsync(parent, grpcRoute, grpcRouteId).get(); }- Parameters:
parent- Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.grpcRoute- Required. GrpcRoute resource to be created.grpcRouteId- Required. Short name of the GrpcRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createGrpcRouteAsync
public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId) Creates a new GrpcRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); GrpcRoute grpcRoute = GrpcRoute.newBuilder().build(); String grpcRouteId = "grpcRouteId1888295750"; GrpcRoute response = networkServicesClient.createGrpcRouteAsync(parent, grpcRoute, grpcRouteId).get(); }- Parameters:
parent- Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.grpcRoute- Required. GrpcRoute resource to be created.grpcRouteId- Required. Short name of the GrpcRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createGrpcRouteAsync
public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(CreateGrpcRouteRequest request) Creates a new GrpcRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateGrpcRouteRequest request = CreateGrpcRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGrpcRouteId("grpcRouteId1888295750") .setGrpcRoute(GrpcRoute.newBuilder().build()) .build(); GrpcRoute response = networkServicesClient.createGrpcRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createGrpcRouteOperationCallable
public final OperationCallable<CreateGrpcRouteRequest,GrpcRoute, createGrpcRouteOperationCallable()OperationMetadata> Creates a new GrpcRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateGrpcRouteRequest request = CreateGrpcRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGrpcRouteId("grpcRouteId1888295750") .setGrpcRoute(GrpcRoute.newBuilder().build()) .build(); OperationFuture<GrpcRoute, OperationMetadata> future = networkServicesClient.createGrpcRouteOperationCallable().futureCall(request); // Do something. GrpcRoute response = future.get(); } -
createGrpcRouteCallable
Creates a new GrpcRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateGrpcRouteRequest request = CreateGrpcRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setGrpcRouteId("grpcRouteId1888295750") .setGrpcRoute(GrpcRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createGrpcRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateGrpcRouteAsync
public final OperationFuture<GrpcRoute,OperationMetadata> updateGrpcRouteAsync(GrpcRoute grpcRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GrpcRoute grpcRoute = GrpcRoute.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); GrpcRoute response = networkServicesClient.updateGrpcRouteAsync(grpcRoute, updateMask).get(); }- Parameters:
grpcRoute- Required. Updated GrpcRoute resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateGrpcRouteAsync
public final OperationFuture<GrpcRoute,OperationMetadata> updateGrpcRouteAsync(UpdateGrpcRouteRequest request) Updates the parameters of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateGrpcRouteRequest request = UpdateGrpcRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGrpcRoute(GrpcRoute.newBuilder().build()) .build(); GrpcRoute response = networkServicesClient.updateGrpcRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateGrpcRouteOperationCallable
public final OperationCallable<UpdateGrpcRouteRequest,GrpcRoute, updateGrpcRouteOperationCallable()OperationMetadata> Updates the parameters of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateGrpcRouteRequest request = UpdateGrpcRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGrpcRoute(GrpcRoute.newBuilder().build()) .build(); OperationFuture<GrpcRoute, OperationMetadata> future = networkServicesClient.updateGrpcRouteOperationCallable().futureCall(request); // Do something. GrpcRoute response = future.get(); } -
updateGrpcRouteCallable
Updates the parameters of a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateGrpcRouteRequest request = UpdateGrpcRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setGrpcRoute(GrpcRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateGrpcRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteGrpcRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(GrpcRouteName name) Deletes a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GrpcRouteName name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]"); networkServicesClient.deleteGrpcRouteAsync(name).get(); }- Parameters:
name- Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteGrpcRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(String name) Deletes a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString(); networkServicesClient.deleteGrpcRouteAsync(name).get(); }- Parameters:
name- Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteGrpcRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteGrpcRouteAsync(DeleteGrpcRouteRequest request) Deletes a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteGrpcRouteRequest request = DeleteGrpcRouteRequest.newBuilder() .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString()) .build(); networkServicesClient.deleteGrpcRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteGrpcRouteOperationCallable
public final OperationCallable<DeleteGrpcRouteRequest,com.google.protobuf.Empty, deleteGrpcRouteOperationCallable()OperationMetadata> Deletes a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteGrpcRouteRequest request = DeleteGrpcRouteRequest.newBuilder() .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteGrpcRouteOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteGrpcRouteCallable
Deletes a single GrpcRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteGrpcRouteRequest request = DeleteGrpcRouteRequest.newBuilder() .setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteGrpcRouteCallable().futureCall(request); // Do something. future.get(); } -
listHttpRoutes
Lists HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (HttpRoute element : networkServicesClient.listHttpRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listHttpRoutes
Lists HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (HttpRoute element : networkServicesClient.listHttpRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listHttpRoutes
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") .setReturnPartialSuccess(true) .build(); for (HttpRoute element : networkServicesClient.listHttpRoutes(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listHttpRoutesPagedCallable
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") .setReturnPartialSuccess(true) .build(); ApiFuture<HttpRoute> future = networkServicesClient.listHttpRoutesPagedCallable().futureCall(request); // Do something. for (HttpRoute element : future.get().iterateAll()) { // doThingsWith(element); } } -
listHttpRoutesCallable
Lists HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListHttpRoutesRequest request = ListHttpRoutesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); while (true) { ListHttpRoutesResponse response = networkServicesClient.listHttpRoutesCallable().call(request); for (HttpRoute element : response.getHttpRoutesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getHttpRoute
Gets details of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { HttpRouteName name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]"); HttpRoute response = networkServicesClient.getHttpRoute(name); }- Parameters:
name- Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getHttpRoute
Gets details of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString(); HttpRoute response = networkServicesClient.getHttpRoute(name); }- Parameters:
name- Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getHttpRoute
Gets details of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetHttpRouteRequest request = GetHttpRouteRequest.newBuilder() .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString()) .build(); HttpRoute response = networkServicesClient.getHttpRoute(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getHttpRouteCallable
Gets details of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetHttpRouteRequest request = GetHttpRouteRequest.newBuilder() .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString()) .build(); ApiFuture<HttpRoute> future = networkServicesClient.getHttpRouteCallable().futureCall(request); // Do something. HttpRoute response = future.get(); } -
createHttpRouteAsync
public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId) Creates a new HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); HttpRoute httpRoute = HttpRoute.newBuilder().build(); String httpRouteId = "httpRouteId-2054835300"; HttpRoute response = networkServicesClient.createHttpRouteAsync(parent, httpRoute, httpRouteId).get(); }- Parameters:
parent- Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.httpRoute- Required. HttpRoute resource to be created.httpRouteId- Required. Short name of the HttpRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createHttpRouteAsync
public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId) Creates a new HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); HttpRoute httpRoute = HttpRoute.newBuilder().build(); String httpRouteId = "httpRouteId-2054835300"; HttpRoute response = networkServicesClient.createHttpRouteAsync(parent, httpRoute, httpRouteId).get(); }- Parameters:
parent- Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.httpRoute- Required. HttpRoute resource to be created.httpRouteId- Required. Short name of the HttpRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createHttpRouteAsync
public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(CreateHttpRouteRequest request) Creates a new HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateHttpRouteRequest request = CreateHttpRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHttpRouteId("httpRouteId-2054835300") .setHttpRoute(HttpRoute.newBuilder().build()) .build(); HttpRoute response = networkServicesClient.createHttpRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createHttpRouteOperationCallable
public final OperationCallable<CreateHttpRouteRequest,HttpRoute, createHttpRouteOperationCallable()OperationMetadata> Creates a new HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateHttpRouteRequest request = CreateHttpRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHttpRouteId("httpRouteId-2054835300") .setHttpRoute(HttpRoute.newBuilder().build()) .build(); OperationFuture<HttpRoute, OperationMetadata> future = networkServicesClient.createHttpRouteOperationCallable().futureCall(request); // Do something. HttpRoute response = future.get(); } -
createHttpRouteCallable
Creates a new HttpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateHttpRouteRequest request = CreateHttpRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHttpRouteId("httpRouteId-2054835300") .setHttpRoute(HttpRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createHttpRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateHttpRouteAsync
public final OperationFuture<HttpRoute,OperationMetadata> updateHttpRouteAsync(HttpRoute httpRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { HttpRoute httpRoute = HttpRoute.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); HttpRoute response = networkServicesClient.updateHttpRouteAsync(httpRoute, updateMask).get(); }- Parameters:
httpRoute- Required. Updated HttpRoute resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateHttpRouteAsync
public final OperationFuture<HttpRoute,OperationMetadata> updateHttpRouteAsync(UpdateHttpRouteRequest request) Updates the parameters of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateHttpRouteRequest request = UpdateHttpRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setHttpRoute(HttpRoute.newBuilder().build()) .build(); HttpRoute response = networkServicesClient.updateHttpRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateHttpRouteOperationCallable
public final OperationCallable<UpdateHttpRouteRequest,HttpRoute, updateHttpRouteOperationCallable()OperationMetadata> Updates the parameters of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateHttpRouteRequest request = UpdateHttpRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setHttpRoute(HttpRoute.newBuilder().build()) .build(); OperationFuture<HttpRoute, OperationMetadata> future = networkServicesClient.updateHttpRouteOperationCallable().futureCall(request); // Do something. HttpRoute response = future.get(); } -
updateHttpRouteCallable
Updates the parameters of a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateHttpRouteRequest request = UpdateHttpRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setHttpRoute(HttpRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateHttpRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteHttpRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(HttpRouteName name) Deletes a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { HttpRouteName name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]"); networkServicesClient.deleteHttpRouteAsync(name).get(); }- Parameters:
name- Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteHttpRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(String name) Deletes a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString(); networkServicesClient.deleteHttpRouteAsync(name).get(); }- Parameters:
name- Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteHttpRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHttpRouteAsync(DeleteHttpRouteRequest request) Deletes a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteHttpRouteRequest request = DeleteHttpRouteRequest.newBuilder() .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString()) .build(); networkServicesClient.deleteHttpRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteHttpRouteOperationCallable
public final OperationCallable<DeleteHttpRouteRequest,com.google.protobuf.Empty, deleteHttpRouteOperationCallable()OperationMetadata> Deletes a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteHttpRouteRequest request = DeleteHttpRouteRequest.newBuilder() .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteHttpRouteOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteHttpRouteCallable
Deletes a single HttpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteHttpRouteRequest request = DeleteHttpRouteRequest.newBuilder() .setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteHttpRouteCallable().futureCall(request); // Do something. future.get(); } -
listTcpRoutes
Lists TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (TcpRoute element : networkServicesClient.listTcpRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listTcpRoutes
Lists TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (TcpRoute element : networkServicesClient.listTcpRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listTcpRoutes
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") .setReturnPartialSuccess(true) .build(); for (TcpRoute element : networkServicesClient.listTcpRoutes(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listTcpRoutesPagedCallable
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") .setReturnPartialSuccess(true) .build(); ApiFuture<TcpRoute> future = networkServicesClient.listTcpRoutesPagedCallable().futureCall(request); // Do something. for (TcpRoute element : future.get().iterateAll()) { // doThingsWith(element); } } -
listTcpRoutesCallable
Lists TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListTcpRoutesRequest request = ListTcpRoutesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); while (true) { ListTcpRoutesResponse response = networkServicesClient.listTcpRoutesCallable().call(request); for (TcpRoute element : response.getTcpRoutesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getTcpRoute
Gets details of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TcpRouteName name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]"); TcpRoute response = networkServicesClient.getTcpRoute(name); }- Parameters:
name- Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getTcpRoute
Gets details of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString(); TcpRoute response = networkServicesClient.getTcpRoute(name); }- Parameters:
name- Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getTcpRoute
Gets details of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetTcpRouteRequest request = GetTcpRouteRequest.newBuilder() .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString()) .build(); TcpRoute response = networkServicesClient.getTcpRoute(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getTcpRouteCallable
Gets details of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetTcpRouteRequest request = GetTcpRouteRequest.newBuilder() .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString()) .build(); ApiFuture<TcpRoute> future = networkServicesClient.getTcpRouteCallable().futureCall(request); // Do something. TcpRoute response = future.get(); } -
createTcpRouteAsync
public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId) Creates a new TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); TcpRoute tcpRoute = TcpRoute.newBuilder().build(); String tcpRouteId = "tcpRouteId806467107"; TcpRoute response = networkServicesClient.createTcpRouteAsync(parent, tcpRoute, tcpRouteId).get(); }- Parameters:
parent- Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.tcpRoute- Required. TcpRoute resource to be created.tcpRouteId- Required. Short name of the TcpRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createTcpRouteAsync
public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId) Creates a new TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); TcpRoute tcpRoute = TcpRoute.newBuilder().build(); String tcpRouteId = "tcpRouteId806467107"; TcpRoute response = networkServicesClient.createTcpRouteAsync(parent, tcpRoute, tcpRouteId).get(); }- Parameters:
parent- Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.tcpRoute- Required. TcpRoute resource to be created.tcpRouteId- Required. Short name of the TcpRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createTcpRouteAsync
public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(CreateTcpRouteRequest request) Creates a new TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateTcpRouteRequest request = CreateTcpRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTcpRouteId("tcpRouteId806467107") .setTcpRoute(TcpRoute.newBuilder().build()) .build(); TcpRoute response = networkServicesClient.createTcpRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createTcpRouteOperationCallable
public final OperationCallable<CreateTcpRouteRequest,TcpRoute, createTcpRouteOperationCallable()OperationMetadata> Creates a new TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateTcpRouteRequest request = CreateTcpRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTcpRouteId("tcpRouteId806467107") .setTcpRoute(TcpRoute.newBuilder().build()) .build(); OperationFuture<TcpRoute, OperationMetadata> future = networkServicesClient.createTcpRouteOperationCallable().futureCall(request); // Do something. TcpRoute response = future.get(); } -
createTcpRouteCallable
Creates a new TcpRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateTcpRouteRequest request = CreateTcpRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTcpRouteId("tcpRouteId806467107") .setTcpRoute(TcpRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createTcpRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateTcpRouteAsync
public final OperationFuture<TcpRoute,OperationMetadata> updateTcpRouteAsync(TcpRoute tcpRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TcpRoute tcpRoute = TcpRoute.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); TcpRoute response = networkServicesClient.updateTcpRouteAsync(tcpRoute, updateMask).get(); }- Parameters:
tcpRoute- Required. Updated TcpRoute resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateTcpRouteAsync
public final OperationFuture<TcpRoute,OperationMetadata> updateTcpRouteAsync(UpdateTcpRouteRequest request) Updates the parameters of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateTcpRouteRequest request = UpdateTcpRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setTcpRoute(TcpRoute.newBuilder().build()) .build(); TcpRoute response = networkServicesClient.updateTcpRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateTcpRouteOperationCallable
public final OperationCallable<UpdateTcpRouteRequest,TcpRoute, updateTcpRouteOperationCallable()OperationMetadata> Updates the parameters of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateTcpRouteRequest request = UpdateTcpRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setTcpRoute(TcpRoute.newBuilder().build()) .build(); OperationFuture<TcpRoute, OperationMetadata> future = networkServicesClient.updateTcpRouteOperationCallable().futureCall(request); // Do something. TcpRoute response = future.get(); } -
updateTcpRouteCallable
Updates the parameters of a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateTcpRouteRequest request = UpdateTcpRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setTcpRoute(TcpRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateTcpRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteTcpRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(TcpRouteName name) Deletes a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TcpRouteName name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]"); networkServicesClient.deleteTcpRouteAsync(name).get(); }- Parameters:
name- Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteTcpRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(String name) Deletes a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString(); networkServicesClient.deleteTcpRouteAsync(name).get(); }- Parameters:
name- Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteTcpRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTcpRouteAsync(DeleteTcpRouteRequest request) Deletes a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteTcpRouteRequest request = DeleteTcpRouteRequest.newBuilder() .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString()) .build(); networkServicesClient.deleteTcpRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteTcpRouteOperationCallable
public final OperationCallable<DeleteTcpRouteRequest,com.google.protobuf.Empty, deleteTcpRouteOperationCallable()OperationMetadata> Deletes a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteTcpRouteRequest request = DeleteTcpRouteRequest.newBuilder() .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteTcpRouteOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteTcpRouteCallable
Deletes a single TcpRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteTcpRouteRequest request = DeleteTcpRouteRequest.newBuilder() .setName(TcpRouteName.of("[PROJECT]", "[LOCATION]", "[TCP_ROUTE]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteTcpRouteCallable().futureCall(request); // Do something. future.get(); } -
listTlsRoutes
Lists TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (TlsRoute element : networkServicesClient.listTlsRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listTlsRoutes
Lists TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (TlsRoute element : networkServicesClient.listTlsRoutes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listTlsRoutes
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") .setReturnPartialSuccess(true) .build(); for (TlsRoute element : networkServicesClient.listTlsRoutes(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listTlsRoutesPagedCallable
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") .setReturnPartialSuccess(true) .build(); ApiFuture<TlsRoute> future = networkServicesClient.listTlsRoutesPagedCallable().futureCall(request); // Do something. for (TlsRoute element : future.get().iterateAll()) { // doThingsWith(element); } } -
listTlsRoutesCallable
Lists TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListTlsRoutesRequest request = ListTlsRoutesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); while (true) { ListTlsRoutesResponse response = networkServicesClient.listTlsRoutesCallable().call(request); for (TlsRoute element : response.getTlsRoutesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getTlsRoute
Gets details of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TlsRouteName name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]"); TlsRoute response = networkServicesClient.getTlsRoute(name); }- Parameters:
name- Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getTlsRoute
Gets details of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString(); TlsRoute response = networkServicesClient.getTlsRoute(name); }- Parameters:
name- Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.- Throws:
ApiException- if the remote call fails
-
getTlsRoute
Gets details of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetTlsRouteRequest request = GetTlsRouteRequest.newBuilder() .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString()) .build(); TlsRoute response = networkServicesClient.getTlsRoute(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getTlsRouteCallable
Gets details of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetTlsRouteRequest request = GetTlsRouteRequest.newBuilder() .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString()) .build(); ApiFuture<TlsRoute> future = networkServicesClient.getTlsRouteCallable().futureCall(request); // Do something. TlsRoute response = future.get(); } -
createTlsRouteAsync
public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId) Creates a new TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); TlsRoute tlsRoute = TlsRoute.newBuilder().build(); String tlsRouteId = "tlsRouteId-1642257463"; TlsRoute response = networkServicesClient.createTlsRouteAsync(parent, tlsRoute, tlsRouteId).get(); }- Parameters:
parent- Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.tlsRoute- Required. TlsRoute resource to be created.tlsRouteId- Required. Short name of the TlsRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createTlsRouteAsync
public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId) Creates a new TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); TlsRoute tlsRoute = TlsRoute.newBuilder().build(); String tlsRouteId = "tlsRouteId-1642257463"; TlsRoute response = networkServicesClient.createTlsRouteAsync(parent, tlsRoute, tlsRouteId).get(); }- Parameters:
parent- Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.tlsRoute- Required. TlsRoute resource to be created.tlsRouteId- Required. Short name of the TlsRoute resource to be created.- Throws:
ApiException- if the remote call fails
-
createTlsRouteAsync
public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(CreateTlsRouteRequest request) Creates a new TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateTlsRouteRequest request = CreateTlsRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTlsRouteId("tlsRouteId-1642257463") .setTlsRoute(TlsRoute.newBuilder().build()) .build(); TlsRoute response = networkServicesClient.createTlsRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createTlsRouteOperationCallable
public final OperationCallable<CreateTlsRouteRequest,TlsRoute, createTlsRouteOperationCallable()OperationMetadata> Creates a new TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateTlsRouteRequest request = CreateTlsRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTlsRouteId("tlsRouteId-1642257463") .setTlsRoute(TlsRoute.newBuilder().build()) .build(); OperationFuture<TlsRoute, OperationMetadata> future = networkServicesClient.createTlsRouteOperationCallable().futureCall(request); // Do something. TlsRoute response = future.get(); } -
createTlsRouteCallable
Creates a new TlsRoute in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateTlsRouteRequest request = CreateTlsRouteRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setTlsRouteId("tlsRouteId-1642257463") .setTlsRoute(TlsRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createTlsRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateTlsRouteAsync
public final OperationFuture<TlsRoute,OperationMetadata> updateTlsRouteAsync(TlsRoute tlsRoute, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TlsRoute tlsRoute = TlsRoute.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); TlsRoute response = networkServicesClient.updateTlsRouteAsync(tlsRoute, updateMask).get(); }- Parameters:
tlsRoute- Required. Updated TlsRoute resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateTlsRouteAsync
public final OperationFuture<TlsRoute,OperationMetadata> updateTlsRouteAsync(UpdateTlsRouteRequest request) Updates the parameters of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateTlsRouteRequest request = UpdateTlsRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setTlsRoute(TlsRoute.newBuilder().build()) .build(); TlsRoute response = networkServicesClient.updateTlsRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateTlsRouteOperationCallable
public final OperationCallable<UpdateTlsRouteRequest,TlsRoute, updateTlsRouteOperationCallable()OperationMetadata> Updates the parameters of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateTlsRouteRequest request = UpdateTlsRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setTlsRoute(TlsRoute.newBuilder().build()) .build(); OperationFuture<TlsRoute, OperationMetadata> future = networkServicesClient.updateTlsRouteOperationCallable().futureCall(request); // Do something. TlsRoute response = future.get(); } -
updateTlsRouteCallable
Updates the parameters of a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateTlsRouteRequest request = UpdateTlsRouteRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setTlsRoute(TlsRoute.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateTlsRouteCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteTlsRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(TlsRouteName name) Deletes a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TlsRouteName name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]"); networkServicesClient.deleteTlsRouteAsync(name).get(); }- Parameters:
name- Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteTlsRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(String name) Deletes a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString(); networkServicesClient.deleteTlsRouteAsync(name).get(); }- Parameters:
name- Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.- Throws:
ApiException- if the remote call fails
-
deleteTlsRouteAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteTlsRouteAsync(DeleteTlsRouteRequest request) Deletes a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteTlsRouteRequest request = DeleteTlsRouteRequest.newBuilder() .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString()) .build(); networkServicesClient.deleteTlsRouteAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteTlsRouteOperationCallable
public final OperationCallable<DeleteTlsRouteRequest,com.google.protobuf.Empty, deleteTlsRouteOperationCallable()OperationMetadata> Deletes a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteTlsRouteRequest request = DeleteTlsRouteRequest.newBuilder() .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteTlsRouteOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteTlsRouteCallable
Deletes a single TlsRoute.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteTlsRouteRequest request = DeleteTlsRouteRequest.newBuilder() .setName(TlsRouteName.of("[PROJECT]", "[LOCATION]", "[TLS_ROUTE]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteTlsRouteCallable().futureCall(request); // Do something. future.get(); } -
listServiceBindings
public final NetworkServicesClient.ListServiceBindingsPagedResponse listServiceBindings(LocationName parent) Lists ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ServiceBinding element : networkServicesClient.listServiceBindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listServiceBindings
public final NetworkServicesClient.ListServiceBindingsPagedResponse listServiceBindings(String parent) Lists ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ServiceBinding element : networkServicesClient.listServiceBindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listServiceBindings
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
listServiceBindingsCallable
public final UnaryCallable<ListServiceBindingsRequest,ListServiceBindingsResponse> listServiceBindingsCallable()Lists ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListServiceBindingsRequest request = ListServiceBindingsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListServiceBindingsResponse response = networkServicesClient.listServiceBindingsCallable().call(request); for (ServiceBinding element : response.getServiceBindingsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getServiceBinding
Gets details of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ServiceBindingName name = ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]"); ServiceBinding response = networkServicesClient.getServiceBinding(name); }- Parameters:
name- Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/*/serviceBindings/*`.- Throws:
ApiException- if the remote call fails
-
getServiceBinding
Gets details of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString(); ServiceBinding response = networkServicesClient.getServiceBinding(name); }- Parameters:
name- Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/*/serviceBindings/*`.- Throws:
ApiException- if the remote call fails
-
getServiceBinding
Gets details of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetServiceBindingRequest request = GetServiceBindingRequest.newBuilder() .setName( ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString()) .build(); ServiceBinding response = networkServicesClient.getServiceBinding(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getServiceBindingCallable
Gets details of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetServiceBindingRequest request = GetServiceBindingRequest.newBuilder() .setName( ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString()) .build(); ApiFuture<ServiceBinding> future = networkServicesClient.getServiceBindingCallable().futureCall(request); // Do something. ServiceBinding response = future.get(); } -
createServiceBindingAsync
public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId) Creates a new ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ServiceBinding serviceBinding = ServiceBinding.newBuilder().build(); String serviceBindingId = "serviceBindingId-1424670901"; ServiceBinding response = networkServicesClient .createServiceBindingAsync(parent, serviceBinding, serviceBindingId) .get(); }- Parameters:
parent- Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/*`.serviceBinding- Required. ServiceBinding resource to be created.serviceBindingId- Required. Short name of the ServiceBinding resource to be created.- Throws:
ApiException- if the remote call fails
-
createServiceBindingAsync
public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId) Creates a new ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ServiceBinding serviceBinding = ServiceBinding.newBuilder().build(); String serviceBindingId = "serviceBindingId-1424670901"; ServiceBinding response = networkServicesClient .createServiceBindingAsync(parent, serviceBinding, serviceBindingId) .get(); }- Parameters:
parent- Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/*`.serviceBinding- Required. ServiceBinding resource to be created.serviceBindingId- Required. Short name of the ServiceBinding resource to be created.- Throws:
ApiException- if the remote call fails
-
createServiceBindingAsync
public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(CreateServiceBindingRequest request) Creates a new ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateServiceBindingRequest request = CreateServiceBindingRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setServiceBindingId("serviceBindingId-1424670901") .setServiceBinding(ServiceBinding.newBuilder().build()) .build(); ServiceBinding response = networkServicesClient.createServiceBindingAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createServiceBindingOperationCallable
public final OperationCallable<CreateServiceBindingRequest,ServiceBinding, createServiceBindingOperationCallable()OperationMetadata> Creates a new ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateServiceBindingRequest request = CreateServiceBindingRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setServiceBindingId("serviceBindingId-1424670901") .setServiceBinding(ServiceBinding.newBuilder().build()) .build(); OperationFuture<ServiceBinding, OperationMetadata> future = networkServicesClient.createServiceBindingOperationCallable().futureCall(request); // Do something. ServiceBinding response = future.get(); } -
createServiceBindingCallable
Creates a new ServiceBinding in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateServiceBindingRequest request = CreateServiceBindingRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setServiceBindingId("serviceBindingId-1424670901") .setServiceBinding(ServiceBinding.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createServiceBindingCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateServiceBindingAsync
public final OperationFuture<ServiceBinding,OperationMetadata> updateServiceBindingAsync(ServiceBinding serviceBinding, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ServiceBinding serviceBinding = ServiceBinding.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ServiceBinding response = networkServicesClient.updateServiceBindingAsync(serviceBinding, updateMask).get(); }- Parameters:
serviceBinding- Required. Updated ServiceBinding resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the ServiceBinding resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateServiceBindingAsync
public final OperationFuture<ServiceBinding,OperationMetadata> updateServiceBindingAsync(UpdateServiceBindingRequest request) Updates the parameters of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateServiceBindingRequest request = UpdateServiceBindingRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setServiceBinding(ServiceBinding.newBuilder().build()) .build(); ServiceBinding response = networkServicesClient.updateServiceBindingAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateServiceBindingOperationCallable
public final OperationCallable<UpdateServiceBindingRequest,ServiceBinding, updateServiceBindingOperationCallable()OperationMetadata> Updates the parameters of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateServiceBindingRequest request = UpdateServiceBindingRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setServiceBinding(ServiceBinding.newBuilder().build()) .build(); OperationFuture<ServiceBinding, OperationMetadata> future = networkServicesClient.updateServiceBindingOperationCallable().futureCall(request); // Do something. ServiceBinding response = future.get(); } -
updateServiceBindingCallable
Updates the parameters of a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateServiceBindingRequest request = UpdateServiceBindingRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setServiceBinding(ServiceBinding.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateServiceBindingCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteServiceBindingAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingAsync(ServiceBindingName name) Deletes a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ServiceBindingName name = ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]"); networkServicesClient.deleteServiceBindingAsync(name).get(); }- Parameters:
name- Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/*/serviceBindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteServiceBindingAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingAsync(String name) Deletes a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString(); networkServicesClient.deleteServiceBindingAsync(name).get(); }- Parameters:
name- Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/*/serviceBindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteServiceBindingAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceBindingAsync(DeleteServiceBindingRequest request) Deletes a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteServiceBindingRequest request = DeleteServiceBindingRequest.newBuilder() .setName( ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString()) .build(); networkServicesClient.deleteServiceBindingAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteServiceBindingOperationCallable
public final OperationCallable<DeleteServiceBindingRequest,com.google.protobuf.Empty, deleteServiceBindingOperationCallable()OperationMetadata> Deletes a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteServiceBindingRequest request = DeleteServiceBindingRequest.newBuilder() .setName( ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteServiceBindingOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteServiceBindingCallable
Deletes a single ServiceBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteServiceBindingRequest request = DeleteServiceBindingRequest.newBuilder() .setName( ServiceBindingName.of("[PROJECT]", "[LOCATION]", "[SERVICE_BINDING]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteServiceBindingCallable().futureCall(request); // Do something. future.get(); } -
listMeshes
Lists Meshes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Mesh element : networkServicesClient.listMeshes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listMeshes
Lists Meshes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Mesh element : networkServicesClient.listMeshes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.- Throws:
ApiException- if the remote call fails
-
listMeshes
Lists Meshes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListMeshesRequest request = ListMeshesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); for (Mesh element : networkServicesClient.listMeshes(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listMeshesPagedCallable
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") .setReturnPartialSuccess(true) .build(); ApiFuture<Mesh> future = networkServicesClient.listMeshesPagedCallable().futureCall(request); // Do something. for (Mesh element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMeshesCallable
Lists Meshes in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListMeshesRequest request = ListMeshesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) .build(); while (true) { ListMeshesResponse response = networkServicesClient.listMeshesCallable().call(request); for (Mesh element : response.getMeshesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getMesh
Gets details of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { MeshName name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]"); Mesh response = networkServicesClient.getMesh(name); }- Parameters:
name- Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.- Throws:
ApiException- if the remote call fails
-
getMesh
Gets details of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString(); Mesh response = networkServicesClient.getMesh(name); }- Parameters:
name- Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.- Throws:
ApiException- if the remote call fails
-
getMesh
Gets details of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetMeshRequest request = GetMeshRequest.newBuilder() .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .build(); Mesh response = networkServicesClient.getMesh(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMeshCallable
Gets details of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetMeshRequest request = GetMeshRequest.newBuilder() .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .build(); ApiFuture<Mesh> future = networkServicesClient.getMeshCallable().futureCall(request); // Do something. Mesh response = future.get(); } -
createMeshAsync
public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(LocationName parent, Mesh mesh, String meshId) Creates a new Mesh in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Mesh mesh = Mesh.newBuilder().build(); String meshId = "meshId-1077585944"; Mesh response = networkServicesClient.createMeshAsync(parent, mesh, meshId).get(); }- Parameters:
parent- Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.mesh- Required. Mesh resource to be created.meshId- Required. Short name of the Mesh resource to be created.- Throws:
ApiException- if the remote call fails
-
createMeshAsync
public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(String parent, Mesh mesh, String meshId) Creates a new Mesh in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Mesh mesh = Mesh.newBuilder().build(); String meshId = "meshId-1077585944"; Mesh response = networkServicesClient.createMeshAsync(parent, mesh, meshId).get(); }- Parameters:
parent- Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.mesh- Required. Mesh resource to be created.meshId- Required. Short name of the Mesh resource to be created.- Throws:
ApiException- if the remote call fails
-
createMeshAsync
Creates a new Mesh in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateMeshRequest request = CreateMeshRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMeshId("meshId-1077585944") .setMesh(Mesh.newBuilder().build()) .build(); Mesh response = networkServicesClient.createMeshAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMeshOperationCallable
public final OperationCallable<CreateMeshRequest,Mesh, createMeshOperationCallable()OperationMetadata> Creates a new Mesh in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateMeshRequest request = CreateMeshRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMeshId("meshId-1077585944") .setMesh(Mesh.newBuilder().build()) .build(); OperationFuture<Mesh, OperationMetadata> future = networkServicesClient.createMeshOperationCallable().futureCall(request); // Do something. Mesh response = future.get(); } -
createMeshCallable
Creates a new Mesh in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateMeshRequest request = CreateMeshRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setMeshId("meshId-1077585944") .setMesh(Mesh.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createMeshCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateMeshAsync
public final OperationFuture<Mesh,OperationMetadata> updateMeshAsync(Mesh mesh, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { Mesh mesh = Mesh.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Mesh response = networkServicesClient.updateMeshAsync(mesh, updateMask).get(); }- Parameters:
mesh- Required. Updated Mesh resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateMeshAsync
Updates the parameters of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateMeshRequest request = UpdateMeshRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMesh(Mesh.newBuilder().build()) .build(); Mesh response = networkServicesClient.updateMeshAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMeshOperationCallable
public final OperationCallable<UpdateMeshRequest,Mesh, updateMeshOperationCallable()OperationMetadata> Updates the parameters of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateMeshRequest request = UpdateMeshRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMesh(Mesh.newBuilder().build()) .build(); OperationFuture<Mesh, OperationMetadata> future = networkServicesClient.updateMeshOperationCallable().futureCall(request); // Do something. Mesh response = future.get(); } -
updateMeshCallable
Updates the parameters of a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateMeshRequest request = UpdateMeshRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setMesh(Mesh.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateMeshCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteMeshAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(MeshName name) Deletes a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { MeshName name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]"); networkServicesClient.deleteMeshAsync(name).get(); }- Parameters:
name- Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.- Throws:
ApiException- if the remote call fails
-
deleteMeshAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(String name) Deletes a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString(); networkServicesClient.deleteMeshAsync(name).get(); }- Parameters:
name- Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.- Throws:
ApiException- if the remote call fails
-
deleteMeshAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMeshAsync(DeleteMeshRequest request) Deletes a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteMeshRequest request = DeleteMeshRequest.newBuilder() .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .build(); networkServicesClient.deleteMeshAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMeshOperationCallable
public final OperationCallable<DeleteMeshRequest,com.google.protobuf.Empty, deleteMeshOperationCallable()OperationMetadata> Deletes a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteMeshRequest request = DeleteMeshRequest.newBuilder() .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteMeshOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteMeshCallable
Deletes a single Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteMeshRequest request = DeleteMeshRequest.newBuilder() .setName(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteMeshCallable().futureCall(request); // Do something. future.get(); } -
listServiceLbPolicies
public final NetworkServicesClient.ListServiceLbPoliciesPagedResponse listServiceLbPolicies(LocationName parent) Lists ServiceLbPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ServiceLbPolicy element : networkServicesClient.listServiceLbPolicies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listServiceLbPolicies
public final NetworkServicesClient.ListServiceLbPoliciesPagedResponse listServiceLbPolicies(String parent) Lists ServiceLbPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ServiceLbPolicy element : networkServicesClient.listServiceLbPolicies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listServiceLbPolicies
public final NetworkServicesClient.ListServiceLbPoliciesPagedResponse listServiceLbPolicies(ListServiceLbPoliciesRequest request) Lists ServiceLbPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListServiceLbPoliciesRequest request = ListServiceLbPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (ServiceLbPolicy element : networkServicesClient.listServiceLbPolicies(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listServiceLbPoliciesPagedCallable
public final UnaryCallable<ListServiceLbPoliciesRequest,NetworkServicesClient.ListServiceLbPoliciesPagedResponse> listServiceLbPoliciesPagedCallable()Lists ServiceLbPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListServiceLbPoliciesRequest request = ListServiceLbPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<ServiceLbPolicy> future = networkServicesClient.listServiceLbPoliciesPagedCallable().futureCall(request); // Do something. for (ServiceLbPolicy element : future.get().iterateAll()) { // doThingsWith(element); } } -
listServiceLbPoliciesCallable
public final UnaryCallable<ListServiceLbPoliciesRequest,ListServiceLbPoliciesResponse> listServiceLbPoliciesCallable()Lists ServiceLbPolicies in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListServiceLbPoliciesRequest request = ListServiceLbPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListServiceLbPoliciesResponse response = networkServicesClient.listServiceLbPoliciesCallable().call(request); for (ServiceLbPolicy element : response.getServiceLbPoliciesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getServiceLbPolicy
Gets details of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ServiceLbPolicyName name = ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]"); ServiceLbPolicy response = networkServicesClient.getServiceLbPolicy(name); }- Parameters:
name- Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.- Throws:
ApiException- if the remote call fails
-
getServiceLbPolicy
Gets details of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]").toString(); ServiceLbPolicy response = networkServicesClient.getServiceLbPolicy(name); }- Parameters:
name- Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.- Throws:
ApiException- if the remote call fails
-
getServiceLbPolicy
Gets details of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetServiceLbPolicyRequest request = GetServiceLbPolicyRequest.newBuilder() .setName( ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]") .toString()) .build(); ServiceLbPolicy response = networkServicesClient.getServiceLbPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getServiceLbPolicyCallable
Gets details of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetServiceLbPolicyRequest request = GetServiceLbPolicyRequest.newBuilder() .setName( ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]") .toString()) .build(); ApiFuture<ServiceLbPolicy> future = networkServicesClient.getServiceLbPolicyCallable().futureCall(request); // Do something. ServiceLbPolicy response = future.get(); } -
createServiceLbPolicyAsync
public final OperationFuture<ServiceLbPolicy,OperationMetadata> createServiceLbPolicyAsync(LocationName parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId) Creates a new ServiceLbPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ServiceLbPolicy serviceLbPolicy = ServiceLbPolicy.newBuilder().build(); String serviceLbPolicyId = "serviceLbPolicyId1391086104"; ServiceLbPolicy response = networkServicesClient .createServiceLbPolicyAsync(parent, serviceLbPolicy, serviceLbPolicyId) .get(); }- Parameters:
parent- Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.serviceLbPolicy- Required. ServiceLbPolicy resource to be created.serviceLbPolicyId- Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}- Throws:
ApiException- if the remote call fails
-
createServiceLbPolicyAsync
public final OperationFuture<ServiceLbPolicy,OperationMetadata> createServiceLbPolicyAsync(String parent, ServiceLbPolicy serviceLbPolicy, String serviceLbPolicyId) Creates a new ServiceLbPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ServiceLbPolicy serviceLbPolicy = ServiceLbPolicy.newBuilder().build(); String serviceLbPolicyId = "serviceLbPolicyId1391086104"; ServiceLbPolicy response = networkServicesClient .createServiceLbPolicyAsync(parent, serviceLbPolicy, serviceLbPolicyId) .get(); }- Parameters:
parent- Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.serviceLbPolicy- Required. ServiceLbPolicy resource to be created.serviceLbPolicyId- Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}- Throws:
ApiException- if the remote call fails
-
createServiceLbPolicyAsync
public final OperationFuture<ServiceLbPolicy,OperationMetadata> createServiceLbPolicyAsync(CreateServiceLbPolicyRequest request) Creates a new ServiceLbPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateServiceLbPolicyRequest request = CreateServiceLbPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setServiceLbPolicyId("serviceLbPolicyId1391086104") .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build()) .build(); ServiceLbPolicy response = networkServicesClient.createServiceLbPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createServiceLbPolicyOperationCallable
public final OperationCallable<CreateServiceLbPolicyRequest,ServiceLbPolicy, createServiceLbPolicyOperationCallable()OperationMetadata> Creates a new ServiceLbPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateServiceLbPolicyRequest request = CreateServiceLbPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setServiceLbPolicyId("serviceLbPolicyId1391086104") .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build()) .build(); OperationFuture<ServiceLbPolicy, OperationMetadata> future = networkServicesClient.createServiceLbPolicyOperationCallable().futureCall(request); // Do something. ServiceLbPolicy response = future.get(); } -
createServiceLbPolicyCallable
Creates a new ServiceLbPolicy in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { CreateServiceLbPolicyRequest request = CreateServiceLbPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setServiceLbPolicyId("serviceLbPolicyId1391086104") .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.createServiceLbPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateServiceLbPolicyAsync
public final OperationFuture<ServiceLbPolicy,OperationMetadata> updateServiceLbPolicyAsync(ServiceLbPolicy serviceLbPolicy, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ServiceLbPolicy serviceLbPolicy = ServiceLbPolicy.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ServiceLbPolicy response = networkServicesClient.updateServiceLbPolicyAsync(serviceLbPolicy, updateMask).get(); }- Parameters:
serviceLbPolicy- Required. Updated ServiceLbPolicy resource.updateMask- Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateServiceLbPolicyAsync
public final OperationFuture<ServiceLbPolicy,OperationMetadata> updateServiceLbPolicyAsync(UpdateServiceLbPolicyRequest request) Updates the parameters of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateServiceLbPolicyRequest request = UpdateServiceLbPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build()) .build(); ServiceLbPolicy response = networkServicesClient.updateServiceLbPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateServiceLbPolicyOperationCallable
public final OperationCallable<UpdateServiceLbPolicyRequest,ServiceLbPolicy, updateServiceLbPolicyOperationCallable()OperationMetadata> Updates the parameters of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateServiceLbPolicyRequest request = UpdateServiceLbPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build()) .build(); OperationFuture<ServiceLbPolicy, OperationMetadata> future = networkServicesClient.updateServiceLbPolicyOperationCallable().futureCall(request); // Do something. ServiceLbPolicy response = future.get(); } -
updateServiceLbPolicyCallable
Updates the parameters of a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { UpdateServiceLbPolicyRequest request = UpdateServiceLbPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setServiceLbPolicy(ServiceLbPolicy.newBuilder().build()) .build(); ApiFuture<Operation> future = networkServicesClient.updateServiceLbPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteServiceLbPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyAsync(ServiceLbPolicyName name) Deletes a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ServiceLbPolicyName name = ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]"); networkServicesClient.deleteServiceLbPolicyAsync(name).get(); }- Parameters:
name- Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.- Throws:
ApiException- if the remote call fails
-
deleteServiceLbPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyAsync(String name) Deletes a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]").toString(); networkServicesClient.deleteServiceLbPolicyAsync(name).get(); }- Parameters:
name- Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.- Throws:
ApiException- if the remote call fails
-
deleteServiceLbPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteServiceLbPolicyAsync(DeleteServiceLbPolicyRequest request) Deletes a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteServiceLbPolicyRequest request = DeleteServiceLbPolicyRequest.newBuilder() .setName( ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]") .toString()) .build(); networkServicesClient.deleteServiceLbPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteServiceLbPolicyOperationCallable
public final OperationCallable<DeleteServiceLbPolicyRequest,com.google.protobuf.Empty, deleteServiceLbPolicyOperationCallable()OperationMetadata> Deletes a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteServiceLbPolicyRequest request = DeleteServiceLbPolicyRequest.newBuilder() .setName( ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]") .toString()) .build(); OperationFuture<Empty, OperationMetadata> future = networkServicesClient.deleteServiceLbPolicyOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteServiceLbPolicyCallable
Deletes a single ServiceLbPolicy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { DeleteServiceLbPolicyRequest request = DeleteServiceLbPolicyRequest.newBuilder() .setName( ServiceLbPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVICE_LB_POLICY]") .toString()) .build(); ApiFuture<Operation> future = networkServicesClient.deleteServiceLbPolicyCallable().futureCall(request); // Do something. future.get(); } -
getGatewayRouteView
Get a single RouteView of a Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GatewayRouteViewName name = GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]"); GatewayRouteView response = networkServicesClient.getGatewayRouteView(name); }- Parameters:
name- Required. Name of the GatewayRouteView resource. Formats: projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}- Throws:
ApiException- if the remote call fails
-
getGatewayRouteView
Get a single RouteView of a Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]") .toString(); GatewayRouteView response = networkServicesClient.getGatewayRouteView(name); }- Parameters:
name- Required. Name of the GatewayRouteView resource. Formats: projects/{project}/locations/{location}/gateways/{gateway}/routeViews/{route_view}- Throws:
ApiException- if the remote call fails
-
getGatewayRouteView
Get a single RouteView of a Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetGatewayRouteViewRequest request = GetGatewayRouteViewRequest.newBuilder() .setName( GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]") .toString()) .build(); GatewayRouteView response = networkServicesClient.getGatewayRouteView(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getGatewayRouteViewCallable
public final UnaryCallable<GetGatewayRouteViewRequest,GatewayRouteView> getGatewayRouteViewCallable()Get a single RouteView of a Gateway.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetGatewayRouteViewRequest request = GetGatewayRouteViewRequest.newBuilder() .setName( GatewayRouteViewName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]", "[ROUTE_VIEW]") .toString()) .build(); ApiFuture<GatewayRouteView> future = networkServicesClient.getGatewayRouteViewCallable().futureCall(request); // Do something. GatewayRouteView response = future.get(); } -
getMeshRouteView
Get a single RouteView of a Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { MeshRouteViewName name = MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]"); MeshRouteView response = networkServicesClient.getMeshRouteView(name); }- Parameters:
name- Required. Name of the MeshRouteView resource. Format: projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}- Throws:
ApiException- if the remote call fails
-
getMeshRouteView
Get a single RouteView of a Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String name = MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]").toString(); MeshRouteView response = networkServicesClient.getMeshRouteView(name); }- Parameters:
name- Required. Name of the MeshRouteView resource. Format: projects/{project}/locations/{location}/meshes/{mesh}/routeViews/{route_view}- Throws:
ApiException- if the remote call fails
-
getMeshRouteView
Get a single RouteView of a Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetMeshRouteViewRequest request = GetMeshRouteViewRequest.newBuilder() .setName( MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]") .toString()) .build(); MeshRouteView response = networkServicesClient.getMeshRouteView(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getMeshRouteViewCallable
Get a single RouteView of a Mesh.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetMeshRouteViewRequest request = GetMeshRouteViewRequest.newBuilder() .setName( MeshRouteViewName.of("[PROJECT]", "[LOCATION]", "[MESH]", "[ROUTE_VIEW]") .toString()) .build(); ApiFuture<MeshRouteView> future = networkServicesClient.getMeshRouteViewCallable().futureCall(request); // Do something. MeshRouteView response = future.get(); } -
listGatewayRouteViews
public final NetworkServicesClient.ListGatewayRouteViewsPagedResponse listGatewayRouteViews(GatewayName parent) Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GatewayName parent = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]"); for (GatewayRouteView element : networkServicesClient.listGatewayRouteViews(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The Gateway to which a Route is associated. Formats: projects/{project}/locations/{location}/gateways/{gateway}- Throws:
ApiException- if the remote call fails
-
listGatewayRouteViews
public final NetworkServicesClient.ListGatewayRouteViewsPagedResponse listGatewayRouteViews(String parent) Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString(); for (GatewayRouteView element : networkServicesClient.listGatewayRouteViews(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The Gateway to which a Route is associated. Formats: projects/{project}/locations/{location}/gateways/{gateway}- Throws:
ApiException- if the remote call fails
-
listGatewayRouteViews
public final NetworkServicesClient.ListGatewayRouteViewsPagedResponse listGatewayRouteViews(ListGatewayRouteViewsRequest request) Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListGatewayRouteViewsRequest request = ListGatewayRouteViewsRequest.newBuilder() .setParent(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (GatewayRouteView element : networkServicesClient.listGatewayRouteViews(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listGatewayRouteViewsPagedCallable
public final UnaryCallable<ListGatewayRouteViewsRequest,NetworkServicesClient.ListGatewayRouteViewsPagedResponse> listGatewayRouteViewsPagedCallable()Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListGatewayRouteViewsRequest request = ListGatewayRouteViewsRequest.newBuilder() .setParent(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<GatewayRouteView> future = networkServicesClient.listGatewayRouteViewsPagedCallable().futureCall(request); // Do something. for (GatewayRouteView element : future.get().iterateAll()) { // doThingsWith(element); } } -
listGatewayRouteViewsCallable
public final UnaryCallable<ListGatewayRouteViewsRequest,ListGatewayRouteViewsResponse> listGatewayRouteViewsCallable()Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListGatewayRouteViewsRequest request = ListGatewayRouteViewsRequest.newBuilder() .setParent(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListGatewayRouteViewsResponse response = networkServicesClient.listGatewayRouteViewsCallable().call(request); for (GatewayRouteView element : response.getGatewayRouteViewsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listMeshRouteViews
public final NetworkServicesClient.ListMeshRouteViewsPagedResponse listMeshRouteViews(MeshName parent) Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { MeshName parent = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]"); for (MeshRouteView element : networkServicesClient.listMeshRouteViews(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The Mesh to which a Route is associated. Format: projects/{project}/locations/{location}/meshes/{mesh}- Throws:
ApiException- if the remote call fails
-
listMeshRouteViews
public final NetworkServicesClient.ListMeshRouteViewsPagedResponse listMeshRouteViews(String parent) Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { String parent = MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString(); for (MeshRouteView element : networkServicesClient.listMeshRouteViews(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The Mesh to which a Route is associated. Format: projects/{project}/locations/{location}/meshes/{mesh}- Throws:
ApiException- if the remote call fails
-
listMeshRouteViews
public final NetworkServicesClient.ListMeshRouteViewsPagedResponse listMeshRouteViews(ListMeshRouteViewsRequest request) Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListMeshRouteViewsRequest request = ListMeshRouteViewsRequest.newBuilder() .setParent(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (MeshRouteView element : networkServicesClient.listMeshRouteViews(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listMeshRouteViewsPagedCallable
public final UnaryCallable<ListMeshRouteViewsRequest,NetworkServicesClient.ListMeshRouteViewsPagedResponse> listMeshRouteViewsPagedCallable()Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListMeshRouteViewsRequest request = ListMeshRouteViewsRequest.newBuilder() .setParent(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<MeshRouteView> future = networkServicesClient.listMeshRouteViewsPagedCallable().futureCall(request); // Do something. for (MeshRouteView element : future.get().iterateAll()) { // doThingsWith(element); } } -
listMeshRouteViewsCallable
public final UnaryCallable<ListMeshRouteViewsRequest,ListMeshRouteViewsResponse> listMeshRouteViewsCallable()Lists RouteViewsSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListMeshRouteViewsRequest request = ListMeshRouteViewsRequest.newBuilder() .setParent(MeshName.of("[PROJECT]", "[LOCATION]", "[MESH]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListMeshRouteViewsResponse response = networkServicesClient.listMeshRouteViewsCallable().call(request); for (MeshRouteView element : response.getMeshRouteViewsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
listLocations
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = networkServicesClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = networkServicesClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = networkServicesClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = networkServicesClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = networkServicesClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = networkServicesClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = networkServicesClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = networkServicesClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = networkServicesClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-