1 /* 2 * Copyright 2022 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * A client to Vertex AI API 19 * 20 * <p>The interfaces provided are listed below, along with usage samples. 21 * 22 * <p>======================= DatasetServiceClient ======================= 23 * 24 * <p>Service Description: The service that handles the CRUD of Vertex AI Dataset and its child 25 * resources. 26 * 27 * <p>Sample for DatasetServiceClient: 28 * 29 * <pre>{@code 30 * // This snippet has been automatically generated and should be regarded as a code template only. 31 * // It will require modifications to work: 32 * // - It may require correct/in-range values for request initialization. 33 * // - It may require specifying regional endpoints when creating the service client as shown in 34 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 35 * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { 36 * DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); 37 * Dataset response = datasetServiceClient.getDataset(name); 38 * } 39 * }</pre> 40 * 41 * <p>======================= EndpointServiceClient ======================= 42 * 43 * <p>Service Description: A service for managing Vertex AI's Endpoints. 44 * 45 * <p>Sample for EndpointServiceClient: 46 * 47 * <pre>{@code 48 * // This snippet has been automatically generated and should be regarded as a code template only. 49 * // It will require modifications to work: 50 * // - It may require correct/in-range values for request initialization. 51 * // - It may require specifying regional endpoints when creating the service client as shown in 52 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 53 * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) { 54 * EndpointName name = 55 * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); 56 * Endpoint response = endpointServiceClient.getEndpoint(name); 57 * } 58 * }</pre> 59 * 60 * <p>======================= FeaturestoreOnlineServingServiceClient ======================= 61 * 62 * <p>Service Description: A service for serving online feature values. 63 * 64 * <p>Sample for FeaturestoreOnlineServingServiceClient: 65 * 66 * <pre>{@code 67 * // This snippet has been automatically generated and should be regarded as a code template only. 68 * // It will require modifications to work: 69 * // - It may require correct/in-range values for request initialization. 70 * // - It may require specifying regional endpoints when creating the service client as shown in 71 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 72 * try (FeaturestoreOnlineServingServiceClient featurestoreOnlineServingServiceClient = 73 * FeaturestoreOnlineServingServiceClient.create()) { 74 * EntityTypeName entityType = 75 * EntityTypeName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]", "[ENTITY_TYPE]"); 76 * ReadFeatureValuesResponse response = 77 * featurestoreOnlineServingServiceClient.readFeatureValues(entityType); 78 * } 79 * }</pre> 80 * 81 * <p>======================= FeaturestoreServiceClient ======================= 82 * 83 * <p>Service Description: The service that handles CRUD and List for resources for Featurestore. 84 * 85 * <p>Sample for FeaturestoreServiceClient: 86 * 87 * <pre>{@code 88 * // This snippet has been automatically generated and should be regarded as a code template only. 89 * // It will require modifications to work: 90 * // - It may require correct/in-range values for request initialization. 91 * // - It may require specifying regional endpoints when creating the service client as shown in 92 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 93 * try (FeaturestoreServiceClient featurestoreServiceClient = FeaturestoreServiceClient.create()) { 94 * FeaturestoreName name = FeaturestoreName.of("[PROJECT]", "[LOCATION]", "[FEATURESTORE]"); 95 * Featurestore response = featurestoreServiceClient.getFeaturestore(name); 96 * } 97 * }</pre> 98 * 99 * <p>======================= IndexEndpointServiceClient ======================= 100 * 101 * <p>Service Description: A service for managing Vertex AI's IndexEndpoints. 102 * 103 * <p>Sample for IndexEndpointServiceClient: 104 * 105 * <pre>{@code 106 * // This snippet has been automatically generated and should be regarded as a code template only. 107 * // It will require modifications to work: 108 * // - It may require correct/in-range values for request initialization. 109 * // - It may require specifying regional endpoints when creating the service client as shown in 110 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 111 * try (IndexEndpointServiceClient indexEndpointServiceClient = 112 * IndexEndpointServiceClient.create()) { 113 * IndexEndpointName name = IndexEndpointName.of("[PROJECT]", "[LOCATION]", "[INDEX_ENDPOINT]"); 114 * IndexEndpoint response = indexEndpointServiceClient.getIndexEndpoint(name); 115 * } 116 * }</pre> 117 * 118 * <p>======================= IndexServiceClient ======================= 119 * 120 * <p>Service Description: A service for creating and managing Vertex AI's Index resources. 121 * 122 * <p>Sample for IndexServiceClient: 123 * 124 * <pre>{@code 125 * // This snippet has been automatically generated and should be regarded as a code template only. 126 * // It will require modifications to work: 127 * // - It may require correct/in-range values for request initialization. 128 * // - It may require specifying regional endpoints when creating the service client as shown in 129 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 130 * try (IndexServiceClient indexServiceClient = IndexServiceClient.create()) { 131 * IndexName name = IndexName.of("[PROJECT]", "[LOCATION]", "[INDEX]"); 132 * Index response = indexServiceClient.getIndex(name); 133 * } 134 * }</pre> 135 * 136 * <p>======================= JobServiceClient ======================= 137 * 138 * <p>Service Description: A service for creating and managing Vertex AI's jobs. 139 * 140 * <p>Sample for JobServiceClient: 141 * 142 * <pre>{@code 143 * // This snippet has been automatically generated and should be regarded as a code template only. 144 * // It will require modifications to work: 145 * // - It may require correct/in-range values for request initialization. 146 * // - It may require specifying regional endpoints when creating the service client as shown in 147 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 148 * try (JobServiceClient jobServiceClient = JobServiceClient.create()) { 149 * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); 150 * CustomJob customJob = CustomJob.newBuilder().build(); 151 * CustomJob response = jobServiceClient.createCustomJob(parent, customJob); 152 * } 153 * }</pre> 154 * 155 * <p>======================= MetadataServiceClient ======================= 156 * 157 * <p>Service Description: Service for reading and writing metadata entries. 158 * 159 * <p>Sample for MetadataServiceClient: 160 * 161 * <pre>{@code 162 * // This snippet has been automatically generated and should be regarded as a code template only. 163 * // It will require modifications to work: 164 * // - It may require correct/in-range values for request initialization. 165 * // - It may require specifying regional endpoints when creating the service client as shown in 166 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 167 * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) { 168 * MetadataStoreName name = MetadataStoreName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]"); 169 * MetadataStore response = metadataServiceClient.getMetadataStore(name); 170 * } 171 * }</pre> 172 * 173 * <p>======================= MigrationServiceClient ======================= 174 * 175 * <p>Service Description: A service that migrates resources from automl.googleapis.com, 176 * datalabeling.googleapis.com and ml.googleapis.com to Vertex AI. 177 * 178 * <p>Sample for MigrationServiceClient: 179 * 180 * <pre>{@code 181 * // This snippet has been automatically generated and should be regarded as a code template only. 182 * // It will require modifications to work: 183 * // - It may require correct/in-range values for request initialization. 184 * // - It may require specifying regional endpoints when creating the service client as shown in 185 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 186 * try (MigrationServiceClient migrationServiceClient = MigrationServiceClient.create()) { 187 * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); 188 * Location response = migrationServiceClient.getLocation(request); 189 * } 190 * }</pre> 191 * 192 * <p>======================= ModelServiceClient ======================= 193 * 194 * <p>Service Description: A service for managing Vertex AI's machine learning Models. 195 * 196 * <p>Sample for ModelServiceClient: 197 * 198 * <pre>{@code 199 * // This snippet has been automatically generated and should be regarded as a code template only. 200 * // It will require modifications to work: 201 * // - It may require correct/in-range values for request initialization. 202 * // - It may require specifying regional endpoints when creating the service client as shown in 203 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 204 * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) { 205 * ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); 206 * Model response = modelServiceClient.getModel(name); 207 * } 208 * }</pre> 209 * 210 * <p>======================= PipelineServiceClient ======================= 211 * 212 * <p>Service Description: A service for creating and managing Vertex AI's pipelines. This includes 213 * both `TrainingPipeline` resources (used for AutoML and custom training) and `PipelineJob` 214 * resources (used for Vertex AI Pipelines). 215 * 216 * <p>Sample for PipelineServiceClient: 217 * 218 * <pre>{@code 219 * // This snippet has been automatically generated and should be regarded as a code template only. 220 * // It will require modifications to work: 221 * // - It may require correct/in-range values for request initialization. 222 * // - It may require specifying regional endpoints when creating the service client as shown in 223 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 224 * try (PipelineServiceClient pipelineServiceClient = PipelineServiceClient.create()) { 225 * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); 226 * TrainingPipeline trainingPipeline = TrainingPipeline.newBuilder().build(); 227 * TrainingPipeline response = 228 * pipelineServiceClient.createTrainingPipeline(parent, trainingPipeline); 229 * } 230 * }</pre> 231 * 232 * <p>======================= PredictionServiceClient ======================= 233 * 234 * <p>Service Description: A service for online predictions and explanations. 235 * 236 * <p>Sample for PredictionServiceClient: 237 * 238 * <pre>{@code 239 * // This snippet has been automatically generated and should be regarded as a code template only. 240 * // It will require modifications to work: 241 * // - It may require correct/in-range values for request initialization. 242 * // - It may require specifying regional endpoints when creating the service client as shown in 243 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 244 * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) { 245 * EndpointName endpoint = 246 * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]"); 247 * List<Value> instances = new ArrayList<>(); 248 * Value parameters = Value.newBuilder().setBoolValue(true).build(); 249 * PredictResponse response = predictionServiceClient.predict(endpoint, instances, parameters); 250 * } 251 * }</pre> 252 * 253 * <p>======================= SpecialistPoolServiceClient ======================= 254 * 255 * <p>Service Description: A service for creating and managing Customer SpecialistPools. When 256 * customers start Data Labeling jobs, they can reuse/create Specialist Pools to bring their own 257 * Specialists to label the data. Customers can add/remove Managers for the Specialist Pool on Cloud 258 * console, then Managers will get email notifications to manage Specialists and tasks on 259 * CrowdCompute console. 260 * 261 * <p>Sample for SpecialistPoolServiceClient: 262 * 263 * <pre>{@code 264 * // This snippet has been automatically generated and should be regarded as a code template only. 265 * // It will require modifications to work: 266 * // - It may require correct/in-range values for request initialization. 267 * // - It may require specifying regional endpoints when creating the service client as shown in 268 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 269 * try (SpecialistPoolServiceClient specialistPoolServiceClient = 270 * SpecialistPoolServiceClient.create()) { 271 * SpecialistPoolName name = 272 * SpecialistPoolName.of("[PROJECT]", "[LOCATION]", "[SPECIALIST_POOL]"); 273 * SpecialistPool response = specialistPoolServiceClient.getSpecialistPool(name); 274 * } 275 * }</pre> 276 * 277 * <p>======================= TensorboardServiceClient ======================= 278 * 279 * <p>Service Description: TensorboardService 280 * 281 * <p>Sample for TensorboardServiceClient: 282 * 283 * <pre>{@code 284 * // This snippet has been automatically generated and should be regarded as a code template only. 285 * // It will require modifications to work: 286 * // - It may require correct/in-range values for request initialization. 287 * // - It may require specifying regional endpoints when creating the service client as shown in 288 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 289 * try (TensorboardServiceClient tensorboardServiceClient = TensorboardServiceClient.create()) { 290 * TensorboardName name = TensorboardName.of("[PROJECT]", "[LOCATION]", "[TENSORBOARD]"); 291 * Tensorboard response = tensorboardServiceClient.getTensorboard(name); 292 * } 293 * }</pre> 294 * 295 * <p>======================= VizierServiceClient ======================= 296 * 297 * <p>Service Description: Vertex AI Vizier API. 298 * 299 * <p>Vertex AI Vizier is a service to solve blackbox optimization problems, such as tuning machine 300 * learning hyperparameters and searching over deep learning architectures. 301 * 302 * <p>Sample for VizierServiceClient: 303 * 304 * <pre>{@code 305 * // This snippet has been automatically generated and should be regarded as a code template only. 306 * // It will require modifications to work: 307 * // - It may require correct/in-range values for request initialization. 308 * // - It may require specifying regional endpoints when creating the service client as shown in 309 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 310 * try (VizierServiceClient vizierServiceClient = VizierServiceClient.create()) { 311 * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); 312 * Study study = Study.newBuilder().build(); 313 * Study response = vizierServiceClient.createStudy(parent, study); 314 * } 315 * }</pre> 316 */ 317 @Generated("by gapic-generator-java") 318 package com.google.cloud.aiplatform.v1; 319 320 import javax.annotation.Generated; 321