Skip navigation links

@Generated(value="by gapic-generator-java")

Package com.google.cloud.visionai.v1

A client to Vision AI API The interfaces provided are listed below, along with usage samples.

See: Description

Package com.google.cloud.visionai.v1 Description

A client to Vision AI API

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);
 }
 
Skip navigation links

Copyright © 2025 Google LLC. All rights reserved.