Package com.google.cloud.visionai.v1
The interfaces provided are listed below, along with usage samples.
======================= HealthCheckServiceClient =======================
Service Description: HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.
Sample for HealthCheckServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (HealthCheckServiceClient healthCheckServiceClient = HealthCheckServiceClient.create()) {
HealthCheckRequest request =
HealthCheckRequest.newBuilder()
.setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
.build();
HealthCheckResponse response = healthCheckServiceClient.healthCheck(request);
}
======================= LiveVideoAnalyticsClient =======================
Service Description: Service describing handlers for resources. The service enables clients to run Live Video Analytics (LVA) on the streaming inputs.
Sample for LiveVideoAnalyticsClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LiveVideoAnalyticsClient liveVideoAnalyticsClient = LiveVideoAnalyticsClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
List<OperatorQuery> queries = new ArrayList<>();
ResolveOperatorInfoResponse response =
liveVideoAnalyticsClient.resolveOperatorInfo(parent, queries);
}
======================= AppPlatformClient =======================
Service Description: Service describing handlers for resources
Sample for AppPlatformClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AppPlatformClient appPlatformClient = AppPlatformClient.create()) {
ApplicationName name = ApplicationName.of("[PROJECT]", "[LOCATION]", "[APPLICATION]");
Application response = appPlatformClient.getApplication(name);
}
======================= StreamingServiceClient =======================
Service Description: Streaming service for receiving and sending packets.
Sample for StreamingServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (StreamingServiceClient streamingServiceClient = StreamingServiceClient.create()) {
AcquireLeaseRequest request =
AcquireLeaseRequest.newBuilder()
.setSeries("series-905838985")
.setOwner("owner106164915")
.setTerm(Duration.newBuilder().build())
.setLeaseType(LeaseType.forNumber(0))
.build();
Lease response = streamingServiceClient.acquireLease(request);
}
======================= StreamsServiceClient =======================
Service Description: Service describing handlers for resources. Vision API and Vision AI API are two independent APIs developed by the same team. Vision API is for people to annotate their image while Vision AI is an e2e solution for customer to build their own computer vision application.
Sample for StreamsServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (StreamsServiceClient streamsServiceClient = StreamsServiceClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
Cluster response = streamsServiceClient.getCluster(name);
}
======================= WarehouseClient =======================
Service Description: Service that manages media content + metadata for streaming.
Sample for WarehouseClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (WarehouseClient warehouseClient = WarehouseClient.create()) {
CorpusName parent = CorpusName.of("[PROJECT_NUMBER]", "[LOCATION]", "[CORPUS]");
Asset asset = Asset.newBuilder().build();
String assetId = "assetId-704776149";
Asset response = warehouseClient.createAsset(parent, asset, assetId);
}
-
ClassesClassDescriptionService Description: Service describing handlers for resourcesSettings class to configure an instance of
AppPlatformClient.Builder for AppPlatformSettings.Service Description: HealthCheckService provides an interface for Vertex AI Vision Cluster Health Check.Settings class to configure an instance ofHealthCheckServiceClient.Builder for HealthCheckServiceSettings.Service Description: Service describing handlers for resources.Settings class to configure an instance ofLiveVideoAnalyticsClient.Builder for LiveVideoAnalyticsSettings.Service Description: Streaming service for receiving and sending packets.Settings class to configure an instance ofStreamingServiceClient.Builder for StreamingServiceSettings.Service Description: Service describing handlers for resources.Settings class to configure an instance ofStreamsServiceClient.Builder for StreamsServiceSettings.Service Description: Service that manages media content + metadata for streaming.Settings class to configure an instance ofWarehouseClient.Builder for WarehouseSettings.