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 package com.google.cloud.aiplatform.v1; 18 19 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListBatchPredictionJobsPagedResponse; 20 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListCustomJobsPagedResponse; 21 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListDataLabelingJobsPagedResponse; 22 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; 23 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListLocationsPagedResponse; 24 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; 25 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasJobsPagedResponse; 26 import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasTrialDetailsPagedResponse; 27 import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; 28 29 import com.google.api.core.ApiFunction; 30 import com.google.api.core.BetaApi; 31 import com.google.api.gax.core.GoogleCredentialsProvider; 32 import com.google.api.gax.core.InstantiatingExecutorProvider; 33 import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; 34 import com.google.api.gax.rpc.ApiClientHeaderProvider; 35 import com.google.api.gax.rpc.ClientContext; 36 import com.google.api.gax.rpc.ClientSettings; 37 import com.google.api.gax.rpc.OperationCallSettings; 38 import com.google.api.gax.rpc.PagedCallSettings; 39 import com.google.api.gax.rpc.TransportChannelProvider; 40 import com.google.api.gax.rpc.UnaryCallSettings; 41 import com.google.cloud.aiplatform.v1.stub.JobServiceStubSettings; 42 import com.google.cloud.location.GetLocationRequest; 43 import com.google.cloud.location.ListLocationsRequest; 44 import com.google.cloud.location.ListLocationsResponse; 45 import com.google.cloud.location.Location; 46 import com.google.iam.v1.GetIamPolicyRequest; 47 import com.google.iam.v1.Policy; 48 import com.google.iam.v1.SetIamPolicyRequest; 49 import com.google.iam.v1.TestIamPermissionsRequest; 50 import com.google.iam.v1.TestIamPermissionsResponse; 51 import com.google.longrunning.Operation; 52 import com.google.protobuf.Empty; 53 import java.io.IOException; 54 import java.util.List; 55 import javax.annotation.Generated; 56 57 // AUTO-GENERATED DOCUMENTATION AND CLASS. 58 /** 59 * Settings class to configure an instance of {@link JobServiceClient}. 60 * 61 * <p>The default instance has everything set to sensible defaults: 62 * 63 * <ul> 64 * <li>The default service address (aiplatform.googleapis.com) and default port (443) are used. 65 * <li>Credentials are acquired automatically through Application Default Credentials. 66 * <li>Retries are configured for idempotent methods but not for non-idempotent methods. 67 * </ul> 68 * 69 * <p>The builder of this class is recursive, so contained classes are themselves builders. When 70 * build() is called, the tree of builders is called to create the complete settings object. 71 * 72 * <p>For example, to set the total timeout of createCustomJob to 30 seconds: 73 * 74 * <pre>{@code 75 * // This snippet has been automatically generated and should be regarded as a code template only. 76 * // It will require modifications to work: 77 * // - It may require correct/in-range values for request initialization. 78 * // - It may require specifying regional endpoints when creating the service client as shown in 79 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 80 * JobServiceSettings.Builder jobServiceSettingsBuilder = JobServiceSettings.newBuilder(); 81 * jobServiceSettingsBuilder 82 * .createCustomJobSettings() 83 * .setRetrySettings( 84 * jobServiceSettingsBuilder 85 * .createCustomJobSettings() 86 * .getRetrySettings() 87 * .toBuilder() 88 * .setTotalTimeout(Duration.ofSeconds(30)) 89 * .build()); 90 * JobServiceSettings jobServiceSettings = jobServiceSettingsBuilder.build(); 91 * }</pre> 92 */ 93 @Generated("by gapic-generator-java") 94 public class JobServiceSettings extends ClientSettings<JobServiceSettings> { 95 96 /** Returns the object with the settings used for calls to createCustomJob. */ createCustomJobSettings()97 public UnaryCallSettings<CreateCustomJobRequest, CustomJob> createCustomJobSettings() { 98 return ((JobServiceStubSettings) getStubSettings()).createCustomJobSettings(); 99 } 100 101 /** Returns the object with the settings used for calls to getCustomJob. */ getCustomJobSettings()102 public UnaryCallSettings<GetCustomJobRequest, CustomJob> getCustomJobSettings() { 103 return ((JobServiceStubSettings) getStubSettings()).getCustomJobSettings(); 104 } 105 106 /** Returns the object with the settings used for calls to listCustomJobs. */ 107 public PagedCallSettings< 108 ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> listCustomJobsSettings()109 listCustomJobsSettings() { 110 return ((JobServiceStubSettings) getStubSettings()).listCustomJobsSettings(); 111 } 112 113 /** Returns the object with the settings used for calls to deleteCustomJob. */ deleteCustomJobSettings()114 public UnaryCallSettings<DeleteCustomJobRequest, Operation> deleteCustomJobSettings() { 115 return ((JobServiceStubSettings) getStubSettings()).deleteCustomJobSettings(); 116 } 117 118 /** Returns the object with the settings used for calls to deleteCustomJob. */ 119 public OperationCallSettings<DeleteCustomJobRequest, Empty, DeleteOperationMetadata> deleteCustomJobOperationSettings()120 deleteCustomJobOperationSettings() { 121 return ((JobServiceStubSettings) getStubSettings()).deleteCustomJobOperationSettings(); 122 } 123 124 /** Returns the object with the settings used for calls to cancelCustomJob. */ cancelCustomJobSettings()125 public UnaryCallSettings<CancelCustomJobRequest, Empty> cancelCustomJobSettings() { 126 return ((JobServiceStubSettings) getStubSettings()).cancelCustomJobSettings(); 127 } 128 129 /** Returns the object with the settings used for calls to createDataLabelingJob. */ 130 public UnaryCallSettings<CreateDataLabelingJobRequest, DataLabelingJob> createDataLabelingJobSettings()131 createDataLabelingJobSettings() { 132 return ((JobServiceStubSettings) getStubSettings()).createDataLabelingJobSettings(); 133 } 134 135 /** Returns the object with the settings used for calls to getDataLabelingJob. */ 136 public UnaryCallSettings<GetDataLabelingJobRequest, DataLabelingJob> getDataLabelingJobSettings()137 getDataLabelingJobSettings() { 138 return ((JobServiceStubSettings) getStubSettings()).getDataLabelingJobSettings(); 139 } 140 141 /** Returns the object with the settings used for calls to listDataLabelingJobs. */ 142 public PagedCallSettings< 143 ListDataLabelingJobsRequest, 144 ListDataLabelingJobsResponse, 145 ListDataLabelingJobsPagedResponse> listDataLabelingJobsSettings()146 listDataLabelingJobsSettings() { 147 return ((JobServiceStubSettings) getStubSettings()).listDataLabelingJobsSettings(); 148 } 149 150 /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ 151 public UnaryCallSettings<DeleteDataLabelingJobRequest, Operation> deleteDataLabelingJobSettings()152 deleteDataLabelingJobSettings() { 153 return ((JobServiceStubSettings) getStubSettings()).deleteDataLabelingJobSettings(); 154 } 155 156 /** Returns the object with the settings used for calls to deleteDataLabelingJob. */ 157 public OperationCallSettings<DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata> deleteDataLabelingJobOperationSettings()158 deleteDataLabelingJobOperationSettings() { 159 return ((JobServiceStubSettings) getStubSettings()).deleteDataLabelingJobOperationSettings(); 160 } 161 162 /** Returns the object with the settings used for calls to cancelDataLabelingJob. */ cancelDataLabelingJobSettings()163 public UnaryCallSettings<CancelDataLabelingJobRequest, Empty> cancelDataLabelingJobSettings() { 164 return ((JobServiceStubSettings) getStubSettings()).cancelDataLabelingJobSettings(); 165 } 166 167 /** Returns the object with the settings used for calls to createHyperparameterTuningJob. */ 168 public UnaryCallSettings<CreateHyperparameterTuningJobRequest, HyperparameterTuningJob> createHyperparameterTuningJobSettings()169 createHyperparameterTuningJobSettings() { 170 return ((JobServiceStubSettings) getStubSettings()).createHyperparameterTuningJobSettings(); 171 } 172 173 /** Returns the object with the settings used for calls to getHyperparameterTuningJob. */ 174 public UnaryCallSettings<GetHyperparameterTuningJobRequest, HyperparameterTuningJob> getHyperparameterTuningJobSettings()175 getHyperparameterTuningJobSettings() { 176 return ((JobServiceStubSettings) getStubSettings()).getHyperparameterTuningJobSettings(); 177 } 178 179 /** Returns the object with the settings used for calls to listHyperparameterTuningJobs. */ 180 public PagedCallSettings< 181 ListHyperparameterTuningJobsRequest, 182 ListHyperparameterTuningJobsResponse, 183 ListHyperparameterTuningJobsPagedResponse> listHyperparameterTuningJobsSettings()184 listHyperparameterTuningJobsSettings() { 185 return ((JobServiceStubSettings) getStubSettings()).listHyperparameterTuningJobsSettings(); 186 } 187 188 /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ 189 public UnaryCallSettings<DeleteHyperparameterTuningJobRequest, Operation> deleteHyperparameterTuningJobSettings()190 deleteHyperparameterTuningJobSettings() { 191 return ((JobServiceStubSettings) getStubSettings()).deleteHyperparameterTuningJobSettings(); 192 } 193 194 /** Returns the object with the settings used for calls to deleteHyperparameterTuningJob. */ 195 public OperationCallSettings<DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobOperationSettings()196 deleteHyperparameterTuningJobOperationSettings() { 197 return ((JobServiceStubSettings) getStubSettings()) 198 .deleteHyperparameterTuningJobOperationSettings(); 199 } 200 201 /** Returns the object with the settings used for calls to cancelHyperparameterTuningJob. */ 202 public UnaryCallSettings<CancelHyperparameterTuningJobRequest, Empty> cancelHyperparameterTuningJobSettings()203 cancelHyperparameterTuningJobSettings() { 204 return ((JobServiceStubSettings) getStubSettings()).cancelHyperparameterTuningJobSettings(); 205 } 206 207 /** Returns the object with the settings used for calls to createNasJob. */ createNasJobSettings()208 public UnaryCallSettings<CreateNasJobRequest, NasJob> createNasJobSettings() { 209 return ((JobServiceStubSettings) getStubSettings()).createNasJobSettings(); 210 } 211 212 /** Returns the object with the settings used for calls to getNasJob. */ getNasJobSettings()213 public UnaryCallSettings<GetNasJobRequest, NasJob> getNasJobSettings() { 214 return ((JobServiceStubSettings) getStubSettings()).getNasJobSettings(); 215 } 216 217 /** Returns the object with the settings used for calls to listNasJobs. */ 218 public PagedCallSettings<ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> listNasJobsSettings()219 listNasJobsSettings() { 220 return ((JobServiceStubSettings) getStubSettings()).listNasJobsSettings(); 221 } 222 223 /** Returns the object with the settings used for calls to deleteNasJob. */ deleteNasJobSettings()224 public UnaryCallSettings<DeleteNasJobRequest, Operation> deleteNasJobSettings() { 225 return ((JobServiceStubSettings) getStubSettings()).deleteNasJobSettings(); 226 } 227 228 /** Returns the object with the settings used for calls to deleteNasJob. */ 229 public OperationCallSettings<DeleteNasJobRequest, Empty, DeleteOperationMetadata> deleteNasJobOperationSettings()230 deleteNasJobOperationSettings() { 231 return ((JobServiceStubSettings) getStubSettings()).deleteNasJobOperationSettings(); 232 } 233 234 /** Returns the object with the settings used for calls to cancelNasJob. */ cancelNasJobSettings()235 public UnaryCallSettings<CancelNasJobRequest, Empty> cancelNasJobSettings() { 236 return ((JobServiceStubSettings) getStubSettings()).cancelNasJobSettings(); 237 } 238 239 /** Returns the object with the settings used for calls to getNasTrialDetail. */ getNasTrialDetailSettings()240 public UnaryCallSettings<GetNasTrialDetailRequest, NasTrialDetail> getNasTrialDetailSettings() { 241 return ((JobServiceStubSettings) getStubSettings()).getNasTrialDetailSettings(); 242 } 243 244 /** Returns the object with the settings used for calls to listNasTrialDetails. */ 245 public PagedCallSettings< 246 ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> listNasTrialDetailsSettings()247 listNasTrialDetailsSettings() { 248 return ((JobServiceStubSettings) getStubSettings()).listNasTrialDetailsSettings(); 249 } 250 251 /** Returns the object with the settings used for calls to createBatchPredictionJob. */ 252 public UnaryCallSettings<CreateBatchPredictionJobRequest, BatchPredictionJob> createBatchPredictionJobSettings()253 createBatchPredictionJobSettings() { 254 return ((JobServiceStubSettings) getStubSettings()).createBatchPredictionJobSettings(); 255 } 256 257 /** Returns the object with the settings used for calls to getBatchPredictionJob. */ 258 public UnaryCallSettings<GetBatchPredictionJobRequest, BatchPredictionJob> getBatchPredictionJobSettings()259 getBatchPredictionJobSettings() { 260 return ((JobServiceStubSettings) getStubSettings()).getBatchPredictionJobSettings(); 261 } 262 263 /** Returns the object with the settings used for calls to listBatchPredictionJobs. */ 264 public PagedCallSettings< 265 ListBatchPredictionJobsRequest, 266 ListBatchPredictionJobsResponse, 267 ListBatchPredictionJobsPagedResponse> listBatchPredictionJobsSettings()268 listBatchPredictionJobsSettings() { 269 return ((JobServiceStubSettings) getStubSettings()).listBatchPredictionJobsSettings(); 270 } 271 272 /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ 273 public UnaryCallSettings<DeleteBatchPredictionJobRequest, Operation> deleteBatchPredictionJobSettings()274 deleteBatchPredictionJobSettings() { 275 return ((JobServiceStubSettings) getStubSettings()).deleteBatchPredictionJobSettings(); 276 } 277 278 /** Returns the object with the settings used for calls to deleteBatchPredictionJob. */ 279 public OperationCallSettings<DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> deleteBatchPredictionJobOperationSettings()280 deleteBatchPredictionJobOperationSettings() { 281 return ((JobServiceStubSettings) getStubSettings()).deleteBatchPredictionJobOperationSettings(); 282 } 283 284 /** Returns the object with the settings used for calls to cancelBatchPredictionJob. */ 285 public UnaryCallSettings<CancelBatchPredictionJobRequest, Empty> cancelBatchPredictionJobSettings()286 cancelBatchPredictionJobSettings() { 287 return ((JobServiceStubSettings) getStubSettings()).cancelBatchPredictionJobSettings(); 288 } 289 290 /** Returns the object with the settings used for calls to createModelDeploymentMonitoringJob. */ 291 public UnaryCallSettings<CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob> createModelDeploymentMonitoringJobSettings()292 createModelDeploymentMonitoringJobSettings() { 293 return ((JobServiceStubSettings) getStubSettings()) 294 .createModelDeploymentMonitoringJobSettings(); 295 } 296 297 /** 298 * Returns the object with the settings used for calls to 299 * searchModelDeploymentMonitoringStatsAnomalies. 300 */ 301 public PagedCallSettings< 302 SearchModelDeploymentMonitoringStatsAnomaliesRequest, 303 SearchModelDeploymentMonitoringStatsAnomaliesResponse, 304 SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse> searchModelDeploymentMonitoringStatsAnomaliesSettings()305 searchModelDeploymentMonitoringStatsAnomaliesSettings() { 306 return ((JobServiceStubSettings) getStubSettings()) 307 .searchModelDeploymentMonitoringStatsAnomaliesSettings(); 308 } 309 310 /** Returns the object with the settings used for calls to getModelDeploymentMonitoringJob. */ 311 public UnaryCallSettings<GetModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob> getModelDeploymentMonitoringJobSettings()312 getModelDeploymentMonitoringJobSettings() { 313 return ((JobServiceStubSettings) getStubSettings()).getModelDeploymentMonitoringJobSettings(); 314 } 315 316 /** Returns the object with the settings used for calls to listModelDeploymentMonitoringJobs. */ 317 public PagedCallSettings< 318 ListModelDeploymentMonitoringJobsRequest, 319 ListModelDeploymentMonitoringJobsResponse, 320 ListModelDeploymentMonitoringJobsPagedResponse> listModelDeploymentMonitoringJobsSettings()321 listModelDeploymentMonitoringJobsSettings() { 322 return ((JobServiceStubSettings) getStubSettings()).listModelDeploymentMonitoringJobsSettings(); 323 } 324 325 /** Returns the object with the settings used for calls to updateModelDeploymentMonitoringJob. */ 326 public UnaryCallSettings<UpdateModelDeploymentMonitoringJobRequest, Operation> updateModelDeploymentMonitoringJobSettings()327 updateModelDeploymentMonitoringJobSettings() { 328 return ((JobServiceStubSettings) getStubSettings()) 329 .updateModelDeploymentMonitoringJobSettings(); 330 } 331 332 /** Returns the object with the settings used for calls to updateModelDeploymentMonitoringJob. */ 333 public OperationCallSettings< 334 UpdateModelDeploymentMonitoringJobRequest, 335 ModelDeploymentMonitoringJob, 336 UpdateModelDeploymentMonitoringJobOperationMetadata> updateModelDeploymentMonitoringJobOperationSettings()337 updateModelDeploymentMonitoringJobOperationSettings() { 338 return ((JobServiceStubSettings) getStubSettings()) 339 .updateModelDeploymentMonitoringJobOperationSettings(); 340 } 341 342 /** Returns the object with the settings used for calls to deleteModelDeploymentMonitoringJob. */ 343 public UnaryCallSettings<DeleteModelDeploymentMonitoringJobRequest, Operation> deleteModelDeploymentMonitoringJobSettings()344 deleteModelDeploymentMonitoringJobSettings() { 345 return ((JobServiceStubSettings) getStubSettings()) 346 .deleteModelDeploymentMonitoringJobSettings(); 347 } 348 349 /** Returns the object with the settings used for calls to deleteModelDeploymentMonitoringJob. */ 350 public OperationCallSettings< 351 DeleteModelDeploymentMonitoringJobRequest, Empty, DeleteOperationMetadata> deleteModelDeploymentMonitoringJobOperationSettings()352 deleteModelDeploymentMonitoringJobOperationSettings() { 353 return ((JobServiceStubSettings) getStubSettings()) 354 .deleteModelDeploymentMonitoringJobOperationSettings(); 355 } 356 357 /** Returns the object with the settings used for calls to pauseModelDeploymentMonitoringJob. */ 358 public UnaryCallSettings<PauseModelDeploymentMonitoringJobRequest, Empty> pauseModelDeploymentMonitoringJobSettings()359 pauseModelDeploymentMonitoringJobSettings() { 360 return ((JobServiceStubSettings) getStubSettings()).pauseModelDeploymentMonitoringJobSettings(); 361 } 362 363 /** Returns the object with the settings used for calls to resumeModelDeploymentMonitoringJob. */ 364 public UnaryCallSettings<ResumeModelDeploymentMonitoringJobRequest, Empty> resumeModelDeploymentMonitoringJobSettings()365 resumeModelDeploymentMonitoringJobSettings() { 366 return ((JobServiceStubSettings) getStubSettings()) 367 .resumeModelDeploymentMonitoringJobSettings(); 368 } 369 370 /** Returns the object with the settings used for calls to listLocations. */ 371 public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings()372 listLocationsSettings() { 373 return ((JobServiceStubSettings) getStubSettings()).listLocationsSettings(); 374 } 375 376 /** Returns the object with the settings used for calls to getLocation. */ getLocationSettings()377 public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() { 378 return ((JobServiceStubSettings) getStubSettings()).getLocationSettings(); 379 } 380 381 /** Returns the object with the settings used for calls to setIamPolicy. */ setIamPolicySettings()382 public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() { 383 return ((JobServiceStubSettings) getStubSettings()).setIamPolicySettings(); 384 } 385 386 /** Returns the object with the settings used for calls to getIamPolicy. */ getIamPolicySettings()387 public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() { 388 return ((JobServiceStubSettings) getStubSettings()).getIamPolicySettings(); 389 } 390 391 /** Returns the object with the settings used for calls to testIamPermissions. */ 392 public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse> testIamPermissionsSettings()393 testIamPermissionsSettings() { 394 return ((JobServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); 395 } 396 create(JobServiceStubSettings stub)397 public static final JobServiceSettings create(JobServiceStubSettings stub) throws IOException { 398 return new JobServiceSettings.Builder(stub.toBuilder()).build(); 399 } 400 401 /** Returns a builder for the default ExecutorProvider for this service. */ defaultExecutorProviderBuilder()402 public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { 403 return JobServiceStubSettings.defaultExecutorProviderBuilder(); 404 } 405 406 /** Returns the default service endpoint. */ getDefaultEndpoint()407 public static String getDefaultEndpoint() { 408 return JobServiceStubSettings.getDefaultEndpoint(); 409 } 410 411 /** Returns the default service scopes. */ getDefaultServiceScopes()412 public static List<String> getDefaultServiceScopes() { 413 return JobServiceStubSettings.getDefaultServiceScopes(); 414 } 415 416 /** Returns a builder for the default credentials for this service. */ defaultCredentialsProviderBuilder()417 public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { 418 return JobServiceStubSettings.defaultCredentialsProviderBuilder(); 419 } 420 421 /** Returns a builder for the default ChannelProvider for this service. */ defaultGrpcTransportProviderBuilder()422 public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { 423 return JobServiceStubSettings.defaultGrpcTransportProviderBuilder(); 424 } 425 defaultTransportChannelProvider()426 public static TransportChannelProvider defaultTransportChannelProvider() { 427 return JobServiceStubSettings.defaultTransportChannelProvider(); 428 } 429 430 @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") defaultApiClientHeaderProviderBuilder()431 public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { 432 return JobServiceStubSettings.defaultApiClientHeaderProviderBuilder(); 433 } 434 435 /** Returns a new builder for this class. */ newBuilder()436 public static Builder newBuilder() { 437 return Builder.createDefault(); 438 } 439 440 /** Returns a new builder for this class. */ newBuilder(ClientContext clientContext)441 public static Builder newBuilder(ClientContext clientContext) { 442 return new Builder(clientContext); 443 } 444 445 /** Returns a builder containing all the values of this settings class. */ toBuilder()446 public Builder toBuilder() { 447 return new Builder(this); 448 } 449 JobServiceSettings(Builder settingsBuilder)450 protected JobServiceSettings(Builder settingsBuilder) throws IOException { 451 super(settingsBuilder); 452 } 453 454 /** Builder for JobServiceSettings. */ 455 public static class Builder extends ClientSettings.Builder<JobServiceSettings, Builder> { 456 Builder()457 protected Builder() throws IOException { 458 this(((ClientContext) null)); 459 } 460 Builder(ClientContext clientContext)461 protected Builder(ClientContext clientContext) { 462 super(JobServiceStubSettings.newBuilder(clientContext)); 463 } 464 Builder(JobServiceSettings settings)465 protected Builder(JobServiceSettings settings) { 466 super(settings.getStubSettings().toBuilder()); 467 } 468 Builder(JobServiceStubSettings.Builder stubSettings)469 protected Builder(JobServiceStubSettings.Builder stubSettings) { 470 super(stubSettings); 471 } 472 createDefault()473 private static Builder createDefault() { 474 return new Builder(JobServiceStubSettings.newBuilder()); 475 } 476 getStubSettingsBuilder()477 public JobServiceStubSettings.Builder getStubSettingsBuilder() { 478 return ((JobServiceStubSettings.Builder) getStubSettings()); 479 } 480 481 /** 482 * Applies the given settings updater function to all of the unary API methods in this service. 483 * 484 * <p>Note: This method does not support applying settings to streaming methods. 485 */ applyToAllUnaryMethods( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater)486 public Builder applyToAllUnaryMethods( 487 ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { 488 super.applyToAllUnaryMethods( 489 getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); 490 return this; 491 } 492 493 /** Returns the builder for the settings used for calls to createCustomJob. */ createCustomJobSettings()494 public UnaryCallSettings.Builder<CreateCustomJobRequest, CustomJob> createCustomJobSettings() { 495 return getStubSettingsBuilder().createCustomJobSettings(); 496 } 497 498 /** Returns the builder for the settings used for calls to getCustomJob. */ getCustomJobSettings()499 public UnaryCallSettings.Builder<GetCustomJobRequest, CustomJob> getCustomJobSettings() { 500 return getStubSettingsBuilder().getCustomJobSettings(); 501 } 502 503 /** Returns the builder for the settings used for calls to listCustomJobs. */ 504 public PagedCallSettings.Builder< 505 ListCustomJobsRequest, ListCustomJobsResponse, ListCustomJobsPagedResponse> listCustomJobsSettings()506 listCustomJobsSettings() { 507 return getStubSettingsBuilder().listCustomJobsSettings(); 508 } 509 510 /** Returns the builder for the settings used for calls to deleteCustomJob. */ deleteCustomJobSettings()511 public UnaryCallSettings.Builder<DeleteCustomJobRequest, Operation> deleteCustomJobSettings() { 512 return getStubSettingsBuilder().deleteCustomJobSettings(); 513 } 514 515 /** Returns the builder for the settings used for calls to deleteCustomJob. */ 516 public OperationCallSettings.Builder<DeleteCustomJobRequest, Empty, DeleteOperationMetadata> deleteCustomJobOperationSettings()517 deleteCustomJobOperationSettings() { 518 return getStubSettingsBuilder().deleteCustomJobOperationSettings(); 519 } 520 521 /** Returns the builder for the settings used for calls to cancelCustomJob. */ cancelCustomJobSettings()522 public UnaryCallSettings.Builder<CancelCustomJobRequest, Empty> cancelCustomJobSettings() { 523 return getStubSettingsBuilder().cancelCustomJobSettings(); 524 } 525 526 /** Returns the builder for the settings used for calls to createDataLabelingJob. */ 527 public UnaryCallSettings.Builder<CreateDataLabelingJobRequest, DataLabelingJob> createDataLabelingJobSettings()528 createDataLabelingJobSettings() { 529 return getStubSettingsBuilder().createDataLabelingJobSettings(); 530 } 531 532 /** Returns the builder for the settings used for calls to getDataLabelingJob. */ 533 public UnaryCallSettings.Builder<GetDataLabelingJobRequest, DataLabelingJob> getDataLabelingJobSettings()534 getDataLabelingJobSettings() { 535 return getStubSettingsBuilder().getDataLabelingJobSettings(); 536 } 537 538 /** Returns the builder for the settings used for calls to listDataLabelingJobs. */ 539 public PagedCallSettings.Builder< 540 ListDataLabelingJobsRequest, 541 ListDataLabelingJobsResponse, 542 ListDataLabelingJobsPagedResponse> listDataLabelingJobsSettings()543 listDataLabelingJobsSettings() { 544 return getStubSettingsBuilder().listDataLabelingJobsSettings(); 545 } 546 547 /** Returns the builder for the settings used for calls to deleteDataLabelingJob. */ 548 public UnaryCallSettings.Builder<DeleteDataLabelingJobRequest, Operation> deleteDataLabelingJobSettings()549 deleteDataLabelingJobSettings() { 550 return getStubSettingsBuilder().deleteDataLabelingJobSettings(); 551 } 552 553 /** Returns the builder for the settings used for calls to deleteDataLabelingJob. */ 554 public OperationCallSettings.Builder< 555 DeleteDataLabelingJobRequest, Empty, DeleteOperationMetadata> deleteDataLabelingJobOperationSettings()556 deleteDataLabelingJobOperationSettings() { 557 return getStubSettingsBuilder().deleteDataLabelingJobOperationSettings(); 558 } 559 560 /** Returns the builder for the settings used for calls to cancelDataLabelingJob. */ 561 public UnaryCallSettings.Builder<CancelDataLabelingJobRequest, Empty> cancelDataLabelingJobSettings()562 cancelDataLabelingJobSettings() { 563 return getStubSettingsBuilder().cancelDataLabelingJobSettings(); 564 } 565 566 /** Returns the builder for the settings used for calls to createHyperparameterTuningJob. */ 567 public UnaryCallSettings.Builder<CreateHyperparameterTuningJobRequest, HyperparameterTuningJob> createHyperparameterTuningJobSettings()568 createHyperparameterTuningJobSettings() { 569 return getStubSettingsBuilder().createHyperparameterTuningJobSettings(); 570 } 571 572 /** Returns the builder for the settings used for calls to getHyperparameterTuningJob. */ 573 public UnaryCallSettings.Builder<GetHyperparameterTuningJobRequest, HyperparameterTuningJob> getHyperparameterTuningJobSettings()574 getHyperparameterTuningJobSettings() { 575 return getStubSettingsBuilder().getHyperparameterTuningJobSettings(); 576 } 577 578 /** Returns the builder for the settings used for calls to listHyperparameterTuningJobs. */ 579 public PagedCallSettings.Builder< 580 ListHyperparameterTuningJobsRequest, 581 ListHyperparameterTuningJobsResponse, 582 ListHyperparameterTuningJobsPagedResponse> listHyperparameterTuningJobsSettings()583 listHyperparameterTuningJobsSettings() { 584 return getStubSettingsBuilder().listHyperparameterTuningJobsSettings(); 585 } 586 587 /** Returns the builder for the settings used for calls to deleteHyperparameterTuningJob. */ 588 public UnaryCallSettings.Builder<DeleteHyperparameterTuningJobRequest, Operation> deleteHyperparameterTuningJobSettings()589 deleteHyperparameterTuningJobSettings() { 590 return getStubSettingsBuilder().deleteHyperparameterTuningJobSettings(); 591 } 592 593 /** Returns the builder for the settings used for calls to deleteHyperparameterTuningJob. */ 594 public OperationCallSettings.Builder< 595 DeleteHyperparameterTuningJobRequest, Empty, DeleteOperationMetadata> deleteHyperparameterTuningJobOperationSettings()596 deleteHyperparameterTuningJobOperationSettings() { 597 return getStubSettingsBuilder().deleteHyperparameterTuningJobOperationSettings(); 598 } 599 600 /** Returns the builder for the settings used for calls to cancelHyperparameterTuningJob. */ 601 public UnaryCallSettings.Builder<CancelHyperparameterTuningJobRequest, Empty> cancelHyperparameterTuningJobSettings()602 cancelHyperparameterTuningJobSettings() { 603 return getStubSettingsBuilder().cancelHyperparameterTuningJobSettings(); 604 } 605 606 /** Returns the builder for the settings used for calls to createNasJob. */ createNasJobSettings()607 public UnaryCallSettings.Builder<CreateNasJobRequest, NasJob> createNasJobSettings() { 608 return getStubSettingsBuilder().createNasJobSettings(); 609 } 610 611 /** Returns the builder for the settings used for calls to getNasJob. */ getNasJobSettings()612 public UnaryCallSettings.Builder<GetNasJobRequest, NasJob> getNasJobSettings() { 613 return getStubSettingsBuilder().getNasJobSettings(); 614 } 615 616 /** Returns the builder for the settings used for calls to listNasJobs. */ 617 public PagedCallSettings.Builder< 618 ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> listNasJobsSettings()619 listNasJobsSettings() { 620 return getStubSettingsBuilder().listNasJobsSettings(); 621 } 622 623 /** Returns the builder for the settings used for calls to deleteNasJob. */ deleteNasJobSettings()624 public UnaryCallSettings.Builder<DeleteNasJobRequest, Operation> deleteNasJobSettings() { 625 return getStubSettingsBuilder().deleteNasJobSettings(); 626 } 627 628 /** Returns the builder for the settings used for calls to deleteNasJob. */ 629 public OperationCallSettings.Builder<DeleteNasJobRequest, Empty, DeleteOperationMetadata> deleteNasJobOperationSettings()630 deleteNasJobOperationSettings() { 631 return getStubSettingsBuilder().deleteNasJobOperationSettings(); 632 } 633 634 /** Returns the builder for the settings used for calls to cancelNasJob. */ cancelNasJobSettings()635 public UnaryCallSettings.Builder<CancelNasJobRequest, Empty> cancelNasJobSettings() { 636 return getStubSettingsBuilder().cancelNasJobSettings(); 637 } 638 639 /** Returns the builder for the settings used for calls to getNasTrialDetail. */ 640 public UnaryCallSettings.Builder<GetNasTrialDetailRequest, NasTrialDetail> getNasTrialDetailSettings()641 getNasTrialDetailSettings() { 642 return getStubSettingsBuilder().getNasTrialDetailSettings(); 643 } 644 645 /** Returns the builder for the settings used for calls to listNasTrialDetails. */ 646 public PagedCallSettings.Builder< 647 ListNasTrialDetailsRequest, 648 ListNasTrialDetailsResponse, 649 ListNasTrialDetailsPagedResponse> listNasTrialDetailsSettings()650 listNasTrialDetailsSettings() { 651 return getStubSettingsBuilder().listNasTrialDetailsSettings(); 652 } 653 654 /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ 655 public UnaryCallSettings.Builder<CreateBatchPredictionJobRequest, BatchPredictionJob> createBatchPredictionJobSettings()656 createBatchPredictionJobSettings() { 657 return getStubSettingsBuilder().createBatchPredictionJobSettings(); 658 } 659 660 /** Returns the builder for the settings used for calls to getBatchPredictionJob. */ 661 public UnaryCallSettings.Builder<GetBatchPredictionJobRequest, BatchPredictionJob> getBatchPredictionJobSettings()662 getBatchPredictionJobSettings() { 663 return getStubSettingsBuilder().getBatchPredictionJobSettings(); 664 } 665 666 /** Returns the builder for the settings used for calls to listBatchPredictionJobs. */ 667 public PagedCallSettings.Builder< 668 ListBatchPredictionJobsRequest, 669 ListBatchPredictionJobsResponse, 670 ListBatchPredictionJobsPagedResponse> listBatchPredictionJobsSettings()671 listBatchPredictionJobsSettings() { 672 return getStubSettingsBuilder().listBatchPredictionJobsSettings(); 673 } 674 675 /** Returns the builder for the settings used for calls to deleteBatchPredictionJob. */ 676 public UnaryCallSettings.Builder<DeleteBatchPredictionJobRequest, Operation> deleteBatchPredictionJobSettings()677 deleteBatchPredictionJobSettings() { 678 return getStubSettingsBuilder().deleteBatchPredictionJobSettings(); 679 } 680 681 /** Returns the builder for the settings used for calls to deleteBatchPredictionJob. */ 682 public OperationCallSettings.Builder< 683 DeleteBatchPredictionJobRequest, Empty, DeleteOperationMetadata> deleteBatchPredictionJobOperationSettings()684 deleteBatchPredictionJobOperationSettings() { 685 return getStubSettingsBuilder().deleteBatchPredictionJobOperationSettings(); 686 } 687 688 /** Returns the builder for the settings used for calls to cancelBatchPredictionJob. */ 689 public UnaryCallSettings.Builder<CancelBatchPredictionJobRequest, Empty> cancelBatchPredictionJobSettings()690 cancelBatchPredictionJobSettings() { 691 return getStubSettingsBuilder().cancelBatchPredictionJobSettings(); 692 } 693 694 /** 695 * Returns the builder for the settings used for calls to createModelDeploymentMonitoringJob. 696 */ 697 public UnaryCallSettings.Builder< 698 CreateModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob> createModelDeploymentMonitoringJobSettings()699 createModelDeploymentMonitoringJobSettings() { 700 return getStubSettingsBuilder().createModelDeploymentMonitoringJobSettings(); 701 } 702 703 /** 704 * Returns the builder for the settings used for calls to 705 * searchModelDeploymentMonitoringStatsAnomalies. 706 */ 707 public PagedCallSettings.Builder< 708 SearchModelDeploymentMonitoringStatsAnomaliesRequest, 709 SearchModelDeploymentMonitoringStatsAnomaliesResponse, 710 SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse> searchModelDeploymentMonitoringStatsAnomaliesSettings()711 searchModelDeploymentMonitoringStatsAnomaliesSettings() { 712 return getStubSettingsBuilder().searchModelDeploymentMonitoringStatsAnomaliesSettings(); 713 } 714 715 /** Returns the builder for the settings used for calls to getModelDeploymentMonitoringJob. */ 716 public UnaryCallSettings.Builder< 717 GetModelDeploymentMonitoringJobRequest, ModelDeploymentMonitoringJob> getModelDeploymentMonitoringJobSettings()718 getModelDeploymentMonitoringJobSettings() { 719 return getStubSettingsBuilder().getModelDeploymentMonitoringJobSettings(); 720 } 721 722 /** Returns the builder for the settings used for calls to listModelDeploymentMonitoringJobs. */ 723 public PagedCallSettings.Builder< 724 ListModelDeploymentMonitoringJobsRequest, 725 ListModelDeploymentMonitoringJobsResponse, 726 ListModelDeploymentMonitoringJobsPagedResponse> listModelDeploymentMonitoringJobsSettings()727 listModelDeploymentMonitoringJobsSettings() { 728 return getStubSettingsBuilder().listModelDeploymentMonitoringJobsSettings(); 729 } 730 731 /** 732 * Returns the builder for the settings used for calls to updateModelDeploymentMonitoringJob. 733 */ 734 public UnaryCallSettings.Builder<UpdateModelDeploymentMonitoringJobRequest, Operation> updateModelDeploymentMonitoringJobSettings()735 updateModelDeploymentMonitoringJobSettings() { 736 return getStubSettingsBuilder().updateModelDeploymentMonitoringJobSettings(); 737 } 738 739 /** 740 * Returns the builder for the settings used for calls to updateModelDeploymentMonitoringJob. 741 */ 742 public OperationCallSettings.Builder< 743 UpdateModelDeploymentMonitoringJobRequest, 744 ModelDeploymentMonitoringJob, 745 UpdateModelDeploymentMonitoringJobOperationMetadata> updateModelDeploymentMonitoringJobOperationSettings()746 updateModelDeploymentMonitoringJobOperationSettings() { 747 return getStubSettingsBuilder().updateModelDeploymentMonitoringJobOperationSettings(); 748 } 749 750 /** 751 * Returns the builder for the settings used for calls to deleteModelDeploymentMonitoringJob. 752 */ 753 public UnaryCallSettings.Builder<DeleteModelDeploymentMonitoringJobRequest, Operation> deleteModelDeploymentMonitoringJobSettings()754 deleteModelDeploymentMonitoringJobSettings() { 755 return getStubSettingsBuilder().deleteModelDeploymentMonitoringJobSettings(); 756 } 757 758 /** 759 * Returns the builder for the settings used for calls to deleteModelDeploymentMonitoringJob. 760 */ 761 public OperationCallSettings.Builder< 762 DeleteModelDeploymentMonitoringJobRequest, Empty, DeleteOperationMetadata> deleteModelDeploymentMonitoringJobOperationSettings()763 deleteModelDeploymentMonitoringJobOperationSettings() { 764 return getStubSettingsBuilder().deleteModelDeploymentMonitoringJobOperationSettings(); 765 } 766 767 /** Returns the builder for the settings used for calls to pauseModelDeploymentMonitoringJob. */ 768 public UnaryCallSettings.Builder<PauseModelDeploymentMonitoringJobRequest, Empty> pauseModelDeploymentMonitoringJobSettings()769 pauseModelDeploymentMonitoringJobSettings() { 770 return getStubSettingsBuilder().pauseModelDeploymentMonitoringJobSettings(); 771 } 772 773 /** 774 * Returns the builder for the settings used for calls to resumeModelDeploymentMonitoringJob. 775 */ 776 public UnaryCallSettings.Builder<ResumeModelDeploymentMonitoringJobRequest, Empty> resumeModelDeploymentMonitoringJobSettings()777 resumeModelDeploymentMonitoringJobSettings() { 778 return getStubSettingsBuilder().resumeModelDeploymentMonitoringJobSettings(); 779 } 780 781 /** Returns the builder for the settings used for calls to listLocations. */ 782 public PagedCallSettings.Builder< 783 ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings()784 listLocationsSettings() { 785 return getStubSettingsBuilder().listLocationsSettings(); 786 } 787 788 /** Returns the builder for the settings used for calls to getLocation. */ getLocationSettings()789 public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() { 790 return getStubSettingsBuilder().getLocationSettings(); 791 } 792 793 /** Returns the builder for the settings used for calls to setIamPolicy. */ setIamPolicySettings()794 public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettings() { 795 return getStubSettingsBuilder().setIamPolicySettings(); 796 } 797 798 /** Returns the builder for the settings used for calls to getIamPolicy. */ getIamPolicySettings()799 public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettings() { 800 return getStubSettingsBuilder().getIamPolicySettings(); 801 } 802 803 /** Returns the builder for the settings used for calls to testIamPermissions. */ 804 public UnaryCallSettings.Builder<TestIamPermissionsRequest, TestIamPermissionsResponse> testIamPermissionsSettings()805 testIamPermissionsSettings() { 806 return getStubSettingsBuilder().testIamPermissionsSettings(); 807 } 808 809 @Override build()810 public JobServiceSettings build() throws IOException { 811 return new JobServiceSettings(this); 812 } 813 } 814 } 815