@Generated(value="by gapic-generator-java") public class TensorboardServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
Tensorboard response = tensorboardServiceClient.getTensorboard(name);
}
Note: close() needs to be called on the TensorboardServiceClient 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 |
|---|---|---|
CreateTensorboard |
Creates a Tensorboard. |
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.
|
GetTensorboard |
Gets a Tensorboard. |
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.
|
UpdateTensorboard |
Updates a Tensorboard. |
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.
|
ListTensorboards |
Lists Tensorboards in a 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.
|
DeleteTensorboard |
Deletes a Tensorboard. |
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.
|
ReadTensorboardUsage |
Returns a list of monthly active users for a given TensorBoard instance. |
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.
|
ReadTensorboardSize |
Returns the storage size for a given TensorBoard instance. |
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.
|
CreateTensorboardExperiment |
Creates a TensorboardExperiment. |
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.
|
GetTensorboardExperiment |
Gets a TensorboardExperiment. |
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.
|
UpdateTensorboardExperiment |
Updates a TensorboardExperiment. |
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.
|
ListTensorboardExperiments |
Lists TensorboardExperiments in a 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.
|
DeleteTensorboardExperiment |
Deletes a TensorboardExperiment. |
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.
|
CreateTensorboardRun |
Creates a TensorboardRun. |
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.
|
BatchCreateTensorboardRuns |
Batch create TensorboardRuns. |
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.
|
GetTensorboardRun |
Gets a TensorboardRun. |
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.
|
UpdateTensorboardRun |
Updates a TensorboardRun. |
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.
|
ListTensorboardRuns |
Lists TensorboardRuns in a 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.
|
DeleteTensorboardRun |
Deletes a TensorboardRun. |
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.
|
BatchCreateTensorboardTimeSeries |
Batch create TensorboardTimeSeries that belong to a TensorboardExperiment. |
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.
|
CreateTensorboardTimeSeries |
Creates a TensorboardTimeSeries. |
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.
|
GetTensorboardTimeSeries |
Gets a TensorboardTimeSeries. |
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.
|
UpdateTensorboardTimeSeries |
Updates a TensorboardTimeSeries. |
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.
|
ListTensorboardTimeSeries |
Lists TensorboardTimeSeries in a 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.
|
DeleteTensorboardTimeSeries |
Deletes a TensorboardTimeSeries. |
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.
|
BatchReadTensorboardTimeSeriesData |
Reads multiple TensorboardTimeSeries' data. The data point number limit is 1000 for scalars, 100 for tensors and blob references. If the number of data points stored is less than the limit, all data is returned. Otherwise, the number limit of data points is randomly selected from this time series and returned. |
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.
|
ReadTensorboardTimeSeriesData |
Reads a TensorboardTimeSeries' data. By default, if the number of data points stored is less than 1000, all data is returned. Otherwise, 1000 data points is randomly selected from this time series and returned. This value can be changed by changing max_data_points, which can't be greater than 10k. |
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.
|
ReadTensorboardBlobData |
Gets bytes of TensorboardBlobs. This is to allow reading blob data stored in consumer project's Cloud Storage bucket without users having to obtain Cloud Storage access permission. |
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
WriteTensorboardExperimentData |
Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's. If any data fail to be ingested, an error is returned. |
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.
|
WriteTensorboardRunData |
Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun. If any data fail to be ingested, an error is returned. |
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.
|
ExportTensorboardTimeSeriesData |
Exports a TensorboardTimeSeries' data. Data is returned in paginated responses. |
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 TensorboardServiceSettings 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
TensorboardServiceSettings tensorboardServiceSettings =
TensorboardServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
TensorboardServiceClient tensorboardServiceClient =
TensorboardServiceClient.create(tensorboardServiceSettings);
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
TensorboardServiceSettings tensorboardServiceSettings =
TensorboardServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
TensorboardServiceClient tensorboardServiceClient =
TensorboardServiceClient.create(tensorboardServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier | Constructor and Description |
|---|---|
protected |
TensorboardServiceClient(TensorboardServiceSettings settings)
Constructs an instance of TensorboardServiceClient, using the given settings.
|
protected |
TensorboardServiceClient(TensorboardServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
BatchCreateTensorboardRunsResponse |
batchCreateTensorboardRuns(BatchCreateTensorboardRunsRequest request)
Batch create TensorboardRuns.
|
BatchCreateTensorboardRunsResponse |
batchCreateTensorboardRuns(String parent,
List<CreateTensorboardRunRequest> requests)
Batch create TensorboardRuns.
|
BatchCreateTensorboardRunsResponse |
batchCreateTensorboardRuns(TensorboardExperimentName parent,
List<CreateTensorboardRunRequest> requests)
Batch create TensorboardRuns.
|
com.google.api.gax.rpc.UnaryCallable<BatchCreateTensorboardRunsRequest,BatchCreateTensorboardRunsResponse> |
batchCreateTensorboardRunsCallable()
Batch create TensorboardRuns.
|
BatchCreateTensorboardTimeSeriesResponse |
batchCreateTensorboardTimeSeries(BatchCreateTensorboardTimeSeriesRequest request)
Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.
|
BatchCreateTensorboardTimeSeriesResponse |
batchCreateTensorboardTimeSeries(String parent,
List<CreateTensorboardTimeSeriesRequest> requests)
Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.
|
BatchCreateTensorboardTimeSeriesResponse |
batchCreateTensorboardTimeSeries(TensorboardExperimentName parent,
List<CreateTensorboardTimeSeriesRequest> requests)
Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.
|
com.google.api.gax.rpc.UnaryCallable<BatchCreateTensorboardTimeSeriesRequest,BatchCreateTensorboardTimeSeriesResponse> |
batchCreateTensorboardTimeSeriesCallable()
Batch create TensorboardTimeSeries that belong to a TensorboardExperiment.
|
BatchReadTensorboardTimeSeriesDataResponse |
batchReadTensorboardTimeSeriesData(BatchReadTensorboardTimeSeriesDataRequest request)
Reads multiple TensorboardTimeSeries' data.
|
BatchReadTensorboardTimeSeriesDataResponse |
batchReadTensorboardTimeSeriesData(String tensorboard)
Reads multiple TensorboardTimeSeries' data.
|
BatchReadTensorboardTimeSeriesDataResponse |
batchReadTensorboardTimeSeriesData(TensorboardName tensorboard)
Reads multiple TensorboardTimeSeries' data.
|
com.google.api.gax.rpc.UnaryCallable<BatchReadTensorboardTimeSeriesDataRequest,BatchReadTensorboardTimeSeriesDataResponse> |
batchReadTensorboardTimeSeriesDataCallable()
Reads multiple TensorboardTimeSeries' data.
|
void |
close() |
static TensorboardServiceClient |
create()
Constructs an instance of TensorboardServiceClient with default settings.
|
static TensorboardServiceClient |
create(TensorboardServiceSettings settings)
Constructs an instance of TensorboardServiceClient, using the given settings.
|
static TensorboardServiceClient |
create(TensorboardServiceStub stub)
Constructs an instance of TensorboardServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> |
createTensorboardAsync(CreateTensorboardRequest request)
Creates a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> |
createTensorboardAsync(String parent,
Tensorboard tensorboard)
Creates a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> |
createTensorboardAsync(TensorboardName parent,
Tensorboard tensorboard)
Creates a Tensorboard.
|
com.google.api.gax.rpc.UnaryCallable<CreateTensorboardRequest,com.google.longrunning.Operation> |
createTensorboardCallable()
Creates a Tensorboard.
|
TensorboardExperiment |
createTensorboardExperiment(CreateTensorboardExperimentRequest request)
Creates a TensorboardExperiment.
|
TensorboardExperiment |
createTensorboardExperiment(String parent,
TensorboardExperiment tensorboardExperiment,
String tensorboardExperimentId)
Creates a TensorboardExperiment.
|
TensorboardExperiment |
createTensorboardExperiment(TensorboardExperimentName parent,
TensorboardExperiment tensorboardExperiment,
String tensorboardExperimentId)
Creates a TensorboardExperiment.
|
com.google.api.gax.rpc.UnaryCallable<CreateTensorboardExperimentRequest,TensorboardExperiment> |
createTensorboardExperimentCallable()
Creates a TensorboardExperiment.
|
com.google.api.gax.rpc.OperationCallable<CreateTensorboardRequest,Tensorboard,CreateTensorboardOperationMetadata> |
createTensorboardOperationCallable()
Creates a Tensorboard.
|
TensorboardRun |
createTensorboardRun(CreateTensorboardRunRequest request)
Creates a TensorboardRun.
|
TensorboardRun |
createTensorboardRun(String parent,
TensorboardRun tensorboardRun,
String tensorboardRunId)
Creates a TensorboardRun.
|
TensorboardRun |
createTensorboardRun(TensorboardRunName parent,
TensorboardRun tensorboardRun,
String tensorboardRunId)
Creates a TensorboardRun.
|
com.google.api.gax.rpc.UnaryCallable<CreateTensorboardRunRequest,TensorboardRun> |
createTensorboardRunCallable()
Creates a TensorboardRun.
|
TensorboardTimeSeries |
createTensorboardTimeSeries(CreateTensorboardTimeSeriesRequest request)
Creates a TensorboardTimeSeries.
|
TensorboardTimeSeries |
createTensorboardTimeSeries(String parent,
TensorboardTimeSeries tensorboardTimeSeries)
Creates a TensorboardTimeSeries.
|
TensorboardTimeSeries |
createTensorboardTimeSeries(TensorboardTimeSeriesName parent,
TensorboardTimeSeries tensorboardTimeSeries)
Creates a TensorboardTimeSeries.
|
com.google.api.gax.rpc.UnaryCallable<CreateTensorboardTimeSeriesRequest,TensorboardTimeSeries> |
createTensorboardTimeSeriesCallable()
Creates a TensorboardTimeSeries.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardAsync(DeleteTensorboardRequest request)
Deletes a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardAsync(String name)
Deletes a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardAsync(TensorboardName name)
Deletes a Tensorboard.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardRequest,com.google.longrunning.Operation> |
deleteTensorboardCallable()
Deletes a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardExperimentAsync(DeleteTensorboardExperimentRequest request)
Deletes a TensorboardExperiment.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardExperimentAsync(String name)
Deletes a TensorboardExperiment.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardExperimentAsync(TensorboardExperimentName name)
Deletes a TensorboardExperiment.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardExperimentRequest,com.google.longrunning.Operation> |
deleteTensorboardExperimentCallable()
Deletes a TensorboardExperiment.
|
com.google.api.gax.rpc.OperationCallable<DeleteTensorboardExperimentRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardExperimentOperationCallable()
Deletes a TensorboardExperiment.
|
com.google.api.gax.rpc.OperationCallable<DeleteTensorboardRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardOperationCallable()
Deletes a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardRunAsync(DeleteTensorboardRunRequest request)
Deletes a TensorboardRun.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardRunAsync(String name)
Deletes a TensorboardRun.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardRunAsync(TensorboardRunName name)
Deletes a TensorboardRun.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardRunRequest,com.google.longrunning.Operation> |
deleteTensorboardRunCallable()
Deletes a TensorboardRun.
|
com.google.api.gax.rpc.OperationCallable<DeleteTensorboardRunRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardRunOperationCallable()
Deletes a TensorboardRun.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardTimeSeriesAsync(DeleteTensorboardTimeSeriesRequest request)
Deletes a TensorboardTimeSeries.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardTimeSeriesAsync(String name)
Deletes a TensorboardTimeSeries.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardTimeSeriesAsync(TensorboardTimeSeriesName name)
Deletes a TensorboardTimeSeries.
|
com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardTimeSeriesRequest,com.google.longrunning.Operation> |
deleteTensorboardTimeSeriesCallable()
Deletes a TensorboardTimeSeries.
|
com.google.api.gax.rpc.OperationCallable<DeleteTensorboardTimeSeriesRequest,com.google.protobuf.Empty,DeleteOperationMetadata> |
deleteTensorboardTimeSeriesOperationCallable()
Deletes a TensorboardTimeSeries.
|
TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse |
exportTensorboardTimeSeriesData(ExportTensorboardTimeSeriesDataRequest request)
Exports a TensorboardTimeSeries' data.
|
TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse |
exportTensorboardTimeSeriesData(String tensorboardTimeSeries)
Exports a TensorboardTimeSeries' data.
|
TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse |
exportTensorboardTimeSeriesData(TensorboardTimeSeriesName tensorboardTimeSeries)
Exports a TensorboardTimeSeries' data.
|
com.google.api.gax.rpc.UnaryCallable<ExportTensorboardTimeSeriesDataRequest,ExportTensorboardTimeSeriesDataResponse> |
exportTensorboardTimeSeriesDataCallable()
Exports a TensorboardTimeSeries' data.
|
com.google.api.gax.rpc.UnaryCallable<ExportTensorboardTimeSeriesDataRequest,TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse> |
exportTensorboardTimeSeriesDataPagedCallable()
Exports a TensorboardTimeSeries' data.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for a resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyCallable()
Gets the access control policy for a resource.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
TensorboardServiceSettings |
getSettings() |
TensorboardServiceStub |
getStub() |
Tensorboard |
getTensorboard(GetTensorboardRequest request)
Gets a Tensorboard.
|
Tensorboard |
getTensorboard(String name)
Gets a Tensorboard.
|
Tensorboard |
getTensorboard(TensorboardName name)
Gets a Tensorboard.
|
com.google.api.gax.rpc.UnaryCallable<GetTensorboardRequest,Tensorboard> |
getTensorboardCallable()
Gets a Tensorboard.
|
TensorboardExperiment |
getTensorboardExperiment(GetTensorboardExperimentRequest request)
Gets a TensorboardExperiment.
|
TensorboardExperiment |
getTensorboardExperiment(String name)
Gets a TensorboardExperiment.
|
TensorboardExperiment |
getTensorboardExperiment(TensorboardExperimentName name)
Gets a TensorboardExperiment.
|
com.google.api.gax.rpc.UnaryCallable<GetTensorboardExperimentRequest,TensorboardExperiment> |
getTensorboardExperimentCallable()
Gets a TensorboardExperiment.
|
TensorboardRun |
getTensorboardRun(GetTensorboardRunRequest request)
Gets a TensorboardRun.
|
TensorboardRun |
getTensorboardRun(String name)
Gets a TensorboardRun.
|
TensorboardRun |
getTensorboardRun(TensorboardRunName name)
Gets a TensorboardRun.
|
com.google.api.gax.rpc.UnaryCallable<GetTensorboardRunRequest,TensorboardRun> |
getTensorboardRunCallable()
Gets a TensorboardRun.
|
TensorboardTimeSeries |
getTensorboardTimeSeries(GetTensorboardTimeSeriesRequest request)
Gets a TensorboardTimeSeries.
|
TensorboardTimeSeries |
getTensorboardTimeSeries(String name)
Gets a TensorboardTimeSeries.
|
TensorboardTimeSeries |
getTensorboardTimeSeries(TensorboardTimeSeriesName name)
Gets a TensorboardTimeSeries.
|
com.google.api.gax.rpc.UnaryCallable<GetTensorboardTimeSeriesRequest,TensorboardTimeSeries> |
getTensorboardTimeSeriesCallable()
Gets a TensorboardTimeSeries.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
TensorboardServiceClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,TensorboardServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
TensorboardServiceClient.ListTensorboardExperimentsPagedResponse |
listTensorboardExperiments(ListTensorboardExperimentsRequest request)
Lists TensorboardExperiments in a Location.
|
TensorboardServiceClient.ListTensorboardExperimentsPagedResponse |
listTensorboardExperiments(String parent)
Lists TensorboardExperiments in a Location.
|
TensorboardServiceClient.ListTensorboardExperimentsPagedResponse |
listTensorboardExperiments(TensorboardName parent)
Lists TensorboardExperiments in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardExperimentsRequest,ListTensorboardExperimentsResponse> |
listTensorboardExperimentsCallable()
Lists TensorboardExperiments in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardExperimentsRequest,TensorboardServiceClient.ListTensorboardExperimentsPagedResponse> |
listTensorboardExperimentsPagedCallable()
Lists TensorboardExperiments in a Location.
|
TensorboardServiceClient.ListTensorboardRunsPagedResponse |
listTensorboardRuns(ListTensorboardRunsRequest request)
Lists TensorboardRuns in a Location.
|
TensorboardServiceClient.ListTensorboardRunsPagedResponse |
listTensorboardRuns(String parent)
Lists TensorboardRuns in a Location.
|
TensorboardServiceClient.ListTensorboardRunsPagedResponse |
listTensorboardRuns(TensorboardExperimentName parent)
Lists TensorboardRuns in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardRunsRequest,ListTensorboardRunsResponse> |
listTensorboardRunsCallable()
Lists TensorboardRuns in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardRunsRequest,TensorboardServiceClient.ListTensorboardRunsPagedResponse> |
listTensorboardRunsPagedCallable()
Lists TensorboardRuns in a Location.
|
TensorboardServiceClient.ListTensorboardsPagedResponse |
listTensorboards(ListTensorboardsRequest request)
Lists Tensorboards in a Location.
|
TensorboardServiceClient.ListTensorboardsPagedResponse |
listTensorboards(LocationName parent)
Lists Tensorboards in a Location.
|
TensorboardServiceClient.ListTensorboardsPagedResponse |
listTensorboards(String parent)
Lists Tensorboards in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardsRequest,ListTensorboardsResponse> |
listTensorboardsCallable()
Lists Tensorboards in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardsRequest,TensorboardServiceClient.ListTensorboardsPagedResponse> |
listTensorboardsPagedCallable()
Lists Tensorboards in a Location.
|
TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse |
listTensorboardTimeSeries(ListTensorboardTimeSeriesRequest request)
Lists TensorboardTimeSeries in a Location.
|
TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse |
listTensorboardTimeSeries(String parent)
Lists TensorboardTimeSeries in a Location.
|
TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse |
listTensorboardTimeSeries(TensorboardRunName parent)
Lists TensorboardTimeSeries in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardTimeSeriesRequest,ListTensorboardTimeSeriesResponse> |
listTensorboardTimeSeriesCallable()
Lists TensorboardTimeSeries in a Location.
|
com.google.api.gax.rpc.UnaryCallable<ListTensorboardTimeSeriesRequest,TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse> |
listTensorboardTimeSeriesPagedCallable()
Lists TensorboardTimeSeries in a Location.
|
com.google.api.gax.rpc.ServerStreamingCallable<ReadTensorboardBlobDataRequest,ReadTensorboardBlobDataResponse> |
readTensorboardBlobDataCallable()
Gets bytes of TensorboardBlobs.
|
ReadTensorboardSizeResponse |
readTensorboardSize(ReadTensorboardSizeRequest request)
Returns the storage size for a given TensorBoard instance.
|
ReadTensorboardSizeResponse |
readTensorboardSize(String tensorboard)
Returns the storage size for a given TensorBoard instance.
|
ReadTensorboardSizeResponse |
readTensorboardSize(TensorboardName tensorboard)
Returns the storage size for a given TensorBoard instance.
|
com.google.api.gax.rpc.UnaryCallable<ReadTensorboardSizeRequest,ReadTensorboardSizeResponse> |
readTensorboardSizeCallable()
Returns the storage size for a given TensorBoard instance.
|
ReadTensorboardTimeSeriesDataResponse |
readTensorboardTimeSeriesData(ReadTensorboardTimeSeriesDataRequest request)
Reads a TensorboardTimeSeries' data.
|
ReadTensorboardTimeSeriesDataResponse |
readTensorboardTimeSeriesData(String tensorboardTimeSeries)
Reads a TensorboardTimeSeries' data.
|
ReadTensorboardTimeSeriesDataResponse |
readTensorboardTimeSeriesData(TensorboardTimeSeriesName tensorboardTimeSeries)
Reads a TensorboardTimeSeries' data.
|
com.google.api.gax.rpc.UnaryCallable<ReadTensorboardTimeSeriesDataRequest,ReadTensorboardTimeSeriesDataResponse> |
readTensorboardTimeSeriesDataCallable()
Reads a TensorboardTimeSeries' data.
|
ReadTensorboardUsageResponse |
readTensorboardUsage(ReadTensorboardUsageRequest request)
Returns a list of monthly active users for a given TensorBoard instance.
|
ReadTensorboardUsageResponse |
readTensorboardUsage(String tensorboard)
Returns a list of monthly active users for a given TensorBoard instance.
|
ReadTensorboardUsageResponse |
readTensorboardUsage(TensorboardName tensorboard)
Returns a list of monthly active users for a given TensorBoard instance.
|
com.google.api.gax.rpc.UnaryCallable<ReadTensorboardUsageRequest,ReadTensorboardUsageResponse> |
readTensorboardUsageCallable()
Returns a list of monthly active users for a given TensorBoard instance.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyCallable()
Sets the access control policy on the specified resource.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.longrunning.OperationFuture<Tensorboard,UpdateTensorboardOperationMetadata> |
updateTensorboardAsync(Tensorboard tensorboard,
com.google.protobuf.FieldMask updateMask)
Updates a Tensorboard.
|
com.google.api.gax.longrunning.OperationFuture<Tensorboard,UpdateTensorboardOperationMetadata> |
updateTensorboardAsync(UpdateTensorboardRequest request)
Updates a Tensorboard.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardRequest,com.google.longrunning.Operation> |
updateTensorboardCallable()
Updates a Tensorboard.
|
TensorboardExperiment |
updateTensorboardExperiment(TensorboardExperiment tensorboardExperiment,
com.google.protobuf.FieldMask updateMask)
Updates a TensorboardExperiment.
|
TensorboardExperiment |
updateTensorboardExperiment(UpdateTensorboardExperimentRequest request)
Updates a TensorboardExperiment.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardExperimentRequest,TensorboardExperiment> |
updateTensorboardExperimentCallable()
Updates a TensorboardExperiment.
|
com.google.api.gax.rpc.OperationCallable<UpdateTensorboardRequest,Tensorboard,UpdateTensorboardOperationMetadata> |
updateTensorboardOperationCallable()
Updates a Tensorboard.
|
TensorboardRun |
updateTensorboardRun(TensorboardRun tensorboardRun,
com.google.protobuf.FieldMask updateMask)
Updates a TensorboardRun.
|
TensorboardRun |
updateTensorboardRun(UpdateTensorboardRunRequest request)
Updates a TensorboardRun.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardRunRequest,TensorboardRun> |
updateTensorboardRunCallable()
Updates a TensorboardRun.
|
TensorboardTimeSeries |
updateTensorboardTimeSeries(TensorboardTimeSeries tensorboardTimeSeries,
com.google.protobuf.FieldMask updateMask)
Updates a TensorboardTimeSeries.
|
TensorboardTimeSeries |
updateTensorboardTimeSeries(UpdateTensorboardTimeSeriesRequest request)
Updates a TensorboardTimeSeries.
|
com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardTimeSeriesRequest,TensorboardTimeSeries> |
updateTensorboardTimeSeriesCallable()
Updates a TensorboardTimeSeries.
|
WriteTensorboardExperimentDataResponse |
writeTensorboardExperimentData(String tensorboardExperiment,
List<WriteTensorboardRunDataRequest> writeRunDataRequests)
Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's.
|
WriteTensorboardExperimentDataResponse |
writeTensorboardExperimentData(TensorboardExperimentName tensorboardExperiment,
List<WriteTensorboardRunDataRequest> writeRunDataRequests)
Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's.
|
WriteTensorboardExperimentDataResponse |
writeTensorboardExperimentData(WriteTensorboardExperimentDataRequest request)
Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's.
|
com.google.api.gax.rpc.UnaryCallable<WriteTensorboardExperimentDataRequest,WriteTensorboardExperimentDataResponse> |
writeTensorboardExperimentDataCallable()
Write time series data points of multiple TensorboardTimeSeries in multiple TensorboardRun's.
|
WriteTensorboardRunDataResponse |
writeTensorboardRunData(String tensorboardRun,
List<TimeSeriesData> timeSeriesData)
Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun.
|
WriteTensorboardRunDataResponse |
writeTensorboardRunData(TensorboardRunName tensorboardRun,
List<TimeSeriesData> timeSeriesData)
Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun.
|
WriteTensorboardRunDataResponse |
writeTensorboardRunData(WriteTensorboardRunDataRequest request)
Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun.
|
com.google.api.gax.rpc.UnaryCallable<WriteTensorboardRunDataRequest,WriteTensorboardRunDataResponse> |
writeTensorboardRunDataCallable()
Write time series data points into multiple TensorboardTimeSeries under a TensorboardRun.
|
protected TensorboardServiceClient(TensorboardServiceSettings settings) throws IOException
IOExceptionprotected TensorboardServiceClient(TensorboardServiceStub stub)
public static final TensorboardServiceClient create() throws IOException
IOExceptionpublic static final TensorboardServiceClient create(TensorboardServiceSettings settings) throws IOException
IOExceptionpublic static final TensorboardServiceClient create(TensorboardServiceStub stub)
public final TensorboardServiceSettings getSettings()
public TensorboardServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> createTensorboardAsync(TensorboardName parent, Tensorboard tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName parent = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
Tensorboard tensorboard = Tensorboard.newBuilder().build();
Tensorboard response =
tensorboardServiceClient.createTensorboardAsync(parent, tensorboard).get();
}
parent - Required. The resource name of the Location to create the Tensorboard in. Format:
`projects/{project}/locations/{location}`tensorboard - Required. The Tensorboard to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> createTensorboardAsync(String parent, Tensorboard tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
Tensorboard tensorboard = Tensorboard.newBuilder().build();
Tensorboard response =
tensorboardServiceClient.createTensorboardAsync(parent, tensorboard).get();
}
parent - Required. The resource name of the Location to create the Tensorboard in. Format:
`projects/{project}/locations/{location}`tensorboard - Required. The Tensorboard to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Tensorboard,CreateTensorboardOperationMetadata> createTensorboardAsync(CreateTensorboardRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardRequest request =
CreateTensorboardRequest.newBuilder()
.setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.setTensorboard(Tensorboard.newBuilder().build())
.build();
Tensorboard response = tensorboardServiceClient.createTensorboardAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateTensorboardRequest,Tensorboard,CreateTensorboardOperationMetadata> createTensorboardOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardRequest request =
CreateTensorboardRequest.newBuilder()
.setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.setTensorboard(Tensorboard.newBuilder().build())
.build();
OperationFuture<Tensorboard, CreateTensorboardOperationMetadata> future =
tensorboardServiceClient.createTensorboardOperationCallable().futureCall(request);
// Do something.
Tensorboard response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateTensorboardRequest,com.google.longrunning.Operation> createTensorboardCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardRequest request =
CreateTensorboardRequest.newBuilder()
.setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.setTensorboard(Tensorboard.newBuilder().build())
.build();
ApiFuture<Operation> future =
tensorboardServiceClient.createTensorboardCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final Tensorboard getTensorboard(TensorboardName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
Tensorboard response = tensorboardServiceClient.getTensorboard(name);
}
name - Required. The name of the Tensorboard resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Tensorboard getTensorboard(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
Tensorboard response = tensorboardServiceClient.getTensorboard(name);
}
name - Required. The name of the Tensorboard resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Tensorboard getTensorboard(GetTensorboardRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardRequest request =
GetTensorboardRequest.newBuilder()
.setName(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
Tensorboard response = tensorboardServiceClient.getTensorboard(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTensorboardRequest,Tensorboard> getTensorboardCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardRequest request =
GetTensorboardRequest.newBuilder()
.setName(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
ApiFuture<Tensorboard> future =
tensorboardServiceClient.getTensorboardCallable().futureCall(request);
// Do something.
Tensorboard response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Tensorboard,UpdateTensorboardOperationMetadata> updateTensorboardAsync(Tensorboard tensorboard, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
Tensorboard tensorboard = Tensorboard.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Tensorboard response =
tensorboardServiceClient.updateTensorboardAsync(tensorboard, updateMask).get();
}
tensorboard - Required. The Tensorboard's `name` field is used to identify the Tensorboard
to be updated. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}`updateMask - Required. Field mask is used to specify the fields to be overwritten in the
Tensorboard resource by the update. The fields specified in the update_mask are relative to
the resource, not the full request. A field is overwritten if it's in the mask. If the user
does not provide a mask then all fields are overwritten if new values are specified.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Tensorboard,UpdateTensorboardOperationMetadata> updateTensorboardAsync(UpdateTensorboardRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardRequest request =
UpdateTensorboardRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboard(Tensorboard.newBuilder().build())
.build();
Tensorboard response = tensorboardServiceClient.updateTensorboardAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateTensorboardRequest,Tensorboard,UpdateTensorboardOperationMetadata> updateTensorboardOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardRequest request =
UpdateTensorboardRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboard(Tensorboard.newBuilder().build())
.build();
OperationFuture<Tensorboard, UpdateTensorboardOperationMetadata> future =
tensorboardServiceClient.updateTensorboardOperationCallable().futureCall(request);
// Do something.
Tensorboard response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardRequest,com.google.longrunning.Operation> updateTensorboardCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardRequest request =
UpdateTensorboardRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboard(Tensorboard.newBuilder().build())
.build();
ApiFuture<Operation> future =
tensorboardServiceClient.updateTensorboardCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final TensorboardServiceClient.ListTensorboardsPagedResponse listTensorboards(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Tensorboard element : tensorboardServiceClient.listTensorboards(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the Location to list Tensorboards. Format:
`projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardsPagedResponse listTensorboards(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Tensorboard element : tensorboardServiceClient.listTensorboards(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the Location to list Tensorboards. Format:
`projects/{project}/locations/{location}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardsPagedResponse listTensorboards(ListTensorboardsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardsRequest request =
ListTensorboardsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
for (Tensorboard element : tensorboardServiceClient.listTensorboards(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTensorboardsRequest,TensorboardServiceClient.ListTensorboardsPagedResponse> listTensorboardsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardsRequest request =
ListTensorboardsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Tensorboard> future =
tensorboardServiceClient.listTensorboardsPagedCallable().futureCall(request);
// Do something.
for (Tensorboard element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTensorboardsRequest,ListTensorboardsResponse> listTensorboardsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardsRequest request =
ListTensorboardsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
while (true) {
ListTensorboardsResponse response =
tensorboardServiceClient.listTensorboardsCallable().call(request);
for (Tensorboard element : response.getTensorboardsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardAsync(TensorboardName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
tensorboardServiceClient.deleteTensorboardAsync(name).get();
}
name - Required. The name of the Tensorboard to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
tensorboardServiceClient.deleteTensorboardAsync(name).get();
}
name - Required. The name of the Tensorboard to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardAsync(DeleteTensorboardRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardRequest request =
DeleteTensorboardRequest.newBuilder()
.setName(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
tensorboardServiceClient.deleteTensorboardAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteTensorboardRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardRequest request =
DeleteTensorboardRequest.newBuilder()
.setName(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
tensorboardServiceClient.deleteTensorboardOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardRequest,com.google.longrunning.Operation> deleteTensorboardCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardRequest request =
DeleteTensorboardRequest.newBuilder()
.setName(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
ApiFuture<Operation> future =
tensorboardServiceClient.deleteTensorboardCallable().futureCall(request);
// Do something.
future.get();
}
public final ReadTensorboardUsageResponse readTensorboardUsage(TensorboardName tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName tensorboard = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
ReadTensorboardUsageResponse response =
tensorboardServiceClient.readTensorboardUsage(tensorboard);
}
tensorboard - Required. The name of the Tensorboard resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final ReadTensorboardUsageResponse readTensorboardUsage(String tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboard =
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
ReadTensorboardUsageResponse response =
tensorboardServiceClient.readTensorboardUsage(tensorboard);
}
tensorboard - Required. The name of the Tensorboard resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final ReadTensorboardUsageResponse readTensorboardUsage(ReadTensorboardUsageRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardUsageRequest request =
ReadTensorboardUsageRequest.newBuilder()
.setTensorboard(
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
ReadTensorboardUsageResponse response =
tensorboardServiceClient.readTensorboardUsage(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ReadTensorboardUsageRequest,ReadTensorboardUsageResponse> readTensorboardUsageCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardUsageRequest request =
ReadTensorboardUsageRequest.newBuilder()
.setTensorboard(
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
ApiFuture<ReadTensorboardUsageResponse> future =
tensorboardServiceClient.readTensorboardUsageCallable().futureCall(request);
// Do something.
ReadTensorboardUsageResponse response = future.get();
}
public final ReadTensorboardSizeResponse readTensorboardSize(TensorboardName tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName tensorboard = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
ReadTensorboardSizeResponse response =
tensorboardServiceClient.readTensorboardSize(tensorboard);
}
tensorboard - Required. The name of the Tensorboard resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final ReadTensorboardSizeResponse readTensorboardSize(String tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboard =
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
ReadTensorboardSizeResponse response =
tensorboardServiceClient.readTensorboardSize(tensorboard);
}
tensorboard - Required. The name of the Tensorboard resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final ReadTensorboardSizeResponse readTensorboardSize(ReadTensorboardSizeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardSizeRequest request =
ReadTensorboardSizeRequest.newBuilder()
.setTensorboard(
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
ReadTensorboardSizeResponse response = tensorboardServiceClient.readTensorboardSize(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ReadTensorboardSizeRequest,ReadTensorboardSizeResponse> readTensorboardSizeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardSizeRequest request =
ReadTensorboardSizeRequest.newBuilder()
.setTensorboard(
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.build();
ApiFuture<ReadTensorboardSizeResponse> future =
tensorboardServiceClient.readTensorboardSizeCallable().futureCall(request);
// Do something.
ReadTensorboardSizeResponse response = future.get();
}
public final TensorboardExperiment createTensorboardExperiment(TensorboardExperimentName parent, TensorboardExperiment tensorboardExperiment, String tensorboardExperimentId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
TensorboardExperiment tensorboardExperiment = TensorboardExperiment.newBuilder().build();
String tensorboardExperimentId = "tensorboardExperimentId1267328197";
TensorboardExperiment response =
tensorboardServiceClient.createTensorboardExperiment(
parent, tensorboardExperiment, tensorboardExperimentId);
}
parent - Required. The resource name of the Tensorboard to create the
TensorboardExperiment in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`tensorboardExperiment - The TensorboardExperiment to create.tensorboardExperimentId - Required. The ID to use for the Tensorboard experiment, which
becomes the final component of the Tensorboard experiment's resource name.
This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardExperiment createTensorboardExperiment(String parent, TensorboardExperiment tensorboardExperiment, String tensorboardExperimentId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
TensorboardExperiment tensorboardExperiment = TensorboardExperiment.newBuilder().build();
String tensorboardExperimentId = "tensorboardExperimentId1267328197";
TensorboardExperiment response =
tensorboardServiceClient.createTensorboardExperiment(
parent, tensorboardExperiment, tensorboardExperimentId);
}
parent - Required. The resource name of the Tensorboard to create the
TensorboardExperiment in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`tensorboardExperiment - The TensorboardExperiment to create.tensorboardExperimentId - Required. The ID to use for the Tensorboard experiment, which
becomes the final component of the Tensorboard experiment's resource name.
This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardExperiment createTensorboardExperiment(CreateTensorboardExperimentRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardExperimentRequest request =
CreateTensorboardExperimentRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.setTensorboardExperiment(TensorboardExperiment.newBuilder().build())
.setTensorboardExperimentId("tensorboardExperimentId1267328197")
.build();
TensorboardExperiment response =
tensorboardServiceClient.createTensorboardExperiment(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateTensorboardExperimentRequest,TensorboardExperiment> createTensorboardExperimentCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardExperimentRequest request =
CreateTensorboardExperimentRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.setTensorboardExperiment(TensorboardExperiment.newBuilder().build())
.setTensorboardExperimentId("tensorboardExperimentId1267328197")
.build();
ApiFuture<TensorboardExperiment> future =
tensorboardServiceClient.createTensorboardExperimentCallable().futureCall(request);
// Do something.
TensorboardExperiment response = future.get();
}
public final TensorboardExperiment getTensorboardExperiment(TensorboardExperimentName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName name =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
TensorboardExperiment response = tensorboardServiceClient.getTensorboardExperiment(name);
}
name - Required. The name of the TensorboardExperiment resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardExperiment getTensorboardExperiment(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
TensorboardExperiment response = tensorboardServiceClient.getTensorboardExperiment(name);
}
name - Required. The name of the TensorboardExperiment resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardExperiment getTensorboardExperiment(GetTensorboardExperimentRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardExperimentRequest request =
GetTensorboardExperimentRequest.newBuilder()
.setName(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.build();
TensorboardExperiment response = tensorboardServiceClient.getTensorboardExperiment(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTensorboardExperimentRequest,TensorboardExperiment> getTensorboardExperimentCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardExperimentRequest request =
GetTensorboardExperimentRequest.newBuilder()
.setName(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.build();
ApiFuture<TensorboardExperiment> future =
tensorboardServiceClient.getTensorboardExperimentCallable().futureCall(request);
// Do something.
TensorboardExperiment response = future.get();
}
public final TensorboardExperiment updateTensorboardExperiment(TensorboardExperiment tensorboardExperiment, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperiment tensorboardExperiment = TensorboardExperiment.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
TensorboardExperiment response =
tensorboardServiceClient.updateTensorboardExperiment(tensorboardExperiment, updateMask);
}
tensorboardExperiment - Required. The TensorboardExperiment's `name` field is used to
identify the TensorboardExperiment to be updated. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`updateMask - Required. Field mask is used to specify the fields to be overwritten in the
TensorboardExperiment resource by the update. The fields specified in the update_mask are
relative to the resource, not the full request. A field is overwritten if it's in the mask.
If the user does not provide a mask then all fields are overwritten if new values are
specified.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardExperiment updateTensorboardExperiment(UpdateTensorboardExperimentRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardExperimentRequest request =
UpdateTensorboardExperimentRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboardExperiment(TensorboardExperiment.newBuilder().build())
.build();
TensorboardExperiment response =
tensorboardServiceClient.updateTensorboardExperiment(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardExperimentRequest,TensorboardExperiment> updateTensorboardExperimentCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardExperimentRequest request =
UpdateTensorboardExperimentRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboardExperiment(TensorboardExperiment.newBuilder().build())
.build();
ApiFuture<TensorboardExperiment> future =
tensorboardServiceClient.updateTensorboardExperimentCallable().futureCall(request);
// Do something.
TensorboardExperiment response = future.get();
}
public final TensorboardServiceClient.ListTensorboardExperimentsPagedResponse listTensorboardExperiments(TensorboardName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName parent = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
for (TensorboardExperiment element :
tensorboardServiceClient.listTensorboardExperiments(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the Tensorboard to list TensorboardExperiments.
Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardExperimentsPagedResponse listTensorboardExperiments(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
for (TensorboardExperiment element :
tensorboardServiceClient.listTensorboardExperiments(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the Tensorboard to list TensorboardExperiments.
Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardExperimentsPagedResponse listTensorboardExperiments(ListTensorboardExperimentsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardExperimentsRequest request =
ListTensorboardExperimentsRequest.newBuilder()
.setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
for (TensorboardExperiment element :
tensorboardServiceClient.listTensorboardExperiments(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTensorboardExperimentsRequest,TensorboardServiceClient.ListTensorboardExperimentsPagedResponse> listTensorboardExperimentsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardExperimentsRequest request =
ListTensorboardExperimentsRequest.newBuilder()
.setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<TensorboardExperiment> future =
tensorboardServiceClient.listTensorboardExperimentsPagedCallable().futureCall(request);
// Do something.
for (TensorboardExperiment element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTensorboardExperimentsRequest,ListTensorboardExperimentsResponse> listTensorboardExperimentsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardExperimentsRequest request =
ListTensorboardExperimentsRequest.newBuilder()
.setParent(TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
while (true) {
ListTensorboardExperimentsResponse response =
tensorboardServiceClient.listTensorboardExperimentsCallable().call(request);
for (TensorboardExperiment element : response.getTensorboardExperimentsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardExperimentAsync(TensorboardExperimentName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName name =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
tensorboardServiceClient.deleteTensorboardExperimentAsync(name).get();
}
name - Required. The name of the TensorboardExperiment to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardExperimentAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
tensorboardServiceClient.deleteTensorboardExperimentAsync(name).get();
}
name - Required. The name of the TensorboardExperiment to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardExperimentAsync(DeleteTensorboardExperimentRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardExperimentRequest request =
DeleteTensorboardExperimentRequest.newBuilder()
.setName(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.build();
tensorboardServiceClient.deleteTensorboardExperimentAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteTensorboardExperimentRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardExperimentOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardExperimentRequest request =
DeleteTensorboardExperimentRequest.newBuilder()
.setName(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
tensorboardServiceClient
.deleteTensorboardExperimentOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardExperimentRequest,com.google.longrunning.Operation> deleteTensorboardExperimentCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardExperimentRequest request =
DeleteTensorboardExperimentRequest.newBuilder()
.setName(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.build();
ApiFuture<Operation> future =
tensorboardServiceClient.deleteTensorboardExperimentCallable().futureCall(request);
// Do something.
future.get();
}
public final TensorboardRun createTensorboardRun(TensorboardRunName parent, TensorboardRun tensorboardRun, String tensorboardRunId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardRunName parent =
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]");
TensorboardRun tensorboardRun = TensorboardRun.newBuilder().build();
String tensorboardRunId = "tensorboardRunId-407822631";
TensorboardRun response =
tensorboardServiceClient.createTensorboardRun(parent, tensorboardRun, tensorboardRunId);
}
parent - Required. The resource name of the TensorboardExperiment to create the
TensorboardRun in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`tensorboardRun - Required. The TensorboardRun to create.tensorboardRunId - Required. The ID to use for the Tensorboard run, which becomes the
final component of the Tensorboard run's resource name.
This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardRun createTensorboardRun(String parent, TensorboardRun tensorboardRun, String tensorboardRunId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardRunName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString();
TensorboardRun tensorboardRun = TensorboardRun.newBuilder().build();
String tensorboardRunId = "tensorboardRunId-407822631";
TensorboardRun response =
tensorboardServiceClient.createTensorboardRun(parent, tensorboardRun, tensorboardRunId);
}
parent - Required. The resource name of the TensorboardExperiment to create the
TensorboardRun in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`tensorboardRun - Required. The TensorboardRun to create.tensorboardRunId - Required. The ID to use for the Tensorboard run, which becomes the
final component of the Tensorboard run's resource name.
This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardRun createTensorboardRun(CreateTensorboardRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardRunRequest request =
CreateTensorboardRunRequest.newBuilder()
.setParent(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.setTensorboardRun(TensorboardRun.newBuilder().build())
.setTensorboardRunId("tensorboardRunId-407822631")
.build();
TensorboardRun response = tensorboardServiceClient.createTensorboardRun(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateTensorboardRunRequest,TensorboardRun> createTensorboardRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardRunRequest request =
CreateTensorboardRunRequest.newBuilder()
.setParent(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.setTensorboardRun(TensorboardRun.newBuilder().build())
.setTensorboardRunId("tensorboardRunId-407822631")
.build();
ApiFuture<TensorboardRun> future =
tensorboardServiceClient.createTensorboardRunCallable().futureCall(request);
// Do something.
TensorboardRun response = future.get();
}
public final BatchCreateTensorboardRunsResponse batchCreateTensorboardRuns(TensorboardExperimentName parent, List<CreateTensorboardRunRequest> requests)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
List<CreateTensorboardRunRequest> requests = new ArrayList<>();
BatchCreateTensorboardRunsResponse response =
tensorboardServiceClient.batchCreateTensorboardRuns(parent, requests);
}
parent - Required. The resource name of the TensorboardExperiment to create the
TensorboardRuns in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
The parent field in the CreateTensorboardRunRequest messages must match this field.requests - Required. The request message specifying the TensorboardRuns to create. A
maximum of 1000 TensorboardRuns can be created in a batch.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BatchCreateTensorboardRunsResponse batchCreateTensorboardRuns(String parent, List<CreateTensorboardRunRequest> requests)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
List<CreateTensorboardRunRequest> requests = new ArrayList<>();
BatchCreateTensorboardRunsResponse response =
tensorboardServiceClient.batchCreateTensorboardRuns(parent, requests);
}
parent - Required. The resource name of the TensorboardExperiment to create the
TensorboardRuns in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
The parent field in the CreateTensorboardRunRequest messages must match this field.requests - Required. The request message specifying the TensorboardRuns to create. A
maximum of 1000 TensorboardRuns can be created in a batch.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BatchCreateTensorboardRunsResponse batchCreateTensorboardRuns(BatchCreateTensorboardRunsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
BatchCreateTensorboardRunsRequest request =
BatchCreateTensorboardRunsRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.addAllRequests(new ArrayList<CreateTensorboardRunRequest>())
.build();
BatchCreateTensorboardRunsResponse response =
tensorboardServiceClient.batchCreateTensorboardRuns(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchCreateTensorboardRunsRequest,BatchCreateTensorboardRunsResponse> batchCreateTensorboardRunsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
BatchCreateTensorboardRunsRequest request =
BatchCreateTensorboardRunsRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.addAllRequests(new ArrayList<CreateTensorboardRunRequest>())
.build();
ApiFuture<BatchCreateTensorboardRunsResponse> future =
tensorboardServiceClient.batchCreateTensorboardRunsCallable().futureCall(request);
// Do something.
BatchCreateTensorboardRunsResponse response = future.get();
}
public final TensorboardRun getTensorboardRun(TensorboardRunName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardRunName name =
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]");
TensorboardRun response = tensorboardServiceClient.getTensorboardRun(name);
}
name - Required. The name of the TensorboardRun resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardRun getTensorboardRun(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name =
TensorboardRunName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString();
TensorboardRun response = tensorboardServiceClient.getTensorboardRun(name);
}
name - Required. The name of the TensorboardRun resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardRun getTensorboardRun(GetTensorboardRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardRunRequest request =
GetTensorboardRunRequest.newBuilder()
.setName(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.build();
TensorboardRun response = tensorboardServiceClient.getTensorboardRun(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTensorboardRunRequest,TensorboardRun> getTensorboardRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardRunRequest request =
GetTensorboardRunRequest.newBuilder()
.setName(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.build();
ApiFuture<TensorboardRun> future =
tensorboardServiceClient.getTensorboardRunCallable().futureCall(request);
// Do something.
TensorboardRun response = future.get();
}
public final TensorboardRun updateTensorboardRun(TensorboardRun tensorboardRun, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardRun tensorboardRun = TensorboardRun.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
TensorboardRun response =
tensorboardServiceClient.updateTensorboardRun(tensorboardRun, updateMask);
}
tensorboardRun - Required. The TensorboardRun's `name` field is used to identify the
TensorboardRun to be updated. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`updateMask - Required. Field mask is used to specify the fields to be overwritten in the
TensorboardRun resource by the update. The fields specified in the update_mask are relative
to the resource, not the full request. A field is overwritten if it's in the mask. If the
user does not provide a mask then all fields are overwritten if new values are specified.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardRun updateTensorboardRun(UpdateTensorboardRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardRunRequest request =
UpdateTensorboardRunRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboardRun(TensorboardRun.newBuilder().build())
.build();
TensorboardRun response = tensorboardServiceClient.updateTensorboardRun(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardRunRequest,TensorboardRun> updateTensorboardRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardRunRequest request =
UpdateTensorboardRunRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboardRun(TensorboardRun.newBuilder().build())
.build();
ApiFuture<TensorboardRun> future =
tensorboardServiceClient.updateTensorboardRunCallable().futureCall(request);
// Do something.
TensorboardRun response = future.get();
}
public final TensorboardServiceClient.ListTensorboardRunsPagedResponse listTensorboardRuns(TensorboardExperimentName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
for (TensorboardRun element :
tensorboardServiceClient.listTensorboardRuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the TensorboardExperiment to list TensorboardRuns.
Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardRunsPagedResponse listTensorboardRuns(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
for (TensorboardRun element :
tensorboardServiceClient.listTensorboardRuns(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the TensorboardExperiment to list TensorboardRuns.
Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardRunsPagedResponse listTensorboardRuns(ListTensorboardRunsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardRunsRequest request =
ListTensorboardRunsRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
for (TensorboardRun element :
tensorboardServiceClient.listTensorboardRuns(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTensorboardRunsRequest,TensorboardServiceClient.ListTensorboardRunsPagedResponse> listTensorboardRunsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardRunsRequest request =
ListTensorboardRunsRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<TensorboardRun> future =
tensorboardServiceClient.listTensorboardRunsPagedCallable().futureCall(request);
// Do something.
for (TensorboardRun element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTensorboardRunsRequest,ListTensorboardRunsResponse> listTensorboardRunsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardRunsRequest request =
ListTensorboardRunsRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
while (true) {
ListTensorboardRunsResponse response =
tensorboardServiceClient.listTensorboardRunsCallable().call(request);
for (TensorboardRun element : response.getTensorboardRunsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardRunAsync(TensorboardRunName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardRunName name =
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]");
tensorboardServiceClient.deleteTensorboardRunAsync(name).get();
}
name - Required. The name of the TensorboardRun to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardRunAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name =
TensorboardRunName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString();
tensorboardServiceClient.deleteTensorboardRunAsync(name).get();
}
name - Required. The name of the TensorboardRun to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardRunAsync(DeleteTensorboardRunRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardRunRequest request =
DeleteTensorboardRunRequest.newBuilder()
.setName(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.build();
tensorboardServiceClient.deleteTensorboardRunAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteTensorboardRunRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardRunOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardRunRequest request =
DeleteTensorboardRunRequest.newBuilder()
.setName(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
tensorboardServiceClient.deleteTensorboardRunOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardRunRequest,com.google.longrunning.Operation> deleteTensorboardRunCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardRunRequest request =
DeleteTensorboardRunRequest.newBuilder()
.setName(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.build();
ApiFuture<Operation> future =
tensorboardServiceClient.deleteTensorboardRunCallable().futureCall(request);
// Do something.
future.get();
}
public final BatchCreateTensorboardTimeSeriesResponse batchCreateTensorboardTimeSeries(TensorboardExperimentName parent, List<CreateTensorboardTimeSeriesRequest> requests)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
List<CreateTensorboardTimeSeriesRequest> requests = new ArrayList<>();
BatchCreateTensorboardTimeSeriesResponse response =
tensorboardServiceClient.batchCreateTensorboardTimeSeries(parent, requests);
}
parent - Required. The resource name of the TensorboardExperiment to create the
TensorboardTimeSeries in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
The TensorboardRuns referenced by the parent fields in the
CreateTensorboardTimeSeriesRequest messages must be sub resources of this
TensorboardExperiment.requests - Required. The request message specifying the TensorboardTimeSeries to create. A
maximum of 1000 TensorboardTimeSeries can be created in a batch.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BatchCreateTensorboardTimeSeriesResponse batchCreateTensorboardTimeSeries(String parent, List<CreateTensorboardTimeSeriesRequest> requests)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
List<CreateTensorboardTimeSeriesRequest> requests = new ArrayList<>();
BatchCreateTensorboardTimeSeriesResponse response =
tensorboardServiceClient.batchCreateTensorboardTimeSeries(parent, requests);
}
parent - Required. The resource name of the TensorboardExperiment to create the
TensorboardTimeSeries in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`
The TensorboardRuns referenced by the parent fields in the
CreateTensorboardTimeSeriesRequest messages must be sub resources of this
TensorboardExperiment.requests - Required. The request message specifying the TensorboardTimeSeries to create. A
maximum of 1000 TensorboardTimeSeries can be created in a batch.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BatchCreateTensorboardTimeSeriesResponse batchCreateTensorboardTimeSeries(BatchCreateTensorboardTimeSeriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
BatchCreateTensorboardTimeSeriesRequest request =
BatchCreateTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.addAllRequests(new ArrayList<CreateTensorboardTimeSeriesRequest>())
.build();
BatchCreateTensorboardTimeSeriesResponse response =
tensorboardServiceClient.batchCreateTensorboardTimeSeries(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchCreateTensorboardTimeSeriesRequest,BatchCreateTensorboardTimeSeriesResponse> batchCreateTensorboardTimeSeriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
BatchCreateTensorboardTimeSeriesRequest request =
BatchCreateTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.addAllRequests(new ArrayList<CreateTensorboardTimeSeriesRequest>())
.build();
ApiFuture<BatchCreateTensorboardTimeSeriesResponse> future =
tensorboardServiceClient.batchCreateTensorboardTimeSeriesCallable().futureCall(request);
// Do something.
BatchCreateTensorboardTimeSeriesResponse response = future.get();
}
public final TensorboardTimeSeries createTensorboardTimeSeries(TensorboardTimeSeriesName parent, TensorboardTimeSeries tensorboardTimeSeries)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardTimeSeriesName parent =
TensorboardTimeSeriesName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]", "[TIME_SERIES]");
TensorboardTimeSeries tensorboardTimeSeries = TensorboardTimeSeries.newBuilder().build();
TensorboardTimeSeries response =
tensorboardServiceClient.createTensorboardTimeSeries(parent, tensorboardTimeSeries);
}
parent - Required. The resource name of the TensorboardRun to create the
TensorboardTimeSeries in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`tensorboardTimeSeries - Required. The TensorboardTimeSeries to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardTimeSeries createTensorboardTimeSeries(String parent, TensorboardTimeSeries tensorboardTimeSeries)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString();
TensorboardTimeSeries tensorboardTimeSeries = TensorboardTimeSeries.newBuilder().build();
TensorboardTimeSeries response =
tensorboardServiceClient.createTensorboardTimeSeries(parent, tensorboardTimeSeries);
}
parent - Required. The resource name of the TensorboardRun to create the
TensorboardTimeSeries in. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`tensorboardTimeSeries - Required. The TensorboardTimeSeries to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardTimeSeries createTensorboardTimeSeries(CreateTensorboardTimeSeriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardTimeSeriesRequest request =
CreateTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setTensorboardTimeSeriesId("tensorboardTimeSeriesId-913380692")
.setTensorboardTimeSeries(TensorboardTimeSeries.newBuilder().build())
.build();
TensorboardTimeSeries response =
tensorboardServiceClient.createTensorboardTimeSeries(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateTensorboardTimeSeriesRequest,TensorboardTimeSeries> createTensorboardTimeSeriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
CreateTensorboardTimeSeriesRequest request =
CreateTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setTensorboardTimeSeriesId("tensorboardTimeSeriesId-913380692")
.setTensorboardTimeSeries(TensorboardTimeSeries.newBuilder().build())
.build();
ApiFuture<TensorboardTimeSeries> future =
tensorboardServiceClient.createTensorboardTimeSeriesCallable().futureCall(request);
// Do something.
TensorboardTimeSeries response = future.get();
}
public final TensorboardTimeSeries getTensorboardTimeSeries(TensorboardTimeSeriesName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardTimeSeriesName name =
TensorboardTimeSeriesName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]", "[TIME_SERIES]");
TensorboardTimeSeries response = tensorboardServiceClient.getTensorboardTimeSeries(name);
}
name - Required. The name of the TensorboardTimeSeries resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardTimeSeries getTensorboardTimeSeries(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name =
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString();
TensorboardTimeSeries response = tensorboardServiceClient.getTensorboardTimeSeries(name);
}
name - Required. The name of the TensorboardTimeSeries resource. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardTimeSeries getTensorboardTimeSeries(GetTensorboardTimeSeriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardTimeSeriesRequest request =
GetTensorboardTimeSeriesRequest.newBuilder()
.setName(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.build();
TensorboardTimeSeries response = tensorboardServiceClient.getTensorboardTimeSeries(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetTensorboardTimeSeriesRequest,TensorboardTimeSeries> getTensorboardTimeSeriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetTensorboardTimeSeriesRequest request =
GetTensorboardTimeSeriesRequest.newBuilder()
.setName(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.build();
ApiFuture<TensorboardTimeSeries> future =
tensorboardServiceClient.getTensorboardTimeSeriesCallable().futureCall(request);
// Do something.
TensorboardTimeSeries response = future.get();
}
public final TensorboardTimeSeries updateTensorboardTimeSeries(TensorboardTimeSeries tensorboardTimeSeries, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardTimeSeries tensorboardTimeSeries = TensorboardTimeSeries.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
TensorboardTimeSeries response =
tensorboardServiceClient.updateTensorboardTimeSeries(tensorboardTimeSeries, updateMask);
}
tensorboardTimeSeries - Required. The TensorboardTimeSeries' `name` field is used to
identify the TensorboardTimeSeries to be updated. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`updateMask - Required. Field mask is used to specify the fields to be overwritten in the
TensorboardTimeSeries resource by the update. The fields specified in the update_mask are
relative to the resource, not the full request. A field is overwritten if it's in the mask.
If the user does not provide a mask then all fields are overwritten if new values are
specified.com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardTimeSeries updateTensorboardTimeSeries(UpdateTensorboardTimeSeriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardTimeSeriesRequest request =
UpdateTensorboardTimeSeriesRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboardTimeSeries(TensorboardTimeSeries.newBuilder().build())
.build();
TensorboardTimeSeries response =
tensorboardServiceClient.updateTensorboardTimeSeries(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateTensorboardTimeSeriesRequest,TensorboardTimeSeries> updateTensorboardTimeSeriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
UpdateTensorboardTimeSeriesRequest request =
UpdateTensorboardTimeSeriesRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setTensorboardTimeSeries(TensorboardTimeSeries.newBuilder().build())
.build();
ApiFuture<TensorboardTimeSeries> future =
tensorboardServiceClient.updateTensorboardTimeSeriesCallable().futureCall(request);
// Do something.
TensorboardTimeSeries response = future.get();
}
public final TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse listTensorboardTimeSeries(TensorboardRunName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardRunName parent =
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]");
for (TensorboardTimeSeries element :
tensorboardServiceClient.listTensorboardTimeSeries(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the TensorboardRun to list TensorboardTimeSeries.
Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse listTensorboardTimeSeries(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String parent =
TensorboardRunName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString();
for (TensorboardTimeSeries element :
tensorboardServiceClient.listTensorboardTimeSeries(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the TensorboardRun to list TensorboardTimeSeries.
Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse listTensorboardTimeSeries(ListTensorboardTimeSeriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardTimeSeriesRequest request =
ListTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
for (TensorboardTimeSeries element :
tensorboardServiceClient.listTensorboardTimeSeries(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListTensorboardTimeSeriesRequest,TensorboardServiceClient.ListTensorboardTimeSeriesPagedResponse> listTensorboardTimeSeriesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardTimeSeriesRequest request =
ListTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<TensorboardTimeSeries> future =
tensorboardServiceClient.listTensorboardTimeSeriesPagedCallable().futureCall(request);
// Do something.
for (TensorboardTimeSeries element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListTensorboardTimeSeriesRequest,ListTensorboardTimeSeriesResponse> listTensorboardTimeSeriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListTensorboardTimeSeriesRequest request =
ListTensorboardTimeSeriesRequest.newBuilder()
.setParent(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setReadMask(FieldMask.newBuilder().build())
.build();
while (true) {
ListTensorboardTimeSeriesResponse response =
tensorboardServiceClient.listTensorboardTimeSeriesCallable().call(request);
for (TensorboardTimeSeries element : response.getTensorboardTimeSeriesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardTimeSeriesAsync(TensorboardTimeSeriesName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardTimeSeriesName name =
TensorboardTimeSeriesName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]", "[TIME_SERIES]");
tensorboardServiceClient.deleteTensorboardTimeSeriesAsync(name).get();
}
name - Required. The name of the TensorboardTimeSeries to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardTimeSeriesAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String name =
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString();
tensorboardServiceClient.deleteTensorboardTimeSeriesAsync(name).get();
}
name - Required. The name of the TensorboardTimeSeries to be deleted. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardTimeSeriesAsync(DeleteTensorboardTimeSeriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardTimeSeriesRequest request =
DeleteTensorboardTimeSeriesRequest.newBuilder()
.setName(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.build();
tensorboardServiceClient.deleteTensorboardTimeSeriesAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteTensorboardTimeSeriesRequest,com.google.protobuf.Empty,DeleteOperationMetadata> deleteTensorboardTimeSeriesOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardTimeSeriesRequest request =
DeleteTensorboardTimeSeriesRequest.newBuilder()
.setName(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
tensorboardServiceClient
.deleteTensorboardTimeSeriesOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteTensorboardTimeSeriesRequest,com.google.longrunning.Operation> deleteTensorboardTimeSeriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
DeleteTensorboardTimeSeriesRequest request =
DeleteTensorboardTimeSeriesRequest.newBuilder()
.setName(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.build();
ApiFuture<Operation> future =
tensorboardServiceClient.deleteTensorboardTimeSeriesCallable().futureCall(request);
// Do something.
future.get();
}
public final BatchReadTensorboardTimeSeriesDataResponse batchReadTensorboardTimeSeriesData(TensorboardName tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardName tensorboard = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]");
BatchReadTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.batchReadTensorboardTimeSeriesData(tensorboard);
}
tensorboard - Required. The resource name of the Tensorboard containing
TensorboardTimeSeries to read data from. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`. The
TensorboardTimeSeries referenced by
[time_series][google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataRequest.time_series]
must be sub resources of this Tensorboard.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BatchReadTensorboardTimeSeriesDataResponse batchReadTensorboardTimeSeriesData(String tensorboard)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboard =
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString();
BatchReadTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.batchReadTensorboardTimeSeriesData(tensorboard);
}
tensorboard - Required. The resource name of the Tensorboard containing
TensorboardTimeSeries to read data from. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}`. The
TensorboardTimeSeries referenced by
[time_series][google.cloud.aiplatform.v1.BatchReadTensorboardTimeSeriesDataRequest.time_series]
must be sub resources of this Tensorboard.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BatchReadTensorboardTimeSeriesDataResponse batchReadTensorboardTimeSeriesData(BatchReadTensorboardTimeSeriesDataRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
BatchReadTensorboardTimeSeriesDataRequest request =
BatchReadTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboard(
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.addAllTimeSeries(new ArrayList<String>())
.build();
BatchReadTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.batchReadTensorboardTimeSeriesData(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<BatchReadTensorboardTimeSeriesDataRequest,BatchReadTensorboardTimeSeriesDataResponse> batchReadTensorboardTimeSeriesDataCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
BatchReadTensorboardTimeSeriesDataRequest request =
BatchReadTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboard(
TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]").toString())
.addAllTimeSeries(new ArrayList<String>())
.build();
ApiFuture<BatchReadTensorboardTimeSeriesDataResponse> future =
tensorboardServiceClient.batchReadTensorboardTimeSeriesDataCallable().futureCall(request);
// Do something.
BatchReadTensorboardTimeSeriesDataResponse response = future.get();
}
public final ReadTensorboardTimeSeriesDataResponse readTensorboardTimeSeriesData(TensorboardTimeSeriesName tensorboardTimeSeries)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardTimeSeriesName tensorboardTimeSeries =
TensorboardTimeSeriesName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]", "[TIME_SERIES]");
ReadTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.readTensorboardTimeSeriesData(tensorboardTimeSeries);
}
tensorboardTimeSeries - Required. The resource name of the TensorboardTimeSeries to read
data from. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final ReadTensorboardTimeSeriesDataResponse readTensorboardTimeSeriesData(String tensorboardTimeSeries)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboardTimeSeries =
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString();
ReadTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.readTensorboardTimeSeriesData(tensorboardTimeSeries);
}
tensorboardTimeSeries - Required. The resource name of the TensorboardTimeSeries to read
data from. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final ReadTensorboardTimeSeriesDataResponse readTensorboardTimeSeriesData(ReadTensorboardTimeSeriesDataRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardTimeSeriesDataRequest request =
ReadTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboardTimeSeries(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setMaxDataPoints(724001981)
.setFilter("filter-1274492040")
.build();
ReadTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.readTensorboardTimeSeriesData(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ReadTensorboardTimeSeriesDataRequest,ReadTensorboardTimeSeriesDataResponse> readTensorboardTimeSeriesDataCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardTimeSeriesDataRequest request =
ReadTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboardTimeSeries(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setMaxDataPoints(724001981)
.setFilter("filter-1274492040")
.build();
ApiFuture<ReadTensorboardTimeSeriesDataResponse> future =
tensorboardServiceClient.readTensorboardTimeSeriesDataCallable().futureCall(request);
// Do something.
ReadTensorboardTimeSeriesDataResponse response = future.get();
}
public final com.google.api.gax.rpc.ServerStreamingCallable<ReadTensorboardBlobDataRequest,ReadTensorboardBlobDataResponse> readTensorboardBlobDataCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ReadTensorboardBlobDataRequest request =
ReadTensorboardBlobDataRequest.newBuilder()
.setTimeSeries(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.addAllBlobIds(new ArrayList<String>())
.build();
ServerStream<ReadTensorboardBlobDataResponse> stream =
tensorboardServiceClient.readTensorboardBlobDataCallable().call(request);
for (ReadTensorboardBlobDataResponse response : stream) {
// Do something when a response is received.
}
}
public final WriteTensorboardExperimentDataResponse writeTensorboardExperimentData(TensorboardExperimentName tensorboardExperiment, List<WriteTensorboardRunDataRequest> writeRunDataRequests)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardExperimentName tensorboardExperiment =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]");
List<WriteTensorboardRunDataRequest> writeRunDataRequests = new ArrayList<>();
WriteTensorboardExperimentDataResponse response =
tensorboardServiceClient.writeTensorboardExperimentData(
tensorboardExperiment, writeRunDataRequests);
}
tensorboardExperiment - Required. The resource name of the TensorboardExperiment to write
data to. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`writeRunDataRequests - Required. Requests containing per-run TensorboardTimeSeries data to
write.com.google.api.gax.rpc.ApiException - if the remote call failspublic final WriteTensorboardExperimentDataResponse writeTensorboardExperimentData(String tensorboardExperiment, List<WriteTensorboardRunDataRequest> writeRunDataRequests)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboardExperiment =
TensorboardExperimentName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString();
List<WriteTensorboardRunDataRequest> writeRunDataRequests = new ArrayList<>();
WriteTensorboardExperimentDataResponse response =
tensorboardServiceClient.writeTensorboardExperimentData(
tensorboardExperiment, writeRunDataRequests);
}
tensorboardExperiment - Required. The resource name of the TensorboardExperiment to write
data to. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}`writeRunDataRequests - Required. Requests containing per-run TensorboardTimeSeries data to
write.com.google.api.gax.rpc.ApiException - if the remote call failspublic final WriteTensorboardExperimentDataResponse writeTensorboardExperimentData(WriteTensorboardExperimentDataRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
WriteTensorboardExperimentDataRequest request =
WriteTensorboardExperimentDataRequest.newBuilder()
.setTensorboardExperiment(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.addAllWriteRunDataRequests(new ArrayList<WriteTensorboardRunDataRequest>())
.build();
WriteTensorboardExperimentDataResponse response =
tensorboardServiceClient.writeTensorboardExperimentData(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<WriteTensorboardExperimentDataRequest,WriteTensorboardExperimentDataResponse> writeTensorboardExperimentDataCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
WriteTensorboardExperimentDataRequest request =
WriteTensorboardExperimentDataRequest.newBuilder()
.setTensorboardExperiment(
TensorboardExperimentName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]")
.toString())
.addAllWriteRunDataRequests(new ArrayList<WriteTensorboardRunDataRequest>())
.build();
ApiFuture<WriteTensorboardExperimentDataResponse> future =
tensorboardServiceClient.writeTensorboardExperimentDataCallable().futureCall(request);
// Do something.
WriteTensorboardExperimentDataResponse response = future.get();
}
public final WriteTensorboardRunDataResponse writeTensorboardRunData(TensorboardRunName tensorboardRun, List<TimeSeriesData> timeSeriesData)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardRunName tensorboardRun =
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]");
List<TimeSeriesData> timeSeriesData = new ArrayList<>();
WriteTensorboardRunDataResponse response =
tensorboardServiceClient.writeTensorboardRunData(tensorboardRun, timeSeriesData);
}
tensorboardRun - Required. The resource name of the TensorboardRun to write data to.
Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`timeSeriesData - Required. The TensorboardTimeSeries data to write. Values with in a time
series are indexed by their step value. Repeated writes to the same step will overwrite the
existing value for that step. The upper limit of data points per write request is 5000.com.google.api.gax.rpc.ApiException - if the remote call failspublic final WriteTensorboardRunDataResponse writeTensorboardRunData(String tensorboardRun, List<TimeSeriesData> timeSeriesData)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboardRun =
TensorboardRunName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString();
List<TimeSeriesData> timeSeriesData = new ArrayList<>();
WriteTensorboardRunDataResponse response =
tensorboardServiceClient.writeTensorboardRunData(tensorboardRun, timeSeriesData);
}
tensorboardRun - Required. The resource name of the TensorboardRun to write data to.
Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}`timeSeriesData - Required. The TensorboardTimeSeries data to write. Values with in a time
series are indexed by their step value. Repeated writes to the same step will overwrite the
existing value for that step. The upper limit of data points per write request is 5000.com.google.api.gax.rpc.ApiException - if the remote call failspublic final WriteTensorboardRunDataResponse writeTensorboardRunData(WriteTensorboardRunDataRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
WriteTensorboardRunDataRequest request =
WriteTensorboardRunDataRequest.newBuilder()
.setTensorboardRun(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.addAllTimeSeriesData(new ArrayList<TimeSeriesData>())
.build();
WriteTensorboardRunDataResponse response =
tensorboardServiceClient.writeTensorboardRunData(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<WriteTensorboardRunDataRequest,WriteTensorboardRunDataResponse> writeTensorboardRunDataCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
WriteTensorboardRunDataRequest request =
WriteTensorboardRunDataRequest.newBuilder()
.setTensorboardRun(
TensorboardRunName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]")
.toString())
.addAllTimeSeriesData(new ArrayList<TimeSeriesData>())
.build();
ApiFuture<WriteTensorboardRunDataResponse> future =
tensorboardServiceClient.writeTensorboardRunDataCallable().futureCall(request);
// Do something.
WriteTensorboardRunDataResponse response = future.get();
}
public final TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse exportTensorboardTimeSeriesData(TensorboardTimeSeriesName tensorboardTimeSeries)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TensorboardTimeSeriesName tensorboardTimeSeries =
TensorboardTimeSeriesName.of(
"[PROJECT]", "[LOCATION]", "[TENSORBOARD]", "[EXPERIMENT]", "[RUN]", "[TIME_SERIES]");
for (TimeSeriesDataPoint element :
tensorboardServiceClient
.exportTensorboardTimeSeriesData(tensorboardTimeSeries)
.iterateAll()) {
// doThingsWith(element);
}
}
tensorboardTimeSeries - Required. The resource name of the TensorboardTimeSeries to export
data from. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse exportTensorboardTimeSeriesData(String tensorboardTimeSeries)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
String tensorboardTimeSeries =
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString();
for (TimeSeriesDataPoint element :
tensorboardServiceClient
.exportTensorboardTimeSeriesData(tensorboardTimeSeries)
.iterateAll()) {
// doThingsWith(element);
}
}
tensorboardTimeSeries - Required. The resource name of the TensorboardTimeSeries to export
data from. Format:
`projects/{project}/locations/{location}/tensorboards/{tensorboard}/experiments/{experiment}/runs/{run}/timeSeries/{time_series}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse exportTensorboardTimeSeriesData(ExportTensorboardTimeSeriesDataRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ExportTensorboardTimeSeriesDataRequest request =
ExportTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboardTimeSeries(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
for (TimeSeriesDataPoint element :
tensorboardServiceClient.exportTensorboardTimeSeriesData(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ExportTensorboardTimeSeriesDataRequest,TensorboardServiceClient.ExportTensorboardTimeSeriesDataPagedResponse> exportTensorboardTimeSeriesDataPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ExportTensorboardTimeSeriesDataRequest request =
ExportTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboardTimeSeries(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<TimeSeriesDataPoint> future =
tensorboardServiceClient
.exportTensorboardTimeSeriesDataPagedCallable()
.futureCall(request);
// Do something.
for (TimeSeriesDataPoint element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ExportTensorboardTimeSeriesDataRequest,ExportTensorboardTimeSeriesDataResponse> exportTensorboardTimeSeriesDataCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ExportTensorboardTimeSeriesDataRequest request =
ExportTensorboardTimeSeriesDataRequest.newBuilder()
.setTensorboardTimeSeries(
TensorboardTimeSeriesName.of(
"[PROJECT]",
"[LOCATION]",
"[TENSORBOARD]",
"[EXPERIMENT]",
"[RUN]",
"[TIME_SERIES]")
.toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ExportTensorboardTimeSeriesDataResponse response =
tensorboardServiceClient.exportTensorboardTimeSeriesDataCallable().call(request);
for (TimeSeriesDataPoint element : response.getTimeSeriesDataPointsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final TensorboardServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : tensorboardServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,TensorboardServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
tensorboardServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
tensorboardServiceClient.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;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = tensorboardServiceClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
tensorboardServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = tensorboardServiceClient.setIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
tensorboardServiceClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = tensorboardServiceClient.getIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
tensorboardServiceClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = tensorboardServiceClient.testIamPermissions(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
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 (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EndpointName.ofProjectLocationEndpointName(
"[PROJECT]", "[LOCATION]", "[ENDPOINT]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
tensorboardServiceClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.