From bc3362098020d9cac65a47fc467ce258519dfa90 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Tue, 14 May 2024 17:22:28 -0400 Subject: [PATCH] chore: update googleapis commit at Tue May 14 20:43:41 UTC 2024 (#10843) * chore: update googleapis commit at Tue May 14 20:43:41 UTC 2024 * chore: generate libraries at Tue May 14 20:47:05 UTC 2024 --- generation_config.yaml | 2 +- .../v1beta1/GenAiTuningServiceClient.java | 1414 +++++ .../v1beta1/GenAiTuningServiceSettings.java | 290 + .../aiplatform/v1beta1/gapic_metadata.json | 36 + .../aiplatform/v1beta1/package-info.java | 19 + .../v1beta1/stub/GenAiTuningServiceStub.java | 102 + .../stub/GenAiTuningServiceStubSettings.java | 602 ++ ...GrpcGenAiTuningServiceCallableFactory.java | 115 + .../stub/GrpcGenAiTuningServiceStub.java | 440 ++ .../reflect-config.json | 243 + .../v1beta1/GenAiTuningServiceClientTest.java | 744 +++ .../v1beta1/MockGenAiTuningService.java | 59 + .../v1beta1/MockGenAiTuningServiceImpl.java | 145 + .../v1beta1/GenAiTuningServiceGrpc.java | 782 +++ .../v1beta1/CancelTuningJobRequest.java | 649 +++ .../CancelTuningJobRequestOrBuilder.java | 57 + .../v1beta1/CreateTuningJobRequest.java | 953 ++++ .../CreateTuningJobRequestOrBuilder.java | 98 + .../v1beta1/GenAiTuningServiceProto.java | 182 + .../v1beta1/GetTuningJobRequest.java | 649 +++ .../v1beta1/GetTuningJobRequestOrBuilder.java | 57 + .../v1beta1/ListTuningJobsRequest.java | 1120 ++++ .../ListTuningJobsRequestOrBuilder.java | 124 + .../v1beta1/ListTuningJobsResponse.java | 1145 ++++ .../ListTuningJobsResponseOrBuilder.java | 109 + .../v1beta1/SupervisedHyperParameters.java | 1022 ++++ .../SupervisedHyperParametersOrBuilder.java | 82 + .../v1beta1/SupervisedTuningDataStats.java | 2348 ++++++++ .../SupervisedTuningDataStatsOrBuilder.java | 272 + .../SupervisedTuningDatasetDistribution.java | 2555 +++++++++ ...sedTuningDatasetDistributionOrBuilder.java | 186 + .../v1beta1/SupervisedTuningSpec.java | 1134 ++++ .../SupervisedTuningSpecOrBuilder.java | 122 + .../cloud/aiplatform/v1beta1/TunedModel.java | 850 +++ .../v1beta1/TunedModelOrBuilder.java | 88 + .../aiplatform/v1beta1/TuningDataStats.java | 857 +++ .../v1beta1/TuningDataStatsOrBuilder.java | 70 + .../cloud/aiplatform/v1beta1/TuningJob.java | 4918 +++++++++++++++++ .../aiplatform/v1beta1/TuningJobName.java | 223 + .../v1beta1/TuningJobOrBuilder.java | 693 +++ .../aiplatform/v1beta1/TuningJobProto.java | 293 + .../v1beta1/genai_tuning_service.proto | 164 + .../cloud/aiplatform/v1beta1/tuning_job.proto | 286 + .../canceltuningjob/AsyncCancelTuningJob.java | 50 + .../canceltuningjob/SyncCancelTuningJob.java | 46 + .../SyncCancelTuningJobString.java | 42 + .../SyncCancelTuningJobTuningjobname.java | 42 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../createtuningjob/AsyncCreateTuningJob.java | 51 + .../createtuningjob/SyncCreateTuningJob.java | 47 + ...cCreateTuningJobLocationnameTuningjob.java | 43 + .../SyncCreateTuningJobStringTuningjob.java | 43 + .../getiampolicy/AsyncGetIamPolicy.java | 55 + .../getiampolicy/SyncGetIamPolicy.java | 51 + .../getlocation/AsyncGetLocation.java | 46 + .../getlocation/SyncGetLocation.java | 42 + .../gettuningjob/AsyncGetTuningJob.java | 50 + .../gettuningjob/SyncGetTuningJob.java | 46 + .../gettuningjob/SyncGetTuningJobString.java | 42 + .../SyncGetTuningJobTuningjobname.java | 42 + .../listlocations/AsyncListLocations.java | 54 + .../AsyncListLocationsPaged.java | 62 + .../listlocations/SyncListLocations.java | 50 + .../listtuningjobs/AsyncListTuningJobs.java | 55 + .../AsyncListTuningJobsPaged.java | 63 + .../listtuningjobs/SyncListTuningJobs.java | 51 + .../SyncListTuningJobsLocationname.java | 44 + .../SyncListTuningJobsString.java | 44 + .../setiampolicy/AsyncSetIamPolicy.java | 56 + .../setiampolicy/SyncSetIamPolicy.java | 52 + .../AsyncTestIamPermissions.java | 55 + .../SyncTestIamPermissions.java | 51 + .../createtuningjob/SyncCreateTuningJob.java | 50 + .../createtuningjob/SyncCreateTuningJob.java | 50 + .../google/cloud/batch/v1/TaskExecution.java | 56 +- .../batch/v1/TaskExecutionOrBuilder.java | 14 +- .../proto/google/cloud/batch/v1/task.proto | 14 +- .../cloud/batch/v1alpha/TaskExecution.java | 56 +- .../batch/v1alpha/TaskExecutionOrBuilder.java | 14 +- .../google/cloud/batch/v1alpha/task.proto | 14 +- .../com/google/chat/v1/ChatServiceClient.java | 124 +- .../com/google/chat/v1/ChatServiceGrpc.java | 176 +- .../com/google/chat/v1/ActionStatusProto.java | 8 +- .../com/google/chat/v1/AnnotationProto.java | 73 +- .../com/google/chat/v1/AttachmentProto.java | 8 +- .../com/google/chat/v1/ChatServiceProto.java | 9 +- .../google/chat/v1/ContextualAddOnProto.java | 9 +- .../google/chat/v1/CreateMessageRequest.java | 14 +- .../v1/CreateMessageRequestOrBuilder.java | 4 +- .../java/com/google/chat/v1/CustomEmoji.java | 28 +- .../google/chat/v1/CustomEmojiOrBuilder.java | 8 +- .../google/chat/v1/DeletionMetadataProto.java | 7 +- .../google/chat/v1/GetMembershipRequest.java | 35 +- .../v1/GetMembershipRequestOrBuilder.java | 10 +- .../java/com/google/chat/v1/GroupProto.java | 9 +- .../com/google/chat/v1/HistoryStateProto.java | 8 +- .../com/google/chat/v1/MatchedUrlProto.java | 7 +- .../java/com/google/chat/v1/Membership.java | 48 +- .../google/chat/v1/MembershipOrBuilder.java | 12 +- .../com/google/chat/v1/MembershipProto.java | 7 +- .../java/com/google/chat/v1/MessageProto.java | 8 +- .../com/google/chat/v1/ReactionProto.java | 40 +- .../com/google/chat/v1/SetUpSpaceRequest.java | 368 +- .../chat/v1/SetUpSpaceRequestOrBuilder.java | 80 +- .../com/google/chat/v1/SlashCommandProto.java | 8 +- .../main/java/com/google/chat/v1/Space.java | 66 +- .../com/google/chat/v1/SpaceOrBuilder.java | 17 +- .../java/com/google/chat/v1/SpaceProto.java | 8 +- .../google/chat/v1/SpaceReadStateProto.java | 8 +- .../com/google/chat/v1/SpaceSetupProto.java | 8 +- .../google/chat/v1/ThreadReadStateProto.java | 8 +- .../java/com/google/chat/v1/UserProto.java | 8 +- .../java/com/google/chat/v1/WidgetsProto.java | 7 +- .../proto/google/chat/v1/action_status.proto | 1 + .../proto/google/chat/v1/annotation.proto | 2 + .../proto/google/chat/v1/attachment.proto | 1 + .../proto/google/chat/v1/chat_service.proto | 49 +- .../google/chat/v1/contextual_addon.proto | 1 + .../google/chat/v1/deletion_metadata.proto | 1 + .../src/main/proto/google/chat/v1/group.proto | 1 + .../proto/google/chat/v1/history_state.proto | 1 + .../proto/google/chat/v1/matched_url.proto | 1 + .../proto/google/chat/v1/membership.proto | 10 +- .../main/proto/google/chat/v1/message.proto | 1 + .../main/proto/google/chat/v1/reaction.proto | 5 +- .../proto/google/chat/v1/slash_command.proto | 1 + .../src/main/proto/google/chat/v1/space.proto | 12 +- .../google/chat/v1/space_read_state.proto | 1 + .../proto/google/chat/v1/space_setup.proto | 17 +- .../google/chat/v1/thread_read_state.proto | 1 + .../src/main/proto/google/chat/v1/user.proto | 1 + .../main/proto/google/chat/v1/widgets.proto | 1 + .../gkemulticloud/v1/AzureClustersClient.java | 10 +- .../v1/stub/HttpJsonAzureClustersStub.java | 4 + .../cloud/gkemulticloud/v1/AwsNodeConfig.java | 28 +- .../v1/AwsNodeConfigOrBuilder.java | 8 +- .../gkemulticloud/v1/AzureServiceProto.java | 379 +- .../v1/DeleteAzureClusterRequest.java | 105 + .../DeleteAzureClusterRequestOrBuilder.java | 16 + .../v1/DeleteAzureNodePoolRequest.java | 105 + .../DeleteAzureNodePoolRequestOrBuilder.java | 16 + .../v1/GetAzureJsonWebKeysRequest.java | 14 +- .../GetAzureJsonWebKeysRequestOrBuilder.java | 4 +- .../gkemulticloud/v1/aws_resources.proto | 4 +- .../gkemulticloud/v1/azure_service.proto | 14 +- .../AsyncDeleteAzureCluster.java | 1 + .../AsyncDeleteAzureClusterLRO.java | 1 + .../SyncDeleteAzureCluster.java | 1 + .../AsyncDeleteAzureNodePool.java | 1 + .../AsyncDeleteAzureNodePoolLRO.java | 1 + .../SyncDeleteAzureNodePool.java | 1 + 152 files changed, 29222 insertions(+), 866 deletions(-) create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClient.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStubSettings.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceCallableFactory.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceStub.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClientTest.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningService.java create mode 100644 java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningServiceImpl.java create mode 100644 java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceGrpc.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequest.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequestOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponse.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponseOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParameters.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParametersOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStats.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStatsOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistribution.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistributionOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpec.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpecOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModel.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModelOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStats.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStatsOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJob.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobName.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobOrBuilder.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobProto.java create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/genai_tuning_service.proto create mode 100644 java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tuning_job.proto create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetEndpoint.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/SyncGetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/AsyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/SyncGetLocation.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/AsyncGetTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocationsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/SyncListLocations.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobs.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/SyncSetIamPolicy.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/SyncTestIamPermissions.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java create mode 100644 java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java diff --git a/generation_config.yaml b/generation_config.yaml index 802c18fa4216..effd1ec861ce 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.40.0 protoc_version: '25.3' -googleapis_commitish: 25a1a57957d9e4bf431897d280b2569b26dc9165 +googleapis_commitish: 584e0dee558b4b19bdecf1f2bdd4ec151190e5a4 libraries_bom_version: 26.39.0 template_excludes: - .github/* diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClient.java new file mode 100644 index 000000000000..4325165ce5c5 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClient.java @@ -0,0 +1,1414 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.stub.GenAiTuningServiceStub; +import com.google.cloud.aiplatform.v1beta1.stub.GenAiTuningServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: A service for creating and managing GenAI Tuning Jobs. + * + *

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: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   TuningJob tuningJob = TuningJob.newBuilder().build();
+ *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the GenAiTuningServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateTuningJob

Creates a TuningJob. A created TuningJob right away will be attempted to be run.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTuningJob(CreateTuningJobRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTuningJob(LocationName parent, TuningJob tuningJob) + *

  • createTuningJob(String parent, TuningJob tuningJob) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createTuningJobCallable() + *

+ *

GetTuningJob

Gets a TuningJob.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTuningJob(GetTuningJobRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTuningJob(TuningJobName name) + *

  • getTuningJob(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getTuningJobCallable() + *

+ *

ListTuningJobs

Lists TuningJobs in a Location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTuningJobs(ListTuningJobsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTuningJobs(LocationName parent) + *

  • listTuningJobs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listTuningJobsPagedCallable() + *

  • listTuningJobsCallable() + *

+ *

CancelTuningJob

Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set to `CANCELLED`.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • cancelTuningJob(CancelTuningJobRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • cancelTuningJob(TuningJobName name) + *

  • cancelTuningJob(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • cancelTuningJobCallable() + *

+ *

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.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *

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.

+ *
    + *
  • setIamPolicy(SetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • setIamPolicyCallable() + *

+ *

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.

+ *
    + *
  • getIamPolicy(GetIamPolicyRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getIamPolicyCallable() + *

+ *

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.

+ *
    + *
  • testIamPermissions(TestIamPermissionsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
+ * + *

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 GenAiTuningServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * GenAiTuningServiceSettings genAiTuningServiceSettings =
+ *     GenAiTuningServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * GenAiTuningServiceClient genAiTuningServiceClient =
+ *     GenAiTuningServiceClient.create(genAiTuningServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * GenAiTuningServiceSettings genAiTuningServiceSettings =
+ *     GenAiTuningServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * GenAiTuningServiceClient genAiTuningServiceClient =
+ *     GenAiTuningServiceClient.create(genAiTuningServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GenAiTuningServiceClient implements BackgroundResource { + private final GenAiTuningServiceSettings settings; + private final GenAiTuningServiceStub stub; + + /** Constructs an instance of GenAiTuningServiceClient with default settings. */ + public static final GenAiTuningServiceClient create() throws IOException { + return create(GenAiTuningServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of GenAiTuningServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final GenAiTuningServiceClient create(GenAiTuningServiceSettings settings) + throws IOException { + return new GenAiTuningServiceClient(settings); + } + + /** + * Constructs an instance of GenAiTuningServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(GenAiTuningServiceSettings). + */ + public static final GenAiTuningServiceClient create(GenAiTuningServiceStub stub) { + return new GenAiTuningServiceClient(stub); + } + + /** + * Constructs an instance of GenAiTuningServiceClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GenAiTuningServiceClient(GenAiTuningServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((GenAiTuningServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected GenAiTuningServiceClient(GenAiTuningServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final GenAiTuningServiceSettings getSettings() { + return settings; + } + + public GenAiTuningServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   TuningJob tuningJob = TuningJob.newBuilder().build();
+   *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the TuningJob in. Format: + * `projects/{project}/locations/{location}` + * @param tuningJob Required. The TuningJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob createTuningJob(LocationName parent, TuningJob tuningJob) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTuningJob(tuningJob) + .build(); + return createTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   TuningJob tuningJob = TuningJob.newBuilder().build();
+   *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the TuningJob in. Format: + * `projects/{project}/locations/{location}` + * @param tuningJob Required. The TuningJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob createTuningJob(String parent, TuningJob tuningJob) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder().setParent(parent).setTuningJob(tuningJob).build(); + return createTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CreateTuningJobRequest request =
+   *       CreateTuningJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTuningJob(TuningJob.newBuilder().build())
+   *           .build();
+   *   TuningJob response = genAiTuningServiceClient.createTuningJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob createTuningJob(CreateTuningJobRequest request) { + return createTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to be run. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CreateTuningJobRequest request =
+   *       CreateTuningJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setTuningJob(TuningJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.createTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   TuningJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createTuningJobCallable() { + return stub.createTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
+   *   TuningJob response = genAiTuningServiceClient.getTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob getTuningJob(TuningJobName name) { + GetTuningJobRequest request = + GetTuningJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString();
+   *   TuningJob response = genAiTuningServiceClient.getTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob getTuningJob(String name) { + GetTuningJobRequest request = GetTuningJobRequest.newBuilder().setName(name).build(); + return getTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetTuningJobRequest request =
+   *       GetTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   TuningJob response = genAiTuningServiceClient.getTuningJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TuningJob getTuningJob(GetTuningJobRequest request) { + return getTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a TuningJob. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetTuningJobRequest request =
+   *       GetTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.getTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   TuningJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getTuningJobCallable() { + return stub.getTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the TuningJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTuningJobsPagedResponse listTuningJobs(LocationName parent) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTuningJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the TuningJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTuningJobsPagedResponse listTuningJobs(String parent) { + ListTuningJobsRequest request = ListTuningJobsRequest.newBuilder().setParent(parent).build(); + return listTuningJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListTuningJobsRequest request =
+   *       ListTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (TuningJob element : genAiTuningServiceClient.listTuningJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTuningJobsPagedResponse listTuningJobs(ListTuningJobsRequest request) { + return listTuningJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListTuningJobsRequest request =
+   *       ListTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.listTuningJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TuningJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTuningJobsPagedCallable() { + return stub.listTuningJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists TuningJobs in a Location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListTuningJobsRequest request =
+   *       ListTuningJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListTuningJobsResponse response =
+   *         genAiTuningServiceClient.listTuningJobsCallable().call(request);
+   *     for (TuningJob element : response.getTuningJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTuningJobsCallable() { + return stub.listTuningJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set + * to `CANCELLED`. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]");
+   *   genAiTuningServiceClient.cancelTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTuningJob(TuningJobName name) { + CancelTuningJobRequest request = + CancelTuningJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + cancelTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set + * to `CANCELLED`. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString();
+   *   genAiTuningServiceClient.cancelTuningJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTuningJob(String name) { + CancelTuningJobRequest request = CancelTuningJobRequest.newBuilder().setName(name).build(); + cancelTuningJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set + * to `CANCELLED`. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CancelTuningJobRequest request =
+   *       CancelTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   genAiTuningServiceClient.cancelTuningJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelTuningJob(CancelTuningJobRequest request) { + cancelTuningJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a TuningJob. Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the job completed + * despite cancellation. On successful cancellation, the TuningJob is not deleted; instead it + * becomes a job with a [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value + * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set + * to `CANCELLED`. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   CancelTuningJobRequest request =
+   *       CancelTuningJobRequest.newBuilder()
+   *           .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.cancelTuningJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable cancelTuningJobCallable() { + return stub.cancelTuningJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : genAiTuningServiceClient.listLocations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         genAiTuningServiceClient.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 UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = genAiTuningServiceClient.getLocation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Policy response = genAiTuningServiceClient.setIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = genAiTuningServiceClient.getIamPolicy(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = genAiTuningServiceClient.testIamPermissions(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *

Sample code: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       genAiTuningServiceClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTuningJobsPagedResponse + extends AbstractPagedListResponse< + ListTuningJobsRequest, + ListTuningJobsResponse, + TuningJob, + ListTuningJobsPage, + ListTuningJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTuningJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListTuningJobsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListTuningJobsPagedResponse(ListTuningJobsPage page) { + super(page, ListTuningJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTuningJobsPage + extends AbstractPage< + ListTuningJobsRequest, ListTuningJobsResponse, TuningJob, ListTuningJobsPage> { + + private ListTuningJobsPage( + PageContext context, + ListTuningJobsResponse response) { + super(context, response); + } + + private static ListTuningJobsPage createEmptyPage() { + return new ListTuningJobsPage(null, null); + } + + @Override + protected ListTuningJobsPage createPage( + PageContext context, + ListTuningJobsResponse response) { + return new ListTuningJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTuningJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTuningJobsRequest, + ListTuningJobsResponse, + TuningJob, + ListTuningJobsPage, + ListTuningJobsFixedSizeCollection> { + + private ListTuningJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTuningJobsFixedSizeCollection createEmptyCollection() { + return new ListTuningJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListTuningJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTuningJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceSettings.java new file mode 100644 index 000000000000..3c59b58d4464 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceSettings.java @@ -0,0 +1,290 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.aiplatform.v1beta1.stub.GenAiTuningServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GenAiTuningServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTuningJob to 30 seconds: + * + *

{@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
+ * GenAiTuningServiceSettings.Builder genAiTuningServiceSettingsBuilder =
+ *     GenAiTuningServiceSettings.newBuilder();
+ * genAiTuningServiceSettingsBuilder
+ *     .createTuningJobSettings()
+ *     .setRetrySettings(
+ *         genAiTuningServiceSettingsBuilder
+ *             .createTuningJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GenAiTuningServiceSettings genAiTuningServiceSettings =
+ *     genAiTuningServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class GenAiTuningServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTuningJob. */ + public UnaryCallSettings createTuningJobSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).createTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to getTuningJob. */ + public UnaryCallSettings getTuningJobSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).getTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to listTuningJobs. */ + public PagedCallSettings< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).listTuningJobsSettings(); + } + + /** Returns the object with the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings cancelTuningJobSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).cancelTuningJobSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((GenAiTuningServiceStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + public static final GenAiTuningServiceSettings create(GenAiTuningServiceStubSettings stub) + throws IOException { + return new GenAiTuningServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return GenAiTuningServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return GenAiTuningServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return GenAiTuningServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return GenAiTuningServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GenAiTuningServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for GenAiTuningServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(GenAiTuningServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(GenAiTuningServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(GenAiTuningServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(GenAiTuningServiceStubSettings.newBuilder()); + } + + public GenAiTuningServiceStubSettings.Builder getStubSettingsBuilder() { + return ((GenAiTuningServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTuningJob. */ + public UnaryCallSettings.Builder createTuningJobSettings() { + return getStubSettingsBuilder().createTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to getTuningJob. */ + public UnaryCallSettings.Builder getTuningJobSettings() { + return getStubSettingsBuilder().getTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to listTuningJobs. */ + public PagedCallSettings.Builder< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return getStubSettingsBuilder().listTuningJobsSettings(); + } + + /** Returns the builder for the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings.Builder cancelTuningJobSettings() { + return getStubSettingsBuilder().cancelTuningJobSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + @Override + public GenAiTuningServiceSettings build() throws IOException { + return new GenAiTuningServiceSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json index 1cb2b770c896..92d2c6f719c7 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json @@ -539,6 +539,42 @@ } } }, + "GenAiTuningService": { + "clients": { + "grpc": { + "libraryClient": "GenAiTuningServiceClient", + "rpcs": { + "CancelTuningJob": { + "methods": ["cancelTuningJob", "cancelTuningJob", "cancelTuningJob", "cancelTuningJobCallable"] + }, + "CreateTuningJob": { + "methods": ["createTuningJob", "createTuningJob", "createTuningJob", "createTuningJobCallable"] + }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetTuningJob": { + "methods": ["getTuningJob", "getTuningJob", "getTuningJob", "getTuningJobCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListTuningJobs": { + "methods": ["listTuningJobs", "listTuningJobs", "listTuningJobs", "listTuningJobsPagedCallable", "listTuningJobsCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + }, "IndexEndpointService": { "clients": { "grpc": { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java index 345bdac75ae7..00a95b1013cc 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/package-info.java @@ -240,6 +240,25 @@ * } * } * + *

======================= GenAiTuningServiceClient ======================= + * + *

Service Description: A service for creating and managing GenAI Tuning Jobs. + * + *

Sample for GenAiTuningServiceClient: + * + *

{@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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   TuningJob tuningJob = TuningJob.newBuilder().build();
+ *   TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob);
+ * }
+ * }
+ * *

======================= IndexEndpointServiceClient ======================= * *

Service Description: A service for managing Vertex AI's IndexEndpoints. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStub.java new file mode 100644 index 000000000000..ac9737507858 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStub.java @@ -0,0 +1,102 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the GenAiTuningService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class GenAiTuningServiceStub implements BackgroundResource { + + public UnaryCallable createTuningJobCallable() { + throw new UnsupportedOperationException("Not implemented: createTuningJobCallable()"); + } + + public UnaryCallable getTuningJobCallable() { + throw new UnsupportedOperationException("Not implemented: getTuningJobCallable()"); + } + + public UnaryCallable + listTuningJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTuningJobsPagedCallable()"); + } + + public UnaryCallable listTuningJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listTuningJobsCallable()"); + } + + public UnaryCallable cancelTuningJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelTuningJobCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStubSettings.java new file mode 100644 index 000000000000..337040eabe6e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GenAiTuningServiceStubSettings.java @@ -0,0 +1,602 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link GenAiTuningServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (aiplatform.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of createTuningJob to 30 seconds: + * + *

{@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
+ * GenAiTuningServiceStubSettings.Builder genAiTuningServiceSettingsBuilder =
+ *     GenAiTuningServiceStubSettings.newBuilder();
+ * genAiTuningServiceSettingsBuilder
+ *     .createTuningJobSettings()
+ *     .setRetrySettings(
+ *         genAiTuningServiceSettingsBuilder
+ *             .createTuningJobSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * GenAiTuningServiceStubSettings genAiTuningServiceSettings =
+ *     genAiTuningServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class GenAiTuningServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createTuningJobSettings; + private final UnaryCallSettings getTuningJobSettings; + private final PagedCallSettings< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings; + private final UnaryCallSettings cancelTuningJobSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + + private static final PagedListDescriptor + LIST_TUNING_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTuningJobsRequest injectToken(ListTuningJobsRequest payload, String token) { + return ListTuningJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTuningJobsRequest injectPageSize( + ListTuningJobsRequest payload, int pageSize) { + return ListTuningJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTuningJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTuningJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTuningJobsResponse payload) { + return payload.getTuningJobsList() == null + ? ImmutableList.of() + : payload.getTuningJobsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + LIST_TUNING_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTuningJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TUNING_JOBS_PAGE_STR_DESC, request, context); + return ListTuningJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createTuningJob. */ + public UnaryCallSettings createTuningJobSettings() { + return createTuningJobSettings; + } + + /** Returns the object with the settings used for calls to getTuningJob. */ + public UnaryCallSettings getTuningJobSettings() { + return getTuningJobSettings; + } + + /** Returns the object with the settings used for calls to listTuningJobs. */ + public PagedCallSettings< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return listTuningJobsSettings; + } + + /** Returns the object with the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings cancelTuningJobSettings() { + return cancelTuningJobSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + public GenAiTuningServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcGenAiTuningServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "aiplatform.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "aiplatform.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(GenAiTuningServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected GenAiTuningServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createTuningJobSettings = settingsBuilder.createTuningJobSettings().build(); + getTuningJobSettings = settingsBuilder.getTuningJobSettings().build(); + listTuningJobsSettings = settingsBuilder.listTuningJobsSettings().build(); + cancelTuningJobSettings = settingsBuilder.cancelTuningJobSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + } + + /** Builder for GenAiTuningServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createTuningJobSettings; + private final UnaryCallSettings.Builder getTuningJobSettings; + private final PagedCallSettings.Builder< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings; + private final UnaryCallSettings.Builder cancelTuningJobSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTuningJobsSettings = PagedCallSettings.newBuilder(LIST_TUNING_JOBS_PAGE_STR_FACT); + cancelTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTuningJobSettings, + getTuningJobSettings, + listTuningJobsSettings, + cancelTuningJobSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + initDefaults(this); + } + + protected Builder(GenAiTuningServiceStubSettings settings) { + super(settings); + + createTuningJobSettings = settings.createTuningJobSettings.toBuilder(); + getTuningJobSettings = settings.getTuningJobSettings.toBuilder(); + listTuningJobsSettings = settings.listTuningJobsSettings.toBuilder(); + cancelTuningJobSettings = settings.cancelTuningJobSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createTuningJobSettings, + getTuningJobSettings, + listTuningJobsSettings, + cancelTuningJobSettings, + listLocationsSettings, + getLocationSettings, + setIamPolicySettings, + getIamPolicySettings, + testIamPermissionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listTuningJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelTuningJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTuningJob. */ + public UnaryCallSettings.Builder createTuningJobSettings() { + return createTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to getTuningJob. */ + public UnaryCallSettings.Builder getTuningJobSettings() { + return getTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to listTuningJobs. */ + public PagedCallSettings.Builder< + ListTuningJobsRequest, ListTuningJobsResponse, ListTuningJobsPagedResponse> + listTuningJobsSettings() { + return listTuningJobsSettings; + } + + /** Returns the builder for the settings used for calls to cancelTuningJob. */ + public UnaryCallSettings.Builder cancelTuningJobSettings() { + return cancelTuningJobSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + @Override + public GenAiTuningServiceStubSettings build() throws IOException { + return new GenAiTuningServiceStubSettings(this); + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceCallableFactory.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceCallableFactory.java new file mode 100644 index 000000000000..e6c92b7cf76e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the GenAiTuningService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcGenAiTuningServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceStub.java new file mode 100644 index 000000000000..a46d21ca8939 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcGenAiTuningServiceStub.java @@ -0,0 +1,440 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.stub; + +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the GenAiTuningService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcGenAiTuningServiceStub extends GenAiTuningServiceStub { + private static final MethodDescriptor + createTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.GenAiTuningService/CreateTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TuningJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.GenAiTuningService/GetTuningJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TuningJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTuningJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.GenAiTuningService/ListTuningJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTuningJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTuningJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelTuningJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.aiplatform.v1beta1.GenAiTuningService/CancelTuningJob") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelTuningJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.iam.v1.IAMPolicy/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable createTuningJobCallable; + private final UnaryCallable getTuningJobCallable; + private final UnaryCallable listTuningJobsCallable; + private final UnaryCallable + listTuningJobsPagedCallable; + private final UnaryCallable cancelTuningJobCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcGenAiTuningServiceStub create(GenAiTuningServiceStubSettings settings) + throws IOException { + return new GrpcGenAiTuningServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcGenAiTuningServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcGenAiTuningServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcGenAiTuningServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcGenAiTuningServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcGenAiTuningServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcGenAiTuningServiceStub( + GenAiTuningServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTuningJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTuningJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listTuningJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTuningJobsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings cancelTuningJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelTuningJobMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .build(); + + this.createTuningJobCallable = + callableFactory.createUnaryCallable( + createTuningJobTransportSettings, settings.createTuningJobSettings(), clientContext); + this.getTuningJobCallable = + callableFactory.createUnaryCallable( + getTuningJobTransportSettings, settings.getTuningJobSettings(), clientContext); + this.listTuningJobsCallable = + callableFactory.createUnaryCallable( + listTuningJobsTransportSettings, settings.listTuningJobsSettings(), clientContext); + this.listTuningJobsPagedCallable = + callableFactory.createPagedCallable( + listTuningJobsTransportSettings, settings.listTuningJobsSettings(), clientContext); + this.cancelTuningJobCallable = + callableFactory.createUnaryCallable( + cancelTuningJobTransportSettings, settings.cancelTuningJobSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createTuningJobCallable() { + return createTuningJobCallable; + } + + @Override + public UnaryCallable getTuningJobCallable() { + return getTuningJobCallable; + } + + @Override + public UnaryCallable listTuningJobsCallable() { + return listTuningJobsCallable; + } + + @Override + public UnaryCallable + listTuningJobsPagedCallable() { + return listTuningJobsPagedCallable; + } + + @Override + public UnaryCallable cancelTuningJobCallable() { + return cancelTuningJobCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json index f50db26d721a..4f769e8c19e1 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json @@ -1736,6 +1736,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.Candidate", "queryAllDeclaredConstructors": true, @@ -3257,6 +3275,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.CsvDestination", "queryAllDeclaredConstructors": true, @@ -8297,6 +8333,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.GoogleDriveSource", "queryAllDeclaredConstructors": true, @@ -11033,6 +11087,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.LookupStudyRequest", "queryAllDeclaredConstructors": true, @@ -17819,6 +17909,105 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters$AdapterSize", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution$DatasetBucket", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution$DatasetBucket$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.SyncFeatureViewRequest", "queryAllDeclaredConstructors": true, @@ -18674,6 +18863,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TunedModel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TunedModel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TuningDataStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TuningDataStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TuningJob", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.aiplatform.v1beta1.TuningJob$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.Type", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClientTest.java new file mode 100644 index 000000000000..5fa90f9b531e --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceClientTest.java @@ -0,0 +1,744 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListLocationsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient.ListTuningJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.ByteString; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class GenAiTuningServiceClientTest { + private static MockGenAiTuningService mockGenAiTuningService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private GenAiTuningServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockGenAiTuningService = new MockGenAiTuningService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockGenAiTuningService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + GenAiTuningServiceSettings settings = + GenAiTuningServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = GenAiTuningServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createTuningJobTest() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TuningJob tuningJob = TuningJob.newBuilder().build(); + + TuningJob actualResponse = client.createTuningJob(parent, tuningJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTuningJobRequest actualRequest = ((CreateTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(tuningJob, actualRequest.getTuningJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TuningJob tuningJob = TuningJob.newBuilder().build(); + client.createTuningJob(parent, tuningJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTuningJobTest2() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + TuningJob tuningJob = TuningJob.newBuilder().build(); + + TuningJob actualResponse = client.createTuningJob(parent, tuningJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTuningJobRequest actualRequest = ((CreateTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(tuningJob, actualRequest.getTuningJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String parent = "parent-995424086"; + TuningJob tuningJob = TuningJob.newBuilder().build(); + client.createTuningJob(parent, tuningJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTuningJobTest() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + + TuningJob actualResponse = client.getTuningJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTuningJobRequest actualRequest = ((GetTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + client.getTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTuningJobTest2() throws Exception { + TuningJob expectedResponse = + TuningJob.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .setTunedModelDisplayName("tunedModelDisplayName759401232") + .setDescription("description-1724546052") + .setState(JobState.forNumber(0)) + .setCreateTime(Timestamp.newBuilder().build()) + .setStartTime(Timestamp.newBuilder().build()) + .setEndTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setError(Status.newBuilder().build()) + .putAllLabels(new HashMap()) + .setExperiment( + ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]") + .toString()) + .setTunedModel(TunedModel.newBuilder().build()) + .setTuningDataStats(TuningDataStats.newBuilder().build()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String name = "name3373707"; + + TuningJob actualResponse = client.getTuningJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTuningJobRequest actualRequest = ((GetTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String name = "name3373707"; + client.getTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTuningJobsTest() throws Exception { + TuningJob responsesElement = TuningJob.newBuilder().build(); + ListTuningJobsResponse expectedResponse = + ListTuningJobsResponse.newBuilder() + .setNextPageToken("") + .addAllTuningJobs(Arrays.asList(responsesElement)) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListTuningJobsPagedResponse pagedListResponse = client.listTuningJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTuningJobsList().get(0), resources.get(0)); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTuningJobsRequest actualRequest = ((ListTuningJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTuningJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listTuningJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTuningJobsTest2() throws Exception { + TuningJob responsesElement = TuningJob.newBuilder().build(); + ListTuningJobsResponse expectedResponse = + ListTuningJobsResponse.newBuilder() + .setNextPageToken("") + .addAllTuningJobs(Arrays.asList(responsesElement)) + .build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListTuningJobsPagedResponse pagedListResponse = client.listTuningJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTuningJobsList().get(0), resources.get(0)); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTuningJobsRequest actualRequest = ((ListTuningJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTuningJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTuningJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelTuningJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGenAiTuningService.addResponse(expectedResponse); + + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + + client.cancelTuningJob(name); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelTuningJobRequest actualRequest = ((CancelTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelTuningJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + client.cancelTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelTuningJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockGenAiTuningService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelTuningJob(name); + + List actualRequests = mockGenAiTuningService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelTuningJobRequest actualRequest = ((CancelTuningJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelTuningJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockGenAiTuningService.addException(exception); + + try { + String name = "name3373707"; + client.cancelTuningJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Policy actualResponse = client.setIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPolicy(), actualRequest.getPolicy()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.setIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockIAMPolicy.addResponse(expectedResponse); + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + + Policy actualResponse = client.getIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getOptions(), actualRequest.getOptions()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + client.getIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void testIamPermissionsTest() throws Exception { + TestIamPermissionsResponse expectedResponse = + TestIamPermissionsResponse.newBuilder().addAllPermissions(new ArrayList()).build(); + mockIAMPolicy.addResponse(expectedResponse); + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIAMPolicy.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = ((TestIamPermissionsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getResource(), actualRequest.getResource()); + Assert.assertEquals(request.getPermissionsList(), actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIAMPolicy.addException(exception); + + try { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + client.testIamPermissions(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningService.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningService.java new file mode 100644 index 000000000000..f48ab1625532 --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGenAiTuningService implements MockGrpcService { + private final MockGenAiTuningServiceImpl serviceImpl; + + public MockGenAiTuningService() { + serviceImpl = new MockGenAiTuningServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningServiceImpl.java new file mode 100644 index 000000000000..fa358a1a16af --- /dev/null +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockGenAiTuningServiceImpl.java @@ -0,0 +1,145 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceGrpc.GenAiTuningServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockGenAiTuningServiceImpl extends GenAiTuningServiceImplBase { + private List requests; + private Queue responses; + + public MockGenAiTuningServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTuningJob( + CreateTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TuningJob) { + requests.add(request); + responseObserver.onNext(((TuningJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTuningJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TuningJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTuningJob( + GetTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TuningJob) { + requests.add(request); + responseObserver.onNext(((TuningJob) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTuningJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TuningJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTuningJobs( + ListTuningJobsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListTuningJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListTuningJobsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTuningJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListTuningJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelTuningJob( + CancelTuningJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CancelTuningJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceGrpc.java new file mode 100644 index 000000000000..e3149be3c9af --- /dev/null +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceGrpc.java @@ -0,0 +1,782 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.aiplatform.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * A service for creating and managing GenAI Tuning Jobs.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class GenAiTuningServiceGrpc { + + private GenAiTuningServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.aiplatform.v1beta1.GenAiTuningService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob> + getCreateTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTuningJob", + requestType = com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.TuningJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob> + getCreateTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob> + getCreateTuningJobMethod; + if ((getCreateTuningJobMethod = GenAiTuningServiceGrpc.getCreateTuningJobMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getCreateTuningJobMethod = GenAiTuningServiceGrpc.getCreateTuningJobMethod) == null) { + GenAiTuningServiceGrpc.getCreateTuningJobMethod = + getCreateTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("CreateTuningJob")) + .build(); + } + } + } + return getCreateTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob> + getGetTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTuningJob", + requestType = com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.TuningJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob> + getGetTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob> + getGetTuningJobMethod; + if ((getGetTuningJobMethod = GenAiTuningServiceGrpc.getGetTuningJobMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getGetTuningJobMethod = GenAiTuningServiceGrpc.getGetTuningJobMethod) == null) { + GenAiTuningServiceGrpc.getGetTuningJobMethod = + getGetTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("GetTuningJob")) + .build(); + } + } + } + return getGetTuningJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse> + getListTuningJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTuningJobs", + requestType = com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse> + getListTuningJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse> + getListTuningJobsMethod; + if ((getListTuningJobsMethod = GenAiTuningServiceGrpc.getListTuningJobsMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getListTuningJobsMethod = GenAiTuningServiceGrpc.getListTuningJobsMethod) == null) { + GenAiTuningServiceGrpc.getListTuningJobsMethod = + getListTuningJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTuningJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("ListTuningJobs")) + .build(); + } + } + } + return getListTuningJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest, com.google.protobuf.Empty> + getCancelTuningJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelTuningJob", + requestType = com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest, com.google.protobuf.Empty> + getCancelTuningJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest, com.google.protobuf.Empty> + getCancelTuningJobMethod; + if ((getCancelTuningJobMethod = GenAiTuningServiceGrpc.getCancelTuningJobMethod) == null) { + synchronized (GenAiTuningServiceGrpc.class) { + if ((getCancelTuningJobMethod = GenAiTuningServiceGrpc.getCancelTuningJobMethod) == null) { + GenAiTuningServiceGrpc.getCancelTuningJobMethod = + getCancelTuningJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelTuningJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new GenAiTuningServiceMethodDescriptorSupplier("CancelTuningJob")) + .build(); + } + } + } + return getCancelTuningJobMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static GenAiTuningServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GenAiTuningServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceStub(channel, callOptions); + } + }; + return GenAiTuningServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GenAiTuningServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GenAiTuningServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceBlockingStub(channel, callOptions); + } + }; + return GenAiTuningServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static GenAiTuningServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public GenAiTuningServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceFutureStub(channel, callOptions); + } + }; + return GenAiTuningServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + default void createTuningJob( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + default void getTuningJob( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTuningJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + default void listTuningJobs( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTuningJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value
+     * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding
+     * to `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set
+     * to `CANCELLED`.
+     * 
+ */ + default void cancelTuningJob( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelTuningJobMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public abstract static class GenAiTuningServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return GenAiTuningServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public static final class GenAiTuningServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private GenAiTuningServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GenAiTuningServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + public void createTuningJob( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + public void getTuningJob( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + public void listTuningJobs( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTuningJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value
+     * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding
+     * to `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set
+     * to `CANCELLED`.
+     * 
+ */ + public void cancelTuningJob( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelTuningJobMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public static final class GenAiTuningServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private GenAiTuningServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GenAiTuningServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.TuningJob createTuningJob( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJob( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTuningJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse listTuningJobs( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTuningJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value
+     * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding
+     * to `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set
+     * to `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelTuningJob( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelTuningJobMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service GenAiTuningService. + * + *
+   * A service for creating and managing GenAI Tuning Jobs.
+   * 
+ */ + public static final class GenAiTuningServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private GenAiTuningServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GenAiTuningServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new GenAiTuningServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a TuningJob. A created TuningJob right away will be attempted to
+     * be run.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.TuningJob> + createTuningJob(com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTuningJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a TuningJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.TuningJob> + getTuningJob(com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTuningJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists TuningJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse> + listTuningJobs(com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTuningJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a TuningJob.
+     * Starts asynchronous cancellation on the TuningJob. The server makes a best
+     * effort to cancel the job, but success is not guaranteed. Clients can use
+     * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation, the
+     * TuningJob is not deleted; instead it becomes a job with a
+     * [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value
+     * with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding
+     * to `Code.CANCELLED`, and
+     * [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set
+     * to `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelTuningJob(com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelTuningJobMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TUNING_JOB = 0; + private static final int METHODID_GET_TUNING_JOB = 1; + private static final int METHODID_LIST_TUNING_JOBS = 2; + private static final int METHODID_CANCEL_TUNING_JOB = 3; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TUNING_JOB: + serviceImpl.createTuningJob( + (com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_TUNING_JOB: + serviceImpl.getTuningJob( + (com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TUNING_JOBS: + serviceImpl.listTuningJobs( + (com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse>) + responseObserver); + break; + case METHODID_CANCEL_TUNING_JOB: + serviceImpl.cancelTuningJob( + (com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateTuningJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob>( + service, METHODID_CREATE_TUNING_JOB))) + .addMethod( + getGetTuningJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest, + com.google.cloud.aiplatform.v1beta1.TuningJob>( + service, METHODID_GET_TUNING_JOB))) + .addMethod( + getListTuningJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse>( + service, METHODID_LIST_TUNING_JOBS))) + .addMethod( + getCancelTuningJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest, + com.google.protobuf.Empty>(service, METHODID_CANCEL_TUNING_JOB))) + .build(); + } + + private abstract static class GenAiTuningServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + GenAiTuningServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("GenAiTuningService"); + } + } + + private static final class GenAiTuningServiceFileDescriptorSupplier + extends GenAiTuningServiceBaseDescriptorSupplier { + GenAiTuningServiceFileDescriptorSupplier() {} + } + + private static final class GenAiTuningServiceMethodDescriptorSupplier + extends GenAiTuningServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + GenAiTuningServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (GenAiTuningServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new GenAiTuningServiceFileDescriptorSupplier()) + .addMethod(getCreateTuningJobMethod()) + .addMethod(getGetTuningJobMethod()) + .addMethod(getListTuningJobsMethod()) + .addMethod(getCancelTuningJobMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequest.java new file mode 100644 index 000000000000..cdd7148b2b46 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.CancelTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CancelTuningJobRequest} + */ +public final class CancelTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) + CancelTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelTuningJobRequest.newBuilder() to construct. + private CancelTuningJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelTuningJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest other = + (com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.CancelTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CancelTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest build() { + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest result = + new com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob to cancel. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequestOrBuilder.java new file mode 100644 index 000000000000..b60ebff4db0b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelTuningJobRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface CancelTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CancelTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TuningJob to cancel. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequest.java new file mode 100644 index 000000000000..74904694e8b9 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequest.java @@ -0,0 +1,953 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.CreateTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateTuningJobRequest} + */ +public final class CreateTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) + CreateTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTuningJobRequest.newBuilder() to construct. + private CreateTuningJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTuningJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTuningJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TUNING_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.TuningJob tuningJob_; + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tuningJob field is set. + */ + @java.lang.Override + public boolean hasTuningJob() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tuningJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJob() { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance() + : tuningJob_; + } + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder getTuningJobOrBuilder() { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance() + : tuningJob_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTuningJob()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTuningJob()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest other = + (com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTuningJob() != other.hasTuningJob()) return false; + if (hasTuningJob()) { + if (!getTuningJob().equals(other.getTuningJob())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTuningJob()) { + hash = (37 * hash) + TUNING_JOB_FIELD_NUMBER; + hash = (53 * hash) + getTuningJob().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.CreateTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTuningJobFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tuningJob_ = null; + if (tuningJobBuilder_ != null) { + tuningJobBuilder_.dispose(); + tuningJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest build() { + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest result = + new com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tuningJob_ = tuningJobBuilder_ == null ? tuningJob_ : tuningJobBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTuningJob()) { + mergeTuningJob(other.getTuningJob()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getTuningJobFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to create the TuningJob in.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.TuningJob tuningJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningJob, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder, + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder> + tuningJobBuilder_; + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tuningJob field is set. + */ + public boolean hasTuningJob() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tuningJob. + */ + public com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJob() { + if (tuningJobBuilder_ == null) { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance() + : tuningJob_; + } else { + return tuningJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTuningJob(com.google.cloud.aiplatform.v1beta1.TuningJob value) { + if (tuningJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningJob_ = value; + } else { + tuningJobBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTuningJob( + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder builderForValue) { + if (tuningJobBuilder_ == null) { + tuningJob_ = builderForValue.build(); + } else { + tuningJobBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTuningJob(com.google.cloud.aiplatform.v1beta1.TuningJob value) { + if (tuningJobBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tuningJob_ != null + && tuningJob_ != com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance()) { + getTuningJobBuilder().mergeFrom(value); + } else { + tuningJob_ = value; + } + } else { + tuningJobBuilder_.mergeFrom(value); + } + if (tuningJob_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTuningJob() { + bitField0_ = (bitField0_ & ~0x00000002); + tuningJob_ = null; + if (tuningJobBuilder_ != null) { + tuningJobBuilder_.dispose(); + tuningJobBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.TuningJob.Builder getTuningJobBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTuningJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder getTuningJobOrBuilder() { + if (tuningJobBuilder_ != null) { + return tuningJobBuilder_.getMessageOrBuilder(); + } else { + return tuningJob_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance() + : tuningJob_; + } + } + /** + * + * + *
+     * Required. The TuningJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningJob, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder, + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder> + getTuningJobFieldBuilder() { + if (tuningJobBuilder_ == null) { + tuningJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningJob, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder, + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder>( + getTuningJob(), getParentForChildren(), isClean()); + tuningJob_ = null; + } + return tuningJobBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequestOrBuilder.java new file mode 100644 index 000000000000..da94bf67ab37 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateTuningJobRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to create the TuningJob in.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tuningJob field is set. + */ + boolean hasTuningJob(); + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tuningJob. + */ + com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJob(); + /** + * + * + *
+   * Required. The TuningJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder getTuningJobOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceProto.java new file mode 100644 index 000000000000..19b827b4b272 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GenAiTuningServiceProto.java @@ -0,0 +1,182 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public final class GenAiTuningServiceProto { + private GenAiTuningServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n:google/cloud/aiplatform/v1beta1/genai_" + + "tuning_service.proto\022\037google.cloud.aipla" + + "tform.v1beta1\032\034google/api/annotations.pr" + + "oto\032\027google/api/client.proto\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\0320google/cloud/aiplatform/v1beta" + + "1/tuning_job.proto\032\033google/protobuf/empt" + + "y.proto\"\230\001\n\026CreateTuningJobRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\022C\n\ntuning_job\030\002 \001(\0132*.goog" + + "le.cloud.aiplatform.v1beta1.TuningJobB\003\340" + + "A\002\"P\n\023GetTuningJobRequest\0229\n\004name\030\001 \001(\tB" + + "+\340A\002\372A%\n#aiplatform.googleapis.com/Tunin" + + "gJob\"\230\001\n\025ListTuningJobsRequest\0229\n\006parent" + + "\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com" + + "/Location\022\023\n\006filter\030\002 \001(\tB\003\340A\001\022\026\n\tpage_s" + + "ize\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"" + + "r\n\026ListTuningJobsResponse\022?\n\013tuning_jobs" + + "\030\001 \003(\0132*.google.cloud.aiplatform.v1beta1" + + ".TuningJob\022\027\n\017next_page_token\030\002 \001(\t\"S\n\026C" + + "ancelTuningJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002" + + "\372A%\n#aiplatform.googleapis.com/TuningJob" + + "2\355\006\n\022GenAiTuningService\022\323\001\n\017CreateTuning" + + "Job\0227.google.cloud.aiplatform.v1beta1.Cr" + + "eateTuningJobRequest\032*.google.cloud.aipl" + + "atform.v1beta1.TuningJob\"[\332A\021parent,tuni" + + "ng_job\202\323\344\223\002A\"3/v1beta1/{parent=projects/" + + "*/locations/*}/tuningJobs:\ntuning_job\022\264\001" + + "\n\014GetTuningJob\0224.google.cloud.aiplatform" + + ".v1beta1.GetTuningJobRequest\032*.google.cl" + + "oud.aiplatform.v1beta1.TuningJob\"B\332A\004nam" + + "e\202\323\344\223\0025\0223/v1beta1/{name=projects/*/locat" + + "ions/*/tuningJobs/*}\022\307\001\n\016ListTuningJobs\022" + + "6.google.cloud.aiplatform.v1beta1.ListTu" + + "ningJobsRequest\0327.google.cloud.aiplatfor" + + "m.v1beta1.ListTuningJobsResponse\"D\332A\006par" + + "ent\202\323\344\223\0025\0223/v1beta1/{parent=projects/*/l" + + "ocations/*}/tuningJobs\022\260\001\n\017CancelTuningJ" + + "ob\0227.google.cloud.aiplatform.v1beta1.Can" + + "celTuningJobRequest\032\026.google.protobuf.Em" + + "pty\"L\332A\004name\202\323\344\223\002?\":/v1beta1/{name=proje" + + "cts/*/locations/*/tuningJobs/*}:cancel:\001" + + "*\032M\312A\031aiplatform.googleapis.com\322A.https:" + + "//www.googleapis.com/auth/cloud-platform" + + "B\356\001\n#com.google.cloud.aiplatform.v1beta1" + + "B\027GenAiTuningServiceProtoP\001ZCcloud.googl" + + "e.com/go/aiplatform/apiv1beta1/aiplatfor" + + "mpb;aiplatformpb\252\002\037Google.Cloud.AIPlatfo" + + "rm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1b" + + "eta1\352\002\"Google::Cloud::AIPlatform::V1beta" + + "1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.TuningJobProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CreateTuningJobRequest_descriptor, + new java.lang.String[] { + "Parent", "TuningJob", + }); + internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_descriptor, + new java.lang.String[] { + "TuningJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CancelTuningJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.TuningJobProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequest.java new file mode 100644 index 000000000000..bbcef0ecee6a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequest.java @@ -0,0 +1,649 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetTuningJobRequest} + */ +public final class GetTuningJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetTuningJobRequest) + GetTuningJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTuningJobRequest.newBuilder() to construct. + private GetTuningJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTuningJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTuningJobRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.class, + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest other = + (com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetTuningJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetTuningJobRequest) + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.class, + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetTuningJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest build() { + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest result = + new com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the TuningJob resource. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.GetTuningJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetTuningJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTuningJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequestOrBuilder.java new file mode 100644 index 000000000000..4de1cbf5ba20 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetTuningJobRequestOrBuilder.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface GetTuningJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetTuningJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the TuningJob resource. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequest.java new file mode 100644 index 000000000000..49fdaa688b1a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequest.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1beta1.GenAiTuningService.ListTuningJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListTuningJobsRequest} + */ +public final class ListTuningJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) + ListTuningJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTuningJobsRequest.newBuilder() to construct. + private ListTuningJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTuningJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTuningJobsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest other = + (com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for
+   * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1beta1.GenAiTuningService.ListTuningJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListTuningJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest build() { + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest result = + new com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location to list the TuningJobs from.
+     * Format: `projects/{project}/locations/{location}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list filter.
+     * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page size.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The standard list page token.
+     * Typically obtained via [ListTuningJob.next_page_token][] of the
+     * previous GenAiTuningService.ListTuningJob][] call.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTuningJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequestOrBuilder.java new file mode 100644 index 000000000000..748772ae8e34 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListTuningJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListTuningJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location to list the TuningJobs from.
+   * Format: `projects/{project}/locations/{location}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. The standard list filter.
+   * 
+ * + * string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The standard list page size.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The standard list page token.
+   * Typically obtained via [ListTuningJob.next_page_token][] of the
+   * previous GenAiTuningService.ListTuningJob][] call.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponse.java new file mode 100644 index 000000000000..5e010d6afd62 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponse.java @@ -0,0 +1,1145 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1beta1.GenAiTuningService.ListTuningJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListTuningJobsResponse} + */ +public final class ListTuningJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) + ListTuningJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTuningJobsResponse.newBuilder() to construct. + private ListTuningJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTuningJobsResponse() { + tuningJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTuningJobsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.Builder.class); + } + + public static final int TUNING_JOBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tuningJobs_; + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public java.util.List getTuningJobsList() { + return tuningJobs_; + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public java.util.List + getTuningJobsOrBuilderList() { + return tuningJobs_; + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public int getTuningJobsCount() { + return tuningJobs_.size(); + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJobs(int index) { + return tuningJobs_.get(index); + } + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder getTuningJobsOrBuilder(int index) { + return tuningJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tuningJobs_.size(); i++) { + output.writeMessage(1, tuningJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tuningJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tuningJobs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse other = + (com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) obj; + + if (!getTuningJobsList().equals(other.getTuningJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTuningJobsCount() > 0) { + hash = (37 * hash) + TUNING_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getTuningJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for
+   * [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1beta1.GenAiTuningService.ListTuningJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListTuningJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (tuningJobsBuilder_ == null) { + tuningJobs_ = java.util.Collections.emptyList(); + } else { + tuningJobs_ = null; + tuningJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListTuningJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse build() { + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse result = + new com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse result) { + if (tuningJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tuningJobs_ = java.util.Collections.unmodifiableList(tuningJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tuningJobs_ = tuningJobs_; + } else { + result.tuningJobs_ = tuningJobsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse.getDefaultInstance()) + return this; + if (tuningJobsBuilder_ == null) { + if (!other.tuningJobs_.isEmpty()) { + if (tuningJobs_.isEmpty()) { + tuningJobs_ = other.tuningJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTuningJobsIsMutable(); + tuningJobs_.addAll(other.tuningJobs_); + } + onChanged(); + } + } else { + if (!other.tuningJobs_.isEmpty()) { + if (tuningJobsBuilder_.isEmpty()) { + tuningJobsBuilder_.dispose(); + tuningJobsBuilder_ = null; + tuningJobs_ = other.tuningJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + tuningJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTuningJobsFieldBuilder() + : null; + } else { + tuningJobsBuilder_.addAllMessages(other.tuningJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.aiplatform.v1beta1.TuningJob m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.TuningJob.parser(), extensionRegistry); + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.add(m); + } else { + tuningJobsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List tuningJobs_ = + java.util.Collections.emptyList(); + + private void ensureTuningJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tuningJobs_ = + new java.util.ArrayList(tuningJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningJob, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder, + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder> + tuningJobsBuilder_; + + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public java.util.List getTuningJobsList() { + if (tuningJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tuningJobs_); + } else { + return tuningJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public int getTuningJobsCount() { + if (tuningJobsBuilder_ == null) { + return tuningJobs_.size(); + } else { + return tuningJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJobs(int index) { + if (tuningJobsBuilder_ == null) { + return tuningJobs_.get(index); + } else { + return tuningJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder setTuningJobs(int index, com.google.cloud.aiplatform.v1beta1.TuningJob value) { + if (tuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTuningJobsIsMutable(); + tuningJobs_.set(index, value); + onChanged(); + } else { + tuningJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder setTuningJobs( + int index, com.google.cloud.aiplatform.v1beta1.TuningJob.Builder builderForValue) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + tuningJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs(com.google.cloud.aiplatform.v1beta1.TuningJob value) { + if (tuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTuningJobsIsMutable(); + tuningJobs_.add(value); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs(int index, com.google.cloud.aiplatform.v1beta1.TuningJob value) { + if (tuningJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTuningJobsIsMutable(); + tuningJobs_.add(index, value); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs( + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder builderForValue) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.add(builderForValue.build()); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder addTuningJobs( + int index, com.google.cloud.aiplatform.v1beta1.TuningJob.Builder builderForValue) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + tuningJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder addAllTuningJobs( + java.lang.Iterable values) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tuningJobs_); + onChanged(); + } else { + tuningJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder clearTuningJobs() { + if (tuningJobsBuilder_ == null) { + tuningJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tuningJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public Builder removeTuningJobs(int index) { + if (tuningJobsBuilder_ == null) { + ensureTuningJobsIsMutable(); + tuningJobs_.remove(index); + onChanged(); + } else { + tuningJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TuningJob.Builder getTuningJobsBuilder(int index) { + return getTuningJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder getTuningJobsOrBuilder( + int index) { + if (tuningJobsBuilder_ == null) { + return tuningJobs_.get(index); + } else { + return tuningJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public java.util.List + getTuningJobsOrBuilderList() { + if (tuningJobsBuilder_ != null) { + return tuningJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tuningJobs_); + } + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TuningJob.Builder addTuningJobsBuilder() { + return getTuningJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.TuningJob.Builder addTuningJobsBuilder(int index) { + return getTuningJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of TuningJobs in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + public java.util.List + getTuningJobsBuilderList() { + return getTuningJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningJob, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder, + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder> + getTuningJobsFieldBuilder() { + if (tuningJobsBuilder_ == null) { + tuningJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningJob, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder, + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder>( + tuningJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tuningJobs_ = null; + } + return tuningJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+     * to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTuningJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponseOrBuilder.java new file mode 100644 index 000000000000..c10c4908ca5e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListTuningJobsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/genai_tuning_service.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface ListTuningJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListTuningJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + java.util.List getTuningJobsList(); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + com.google.cloud.aiplatform.v1beta1.TuningJob getTuningJobs(int index); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + int getTuningJobsCount(); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + java.util.List + getTuningJobsOrBuilderList(); + /** + * + * + *
+   * List of TuningJobs in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.TuningJob tuning_jobs = 1; + */ + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder getTuningJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token]
+   * to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParameters.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParameters.java new file mode 100644 index 000000000000..b31607cec62e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParameters.java @@ -0,0 +1,1022 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Hyperparameters for SFT.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedHyperParameters} + */ +public final class SupervisedHyperParameters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) + SupervisedHyperParametersOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedHyperParameters.newBuilder() to construct. + private SupervisedHyperParameters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedHyperParameters() { + adapterSize_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedHyperParameters(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.class, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder.class); + } + + /** + * + * + *
+   * Supported adapter sizes for tuning.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize} + */ + public enum AdapterSize implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Adapter size is unspecified.
+     * 
+ * + * ADAPTER_SIZE_UNSPECIFIED = 0; + */ + ADAPTER_SIZE_UNSPECIFIED(0), + /** + * + * + *
+     * Adapter size 1.
+     * 
+ * + * ADAPTER_SIZE_ONE = 1; + */ + ADAPTER_SIZE_ONE(1), + /** + * + * + *
+     * Adapter size 4.
+     * 
+ * + * ADAPTER_SIZE_FOUR = 2; + */ + ADAPTER_SIZE_FOUR(2), + /** + * + * + *
+     * Adapter size 8.
+     * 
+ * + * ADAPTER_SIZE_EIGHT = 3; + */ + ADAPTER_SIZE_EIGHT(3), + /** + * + * + *
+     * Adapter size 16.
+     * 
+ * + * ADAPTER_SIZE_SIXTEEN = 4; + */ + ADAPTER_SIZE_SIXTEEN(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Adapter size is unspecified.
+     * 
+ * + * ADAPTER_SIZE_UNSPECIFIED = 0; + */ + public static final int ADAPTER_SIZE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Adapter size 1.
+     * 
+ * + * ADAPTER_SIZE_ONE = 1; + */ + public static final int ADAPTER_SIZE_ONE_VALUE = 1; + /** + * + * + *
+     * Adapter size 4.
+     * 
+ * + * ADAPTER_SIZE_FOUR = 2; + */ + public static final int ADAPTER_SIZE_FOUR_VALUE = 2; + /** + * + * + *
+     * Adapter size 8.
+     * 
+ * + * ADAPTER_SIZE_EIGHT = 3; + */ + public static final int ADAPTER_SIZE_EIGHT_VALUE = 3; + /** + * + * + *
+     * Adapter size 16.
+     * 
+ * + * ADAPTER_SIZE_SIXTEEN = 4; + */ + public static final int ADAPTER_SIZE_SIXTEEN_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AdapterSize valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AdapterSize forNumber(int value) { + switch (value) { + case 0: + return ADAPTER_SIZE_UNSPECIFIED; + case 1: + return ADAPTER_SIZE_ONE; + case 2: + return ADAPTER_SIZE_FOUR; + case 3: + return ADAPTER_SIZE_EIGHT; + case 4: + return ADAPTER_SIZE_SIXTEEN; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AdapterSize findValueByNumber(int number) { + return AdapterSize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AdapterSize[] VALUES = values(); + + public static AdapterSize valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AdapterSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize) + } + + public static final int EPOCH_COUNT_FIELD_NUMBER = 1; + private long epochCount_ = 0L; + /** + * + * + *
+   * Optional. Number of complete passes the model makes over the entire
+   * training dataset during training.
+   * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The epochCount. + */ + @java.lang.Override + public long getEpochCount() { + return epochCount_; + } + + public static final int LEARNING_RATE_MULTIPLIER_FIELD_NUMBER = 2; + private double learningRateMultiplier_ = 0D; + /** + * + * + *
+   * Optional. Multiplier for adjusting the default learning rate.
+   * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The learningRateMultiplier. + */ + @java.lang.Override + public double getLearningRateMultiplier() { + return learningRateMultiplier_; + } + + public static final int ADAPTER_SIZE_FIELD_NUMBER = 3; + private int adapterSize_ = 0; + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for adapterSize. + */ + @java.lang.Override + public int getAdapterSizeValue() { + return adapterSize_; + } + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The adapterSize. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize + getAdapterSize() { + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize result = + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize.forNumber( + adapterSize_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (epochCount_ != 0L) { + output.writeInt64(1, epochCount_); + } + if (java.lang.Double.doubleToRawLongBits(learningRateMultiplier_) != 0) { + output.writeDouble(2, learningRateMultiplier_); + } + if (adapterSize_ + != com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize + .ADAPTER_SIZE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, adapterSize_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (epochCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, epochCount_); + } + if (java.lang.Double.doubleToRawLongBits(learningRateMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, learningRateMultiplier_); + } + if (adapterSize_ + != com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize + .ADAPTER_SIZE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, adapterSize_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters other = + (com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) obj; + + if (getEpochCount() != other.getEpochCount()) return false; + if (java.lang.Double.doubleToLongBits(getLearningRateMultiplier()) + != java.lang.Double.doubleToLongBits(other.getLearningRateMultiplier())) return false; + if (adapterSize_ != other.adapterSize_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EPOCH_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEpochCount()); + hash = (37 * hash) + LEARNING_RATE_MULTIPLIER_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLearningRateMultiplier())); + hash = (37 * hash) + ADAPTER_SIZE_FIELD_NUMBER; + hash = (53 * hash) + adapterSize_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Hyperparameters for SFT.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedHyperParameters} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.class, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + epochCount_ = 0L; + learningRateMultiplier_ = 0D; + adapterSize_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters build() { + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters buildPartial() { + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters result = + new com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.epochCount_ = epochCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.learningRateMultiplier_ = learningRateMultiplier_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.adapterSize_ = adapterSize_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters other) { + if (other + == com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDefaultInstance()) + return this; + if (other.getEpochCount() != 0L) { + setEpochCount(other.getEpochCount()); + } + if (other.getLearningRateMultiplier() != 0D) { + setLearningRateMultiplier(other.getLearningRateMultiplier()); + } + if (other.adapterSize_ != 0) { + setAdapterSizeValue(other.getAdapterSizeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + epochCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + learningRateMultiplier_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: + { + adapterSize_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long epochCount_; + /** + * + * + *
+     * Optional. Number of complete passes the model makes over the entire
+     * training dataset during training.
+     * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The epochCount. + */ + @java.lang.Override + public long getEpochCount() { + return epochCount_; + } + /** + * + * + *
+     * Optional. Number of complete passes the model makes over the entire
+     * training dataset during training.
+     * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The epochCount to set. + * @return This builder for chaining. + */ + public Builder setEpochCount(long value) { + + epochCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Number of complete passes the model makes over the entire
+     * training dataset during training.
+     * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEpochCount() { + bitField0_ = (bitField0_ & ~0x00000001); + epochCount_ = 0L; + onChanged(); + return this; + } + + private double learningRateMultiplier_; + /** + * + * + *
+     * Optional. Multiplier for adjusting the default learning rate.
+     * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The learningRateMultiplier. + */ + @java.lang.Override + public double getLearningRateMultiplier() { + return learningRateMultiplier_; + } + /** + * + * + *
+     * Optional. Multiplier for adjusting the default learning rate.
+     * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The learningRateMultiplier to set. + * @return This builder for chaining. + */ + public Builder setLearningRateMultiplier(double value) { + + learningRateMultiplier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Multiplier for adjusting the default learning rate.
+     * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLearningRateMultiplier() { + bitField0_ = (bitField0_ & ~0x00000002); + learningRateMultiplier_ = 0D; + onChanged(); + return this; + } + + private int adapterSize_ = 0; + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for adapterSize. + */ + @java.lang.Override + public int getAdapterSizeValue() { + return adapterSize_; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for adapterSize to set. + * @return This builder for chaining. + */ + public Builder setAdapterSizeValue(int value) { + adapterSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The adapterSize. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize + getAdapterSize() { + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize result = + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize.forNumber( + adapterSize_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The adapterSize to set. + * @return This builder for chaining. + */ + public Builder setAdapterSize( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + adapterSize_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Adapter size for tuning.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdapterSize() { + bitField0_ = (bitField0_ & ~0x00000004); + adapterSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) + private static final com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters(); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedHyperParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParametersOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParametersOrBuilder.java new file mode 100644 index 000000000000..2454712ecc9e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedHyperParametersOrBuilder.java @@ -0,0 +1,82 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface SupervisedHyperParametersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.SupervisedHyperParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Number of complete passes the model makes over the entire
+   * training dataset during training.
+   * 
+ * + * int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The epochCount. + */ + long getEpochCount(); + + /** + * + * + *
+   * Optional. Multiplier for adjusting the default learning rate.
+   * 
+ * + * double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The learningRateMultiplier. + */ + double getLearningRateMultiplier(); + + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for adapterSize. + */ + int getAdapterSizeValue(); + /** + * + * + *
+   * Optional. Adapter size for tuning.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The adapterSize. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize getAdapterSize(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStats.java new file mode 100644 index 000000000000..f75ec71db676 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStats.java @@ -0,0 +1,2348 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Tuning data statistics for Supervised Tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats} + */ +public final class SupervisedTuningDataStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) + SupervisedTuningDataStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedTuningDataStats.newBuilder() to construct. + private SupervisedTuningDataStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedTuningDataStats() { + userDatasetExamples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedTuningDataStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder.class); + } + + private int bitField0_; + public static final int TUNING_DATASET_EXAMPLE_COUNT_FIELD_NUMBER = 1; + private long tuningDatasetExampleCount_ = 0L; + /** + * + * + *
+   * Output only. Number of examples in the tuning dataset.
+   * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDatasetExampleCount. + */ + @java.lang.Override + public long getTuningDatasetExampleCount() { + return tuningDatasetExampleCount_; + } + + public static final int TOTAL_TUNING_CHARACTER_COUNT_FIELD_NUMBER = 2; + private long totalTuningCharacterCount_ = 0L; + /** + * + * + *
+   * Output only. Number of tuning characters in the tuning dataset.
+   * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalTuningCharacterCount. + */ + @java.lang.Override + public long getTotalTuningCharacterCount() { + return totalTuningCharacterCount_; + } + + public static final int TOTAL_BILLABLE_CHARACTER_COUNT_FIELD_NUMBER = 3; + private long totalBillableCharacterCount_ = 0L; + /** + * + * + *
+   * Output only. Number of billable characters in the tuning dataset.
+   * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalBillableCharacterCount. + */ + @java.lang.Override + public long getTotalBillableCharacterCount() { + return totalBillableCharacterCount_; + } + + public static final int TUNING_STEP_COUNT_FIELD_NUMBER = 4; + private long tuningStepCount_ = 0L; + /** + * + * + *
+   * Output only. Number of tuning steps for this Tuning Job.
+   * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningStepCount. + */ + @java.lang.Override + public long getTuningStepCount() { + return tuningStepCount_; + } + + public static final int USER_INPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + userInputTokenDistribution_; + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userInputTokenDistribution field is set. + */ + @java.lang.Override + public boolean hasUserInputTokenDistribution() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userInputTokenDistribution. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserInputTokenDistribution() { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userInputTokenDistribution_; + } + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserInputTokenDistributionOrBuilder() { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userInputTokenDistribution_; + } + + public static final int USER_OUTPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER = 6; + private com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + userOutputTokenDistribution_; + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userOutputTokenDistribution field is set. + */ + @java.lang.Override + public boolean hasUserOutputTokenDistribution() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userOutputTokenDistribution. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserOutputTokenDistribution() { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userOutputTokenDistribution_; + } + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserOutputTokenDistributionOrBuilder() { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userOutputTokenDistribution_; + } + + public static final int USER_MESSAGE_PER_EXAMPLE_DISTRIBUTION_FIELD_NUMBER = 7; + private com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + userMessagePerExampleDistribution_; + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userMessagePerExampleDistribution field is set. + */ + @java.lang.Override + public boolean hasUserMessagePerExampleDistribution() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userMessagePerExampleDistribution. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserMessagePerExampleDistribution() { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userMessagePerExampleDistribution_; + } + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserMessagePerExampleDistributionOrBuilder() { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userMessagePerExampleDistribution_; + } + + public static final int USER_DATASET_EXAMPLES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List userDatasetExamples_; + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getUserDatasetExamplesList() { + return userDatasetExamples_; + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getUserDatasetExamplesOrBuilderList() { + return userDatasetExamples_; + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getUserDatasetExamplesCount() { + return userDatasetExamples_.size(); + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Content getUserDatasetExamples(int index) { + return userDatasetExamples_.get(index); + } + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getUserDatasetExamplesOrBuilder( + int index) { + return userDatasetExamples_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tuningDatasetExampleCount_ != 0L) { + output.writeInt64(1, tuningDatasetExampleCount_); + } + if (totalTuningCharacterCount_ != 0L) { + output.writeInt64(2, totalTuningCharacterCount_); + } + if (totalBillableCharacterCount_ != 0L) { + output.writeInt64(3, totalBillableCharacterCount_); + } + if (tuningStepCount_ != 0L) { + output.writeInt64(4, tuningStepCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getUserInputTokenDistribution()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUserOutputTokenDistribution()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUserMessagePerExampleDistribution()); + } + for (int i = 0; i < userDatasetExamples_.size(); i++) { + output.writeMessage(8, userDatasetExamples_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tuningDatasetExampleCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, tuningDatasetExampleCount_); + } + if (totalTuningCharacterCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, totalTuningCharacterCount_); + } + if (totalBillableCharacterCount_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(3, totalBillableCharacterCount_); + } + if (tuningStepCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, tuningStepCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getUserInputTokenDistribution()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getUserOutputTokenDistribution()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getUserMessagePerExampleDistribution()); + } + for (int i = 0; i < userDatasetExamples_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, userDatasetExamples_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats other = + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) obj; + + if (getTuningDatasetExampleCount() != other.getTuningDatasetExampleCount()) return false; + if (getTotalTuningCharacterCount() != other.getTotalTuningCharacterCount()) return false; + if (getTotalBillableCharacterCount() != other.getTotalBillableCharacterCount()) return false; + if (getTuningStepCount() != other.getTuningStepCount()) return false; + if (hasUserInputTokenDistribution() != other.hasUserInputTokenDistribution()) return false; + if (hasUserInputTokenDistribution()) { + if (!getUserInputTokenDistribution().equals(other.getUserInputTokenDistribution())) + return false; + } + if (hasUserOutputTokenDistribution() != other.hasUserOutputTokenDistribution()) return false; + if (hasUserOutputTokenDistribution()) { + if (!getUserOutputTokenDistribution().equals(other.getUserOutputTokenDistribution())) + return false; + } + if (hasUserMessagePerExampleDistribution() != other.hasUserMessagePerExampleDistribution()) + return false; + if (hasUserMessagePerExampleDistribution()) { + if (!getUserMessagePerExampleDistribution() + .equals(other.getUserMessagePerExampleDistribution())) return false; + } + if (!getUserDatasetExamplesList().equals(other.getUserDatasetExamplesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TUNING_DATASET_EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTuningDatasetExampleCount()); + hash = (37 * hash) + TOTAL_TUNING_CHARACTER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalTuningCharacterCount()); + hash = (37 * hash) + TOTAL_BILLABLE_CHARACTER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalBillableCharacterCount()); + hash = (37 * hash) + TUNING_STEP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTuningStepCount()); + if (hasUserInputTokenDistribution()) { + hash = (37 * hash) + USER_INPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getUserInputTokenDistribution().hashCode(); + } + if (hasUserOutputTokenDistribution()) { + hash = (37 * hash) + USER_OUTPUT_TOKEN_DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getUserOutputTokenDistribution().hashCode(); + } + if (hasUserMessagePerExampleDistribution()) { + hash = (37 * hash) + USER_MESSAGE_PER_EXAMPLE_DISTRIBUTION_FIELD_NUMBER; + hash = (53 * hash) + getUserMessagePerExampleDistribution().hashCode(); + } + if (getUserDatasetExamplesCount() > 0) { + hash = (37 * hash) + USER_DATASET_EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getUserDatasetExamplesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tuning data statistics for Supervised Tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUserInputTokenDistributionFieldBuilder(); + getUserOutputTokenDistributionFieldBuilder(); + getUserMessagePerExampleDistributionFieldBuilder(); + getUserDatasetExamplesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tuningDatasetExampleCount_ = 0L; + totalTuningCharacterCount_ = 0L; + totalBillableCharacterCount_ = 0L; + tuningStepCount_ = 0L; + userInputTokenDistribution_ = null; + if (userInputTokenDistributionBuilder_ != null) { + userInputTokenDistributionBuilder_.dispose(); + userInputTokenDistributionBuilder_ = null; + } + userOutputTokenDistribution_ = null; + if (userOutputTokenDistributionBuilder_ != null) { + userOutputTokenDistributionBuilder_.dispose(); + userOutputTokenDistributionBuilder_ = null; + } + userMessagePerExampleDistribution_ = null; + if (userMessagePerExampleDistributionBuilder_ != null) { + userMessagePerExampleDistributionBuilder_.dispose(); + userMessagePerExampleDistributionBuilder_ = null; + } + if (userDatasetExamplesBuilder_ == null) { + userDatasetExamples_ = java.util.Collections.emptyList(); + } else { + userDatasetExamples_ = null; + userDatasetExamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats build() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats buildPartial() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats result = + new com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats result) { + if (userDatasetExamplesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + userDatasetExamples_ = java.util.Collections.unmodifiableList(userDatasetExamples_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.userDatasetExamples_ = userDatasetExamples_; + } else { + result.userDatasetExamples_ = userDatasetExamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tuningDatasetExampleCount_ = tuningDatasetExampleCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.totalTuningCharacterCount_ = totalTuningCharacterCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalBillableCharacterCount_ = totalBillableCharacterCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tuningStepCount_ = tuningStepCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userInputTokenDistribution_ = + userInputTokenDistributionBuilder_ == null + ? userInputTokenDistribution_ + : userInputTokenDistributionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.userOutputTokenDistribution_ = + userOutputTokenDistributionBuilder_ == null + ? userOutputTokenDistribution_ + : userOutputTokenDistributionBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userMessagePerExampleDistribution_ = + userMessagePerExampleDistributionBuilder_ == null + ? userMessagePerExampleDistribution_ + : userMessagePerExampleDistributionBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats other) { + if (other + == com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance()) + return this; + if (other.getTuningDatasetExampleCount() != 0L) { + setTuningDatasetExampleCount(other.getTuningDatasetExampleCount()); + } + if (other.getTotalTuningCharacterCount() != 0L) { + setTotalTuningCharacterCount(other.getTotalTuningCharacterCount()); + } + if (other.getTotalBillableCharacterCount() != 0L) { + setTotalBillableCharacterCount(other.getTotalBillableCharacterCount()); + } + if (other.getTuningStepCount() != 0L) { + setTuningStepCount(other.getTuningStepCount()); + } + if (other.hasUserInputTokenDistribution()) { + mergeUserInputTokenDistribution(other.getUserInputTokenDistribution()); + } + if (other.hasUserOutputTokenDistribution()) { + mergeUserOutputTokenDistribution(other.getUserOutputTokenDistribution()); + } + if (other.hasUserMessagePerExampleDistribution()) { + mergeUserMessagePerExampleDistribution(other.getUserMessagePerExampleDistribution()); + } + if (userDatasetExamplesBuilder_ == null) { + if (!other.userDatasetExamples_.isEmpty()) { + if (userDatasetExamples_.isEmpty()) { + userDatasetExamples_ = other.userDatasetExamples_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.addAll(other.userDatasetExamples_); + } + onChanged(); + } + } else { + if (!other.userDatasetExamples_.isEmpty()) { + if (userDatasetExamplesBuilder_.isEmpty()) { + userDatasetExamplesBuilder_.dispose(); + userDatasetExamplesBuilder_ = null; + userDatasetExamples_ = other.userDatasetExamples_; + bitField0_ = (bitField0_ & ~0x00000080); + userDatasetExamplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getUserDatasetExamplesFieldBuilder() + : null; + } else { + userDatasetExamplesBuilder_.addAllMessages(other.userDatasetExamples_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + tuningDatasetExampleCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + totalTuningCharacterCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + totalBillableCharacterCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + tuningStepCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + getUserInputTokenDistributionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + getUserOutputTokenDistributionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + getUserMessagePerExampleDistributionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + com.google.cloud.aiplatform.v1beta1.Content m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.Content.parser(), extensionRegistry); + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(m); + } else { + userDatasetExamplesBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long tuningDatasetExampleCount_; + /** + * + * + *
+     * Output only. Number of examples in the tuning dataset.
+     * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDatasetExampleCount. + */ + @java.lang.Override + public long getTuningDatasetExampleCount() { + return tuningDatasetExampleCount_; + } + /** + * + * + *
+     * Output only. Number of examples in the tuning dataset.
+     * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The tuningDatasetExampleCount to set. + * @return This builder for chaining. + */ + public Builder setTuningDatasetExampleCount(long value) { + + tuningDatasetExampleCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of examples in the tuning dataset.
+     * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTuningDatasetExampleCount() { + bitField0_ = (bitField0_ & ~0x00000001); + tuningDatasetExampleCount_ = 0L; + onChanged(); + return this; + } + + private long totalTuningCharacterCount_; + /** + * + * + *
+     * Output only. Number of tuning characters in the tuning dataset.
+     * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalTuningCharacterCount. + */ + @java.lang.Override + public long getTotalTuningCharacterCount() { + return totalTuningCharacterCount_; + } + /** + * + * + *
+     * Output only. Number of tuning characters in the tuning dataset.
+     * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The totalTuningCharacterCount to set. + * @return This builder for chaining. + */ + public Builder setTotalTuningCharacterCount(long value) { + + totalTuningCharacterCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of tuning characters in the tuning dataset.
+     * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalTuningCharacterCount() { + bitField0_ = (bitField0_ & ~0x00000002); + totalTuningCharacterCount_ = 0L; + onChanged(); + return this; + } + + private long totalBillableCharacterCount_; + /** + * + * + *
+     * Output only. Number of billable characters in the tuning dataset.
+     * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalBillableCharacterCount. + */ + @java.lang.Override + public long getTotalBillableCharacterCount() { + return totalBillableCharacterCount_; + } + /** + * + * + *
+     * Output only. Number of billable characters in the tuning dataset.
+     * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The totalBillableCharacterCount to set. + * @return This builder for chaining. + */ + public Builder setTotalBillableCharacterCount(long value) { + + totalBillableCharacterCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of billable characters in the tuning dataset.
+     * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTotalBillableCharacterCount() { + bitField0_ = (bitField0_ & ~0x00000004); + totalBillableCharacterCount_ = 0L; + onChanged(); + return this; + } + + private long tuningStepCount_; + /** + * + * + *
+     * Output only. Number of tuning steps for this Tuning Job.
+     * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningStepCount. + */ + @java.lang.Override + public long getTuningStepCount() { + return tuningStepCount_; + } + /** + * + * + *
+     * Output only. Number of tuning steps for this Tuning Job.
+     * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tuningStepCount to set. + * @return This builder for chaining. + */ + public Builder setTuningStepCount(long value) { + + tuningStepCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of tuning steps for this Tuning Job.
+     * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTuningStepCount() { + bitField0_ = (bitField0_ & ~0x00000008); + tuningStepCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + userInputTokenDistribution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder> + userInputTokenDistributionBuilder_; + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userInputTokenDistribution field is set. + */ + public boolean hasUserInputTokenDistribution() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userInputTokenDistribution. + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserInputTokenDistribution() { + if (userInputTokenDistributionBuilder_ == null) { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userInputTokenDistribution_; + } else { + return userInputTokenDistributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserInputTokenDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution value) { + if (userInputTokenDistributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInputTokenDistribution_ = value; + } else { + userInputTokenDistributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserInputTokenDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + builderForValue) { + if (userInputTokenDistributionBuilder_ == null) { + userInputTokenDistribution_ = builderForValue.build(); + } else { + userInputTokenDistributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserInputTokenDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution value) { + if (userInputTokenDistributionBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && userInputTokenDistribution_ != null + && userInputTokenDistribution_ + != com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) { + getUserInputTokenDistributionBuilder().mergeFrom(value); + } else { + userInputTokenDistribution_ = value; + } + } else { + userInputTokenDistributionBuilder_.mergeFrom(value); + } + if (userInputTokenDistribution_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserInputTokenDistribution() { + bitField0_ = (bitField0_ & ~0x00000010); + userInputTokenDistribution_ = null; + if (userInputTokenDistributionBuilder_ != null) { + userInputTokenDistributionBuilder_.dispose(); + userInputTokenDistributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + getUserInputTokenDistributionBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUserInputTokenDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserInputTokenDistributionOrBuilder() { + if (userInputTokenDistributionBuilder_ != null) { + return userInputTokenDistributionBuilder_.getMessageOrBuilder(); + } else { + return userInputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userInputTokenDistribution_; + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user input tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder> + getUserInputTokenDistributionFieldBuilder() { + if (userInputTokenDistributionBuilder_ == null) { + userInputTokenDistributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder>( + getUserInputTokenDistribution(), getParentForChildren(), isClean()); + userInputTokenDistribution_ = null; + } + return userInputTokenDistributionBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + userOutputTokenDistribution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder> + userOutputTokenDistributionBuilder_; + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userOutputTokenDistribution field is set. + */ + public boolean hasUserOutputTokenDistribution() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userOutputTokenDistribution. + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserOutputTokenDistribution() { + if (userOutputTokenDistributionBuilder_ == null) { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userOutputTokenDistribution_; + } else { + return userOutputTokenDistributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserOutputTokenDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution value) { + if (userOutputTokenDistributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userOutputTokenDistribution_ = value; + } else { + userOutputTokenDistributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserOutputTokenDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + builderForValue) { + if (userOutputTokenDistributionBuilder_ == null) { + userOutputTokenDistribution_ = builderForValue.build(); + } else { + userOutputTokenDistributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserOutputTokenDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution value) { + if (userOutputTokenDistributionBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && userOutputTokenDistribution_ != null + && userOutputTokenDistribution_ + != com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) { + getUserOutputTokenDistributionBuilder().mergeFrom(value); + } else { + userOutputTokenDistribution_ = value; + } + } else { + userOutputTokenDistributionBuilder_.mergeFrom(value); + } + if (userOutputTokenDistribution_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserOutputTokenDistribution() { + bitField0_ = (bitField0_ & ~0x00000020); + userOutputTokenDistribution_ = null; + if (userOutputTokenDistributionBuilder_ != null) { + userOutputTokenDistributionBuilder_.dispose(); + userOutputTokenDistributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + getUserOutputTokenDistributionBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getUserOutputTokenDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserOutputTokenDistributionOrBuilder() { + if (userOutputTokenDistributionBuilder_ != null) { + return userOutputTokenDistributionBuilder_.getMessageOrBuilder(); + } else { + return userOutputTokenDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userOutputTokenDistribution_; + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the user output tokens.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder> + getUserOutputTokenDistributionFieldBuilder() { + if (userOutputTokenDistributionBuilder_ == null) { + userOutputTokenDistributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder>( + getUserOutputTokenDistribution(), getParentForChildren(), isClean()); + userOutputTokenDistribution_ = null; + } + return userOutputTokenDistributionBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + userMessagePerExampleDistribution_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder> + userMessagePerExampleDistributionBuilder_; + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userMessagePerExampleDistribution field is set. + */ + public boolean hasUserMessagePerExampleDistribution() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userMessagePerExampleDistribution. + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserMessagePerExampleDistribution() { + if (userMessagePerExampleDistributionBuilder_ == null) { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userMessagePerExampleDistribution_; + } else { + return userMessagePerExampleDistributionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserMessagePerExampleDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution value) { + if (userMessagePerExampleDistributionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userMessagePerExampleDistribution_ = value; + } else { + userMessagePerExampleDistributionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserMessagePerExampleDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + builderForValue) { + if (userMessagePerExampleDistributionBuilder_ == null) { + userMessagePerExampleDistribution_ = builderForValue.build(); + } else { + userMessagePerExampleDistributionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUserMessagePerExampleDistribution( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution value) { + if (userMessagePerExampleDistributionBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && userMessagePerExampleDistribution_ != null + && userMessagePerExampleDistribution_ + != com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) { + getUserMessagePerExampleDistributionBuilder().mergeFrom(value); + } else { + userMessagePerExampleDistribution_ = value; + } + } else { + userMessagePerExampleDistributionBuilder_.mergeFrom(value); + } + if (userMessagePerExampleDistribution_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserMessagePerExampleDistribution() { + bitField0_ = (bitField0_ & ~0x00000040); + userMessagePerExampleDistribution_ = null; + if (userMessagePerExampleDistributionBuilder_ != null) { + userMessagePerExampleDistributionBuilder_.dispose(); + userMessagePerExampleDistributionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + getUserMessagePerExampleDistributionBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUserMessagePerExampleDistributionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserMessagePerExampleDistributionOrBuilder() { + if (userMessagePerExampleDistributionBuilder_ != null) { + return userMessagePerExampleDistributionBuilder_.getMessageOrBuilder(); + } else { + return userMessagePerExampleDistribution_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance() + : userMessagePerExampleDistribution_; + } + } + /** + * + * + *
+     * Output only. Dataset distributions for the messages per example.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder> + getUserMessagePerExampleDistributionFieldBuilder() { + if (userMessagePerExampleDistributionBuilder_ == null) { + userMessagePerExampleDistributionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder>( + getUserMessagePerExampleDistribution(), getParentForChildren(), isClean()); + userMessagePerExampleDistribution_ = null; + } + return userMessagePerExampleDistributionBuilder_; + } + + private java.util.List userDatasetExamples_ = + java.util.Collections.emptyList(); + + private void ensureUserDatasetExamplesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + userDatasetExamples_ = + new java.util.ArrayList( + userDatasetExamples_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Content, + com.google.cloud.aiplatform.v1beta1.Content.Builder, + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder> + userDatasetExamplesBuilder_; + + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUserDatasetExamplesList() { + if (userDatasetExamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(userDatasetExamples_); + } else { + return userDatasetExamplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getUserDatasetExamplesCount() { + if (userDatasetExamplesBuilder_ == null) { + return userDatasetExamples_.size(); + } else { + return userDatasetExamplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Content getUserDatasetExamples(int index) { + if (userDatasetExamplesBuilder_ == null) { + return userDatasetExamples_.get(index); + } else { + return userDatasetExamplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserDatasetExamples( + int index, com.google.cloud.aiplatform.v1beta1.Content value) { + if (userDatasetExamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.set(index, value); + onChanged(); + } else { + userDatasetExamplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUserDatasetExamples( + int index, com.google.cloud.aiplatform.v1beta1.Content.Builder builderForValue) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.set(index, builderForValue.build()); + onChanged(); + } else { + userDatasetExamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples(com.google.cloud.aiplatform.v1beta1.Content value) { + if (userDatasetExamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(value); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples( + int index, com.google.cloud.aiplatform.v1beta1.Content value) { + if (userDatasetExamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(index, value); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples( + com.google.cloud.aiplatform.v1beta1.Content.Builder builderForValue) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(builderForValue.build()); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addUserDatasetExamples( + int index, com.google.cloud.aiplatform.v1beta1.Content.Builder builderForValue) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.add(index, builderForValue.build()); + onChanged(); + } else { + userDatasetExamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllUserDatasetExamples( + java.lang.Iterable values) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userDatasetExamples_); + onChanged(); + } else { + userDatasetExamplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUserDatasetExamples() { + if (userDatasetExamplesBuilder_ == null) { + userDatasetExamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + userDatasetExamplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeUserDatasetExamples(int index) { + if (userDatasetExamplesBuilder_ == null) { + ensureUserDatasetExamplesIsMutable(); + userDatasetExamples_.remove(index); + onChanged(); + } else { + userDatasetExamplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Content.Builder getUserDatasetExamplesBuilder( + int index) { + return getUserDatasetExamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getUserDatasetExamplesOrBuilder( + int index) { + if (userDatasetExamplesBuilder_ == null) { + return userDatasetExamples_.get(index); + } else { + return userDatasetExamplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUserDatasetExamplesOrBuilderList() { + if (userDatasetExamplesBuilder_ != null) { + return userDatasetExamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userDatasetExamples_); + } + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Content.Builder addUserDatasetExamplesBuilder() { + return getUserDatasetExamplesFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Content.Builder addUserDatasetExamplesBuilder( + int index) { + return getUserDatasetExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.Content.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Sample user messages in the training dataset uri.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getUserDatasetExamplesBuilderList() { + return getUserDatasetExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Content, + com.google.cloud.aiplatform.v1beta1.Content.Builder, + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder> + getUserDatasetExamplesFieldBuilder() { + if (userDatasetExamplesBuilder_ == null) { + userDatasetExamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Content, + com.google.cloud.aiplatform.v1beta1.Content.Builder, + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder>( + userDatasetExamples_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + userDatasetExamples_ = null; + } + return userDatasetExamplesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) + private static final com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats(); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedTuningDataStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStatsOrBuilder.java new file mode 100644 index 000000000000..b76da50f04bb --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDataStatsOrBuilder.java @@ -0,0 +1,272 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface SupervisedTuningDataStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Number of examples in the tuning dataset.
+   * 
+ * + * int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDatasetExampleCount. + */ + long getTuningDatasetExampleCount(); + + /** + * + * + *
+   * Output only. Number of tuning characters in the tuning dataset.
+   * 
+ * + * int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalTuningCharacterCount. + */ + long getTotalTuningCharacterCount(); + + /** + * + * + *
+   * Output only. Number of billable characters in the tuning dataset.
+   * 
+ * + * int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The totalBillableCharacterCount. + */ + long getTotalBillableCharacterCount(); + + /** + * + * + *
+   * Output only. Number of tuning steps for this Tuning Job.
+   * 
+ * + * int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningStepCount. + */ + long getTuningStepCount(); + + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userInputTokenDistribution field is set. + */ + boolean hasUserInputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userInputTokenDistribution. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserInputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user input tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserInputTokenDistributionOrBuilder(); + + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userOutputTokenDistribution field is set. + */ + boolean hasUserOutputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userOutputTokenDistribution. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserOutputTokenDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the user output tokens.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserOutputTokenDistributionOrBuilder(); + + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the userMessagePerExampleDistribution field is set. + */ + boolean hasUserMessagePerExampleDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The userMessagePerExampleDistribution. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getUserMessagePerExampleDistribution(); + /** + * + * + *
+   * Output only. Dataset distributions for the messages per example.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder + getUserMessagePerExampleDistributionOrBuilder(); + + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getUserDatasetExamplesList(); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.Content getUserDatasetExamples(int index); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getUserDatasetExamplesCount(); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getUserDatasetExamplesOrBuilderList(); + /** + * + * + *
+   * Output only. Sample user messages in the training dataset uri.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.ContentOrBuilder getUserDatasetExamplesOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistribution.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistribution.java new file mode 100644 index 000000000000..0f103573bd60 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistribution.java @@ -0,0 +1,2555 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Dataset distribution for Supervised Tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution} + */ +public final class SupervisedTuningDatasetDistribution + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) + SupervisedTuningDatasetDistributionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedTuningDatasetDistribution.newBuilder() to construct. + private SupervisedTuningDatasetDistribution( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedTuningDatasetDistribution() { + buckets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedTuningDatasetDistribution(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder.class); + } + + public interface DatasetBucketOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. Number of values in the bucket.
+     * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + double getCount(); + + /** + * + * + *
+     * Output only. Left bound of the bucket.
+     * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The left. + */ + double getLeft(); + + /** + * + * + *
+     * Output only. Right bound of the bucket.
+     * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The right. + */ + double getRight(); + } + /** + * + * + *
+   * Dataset bucket used to create a histogram for the distribution given a
+   * population of values.
+   * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket} + */ + public static final class DatasetBucket extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) + DatasetBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatasetBucket.newBuilder() to construct. + private DatasetBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatasetBucket() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatasetBucket(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder.class); + } + + public static final int COUNT_FIELD_NUMBER = 1; + private double count_ = 0D; + /** + * + * + *
+     * Output only. Number of values in the bucket.
+     * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public double getCount() { + return count_; + } + + public static final int LEFT_FIELD_NUMBER = 2; + private double left_ = 0D; + /** + * + * + *
+     * Output only. Left bound of the bucket.
+     * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The left. + */ + @java.lang.Override + public double getLeft() { + return left_; + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private double right_ = 0D; + /** + * + * + *
+     * Output only. Right bound of the bucket.
+     * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The right. + */ + @java.lang.Override + public double getRight() { + return right_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(count_) != 0) { + output.writeDouble(1, count_); + } + if (java.lang.Double.doubleToRawLongBits(left_) != 0) { + output.writeDouble(2, left_); + } + if (java.lang.Double.doubleToRawLongBits(right_) != 0) { + output.writeDouble(3, right_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(count_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, count_); + } + if (java.lang.Double.doubleToRawLongBits(left_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, left_); + } + if (java.lang.Double.doubleToRawLongBits(right_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, right_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket other = + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) + obj; + + if (java.lang.Double.doubleToLongBits(getCount()) + != java.lang.Double.doubleToLongBits(other.getCount())) return false; + if (java.lang.Double.doubleToLongBits(getLeft()) + != java.lang.Double.doubleToLongBits(other.getLeft())) return false; + if (java.lang.Double.doubleToLongBits(getRight()) + != java.lang.Double.doubleToLongBits(other.getRight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCount())); + hash = (37 * hash) + LEFT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getLeft())); + hash = (37 * hash) + RIGHT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRight())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Dataset bucket used to create a histogram for the distribution given a
+     * population of values.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + count_ = 0D; + left_ = 0D; + right_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + build() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + buildPartial() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + result = + new com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.left_ = left_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.right_ = right_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance()) return this; + if (other.getCount() != 0D) { + setCount(other.getCount()); + } + if (other.getLeft() != 0D) { + setLeft(other.getLeft()); + } + if (other.getRight() != 0D) { + setRight(other.getRight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + count_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + left_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + right_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private double count_; + /** + * + * + *
+       * Output only. Number of values in the bucket.
+       * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count. + */ + @java.lang.Override + public double getCount() { + return count_; + } + /** + * + * + *
+       * Output only. Number of values in the bucket.
+       * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(double value) { + + count_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Number of values in the bucket.
+       * 
+ * + * double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0D; + onChanged(); + return this; + } + + private double left_; + /** + * + * + *
+       * Output only. Left bound of the bucket.
+       * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The left. + */ + @java.lang.Override + public double getLeft() { + return left_; + } + /** + * + * + *
+       * Output only. Left bound of the bucket.
+       * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The left to set. + * @return This builder for chaining. + */ + public Builder setLeft(double value) { + + left_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Left bound of the bucket.
+       * 
+ * + * double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLeft() { + bitField0_ = (bitField0_ & ~0x00000002); + left_ = 0D; + onChanged(); + return this; + } + + private double right_; + /** + * + * + *
+       * Output only. Right bound of the bucket.
+       * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The right. + */ + @java.lang.Override + public double getRight() { + return right_; + } + /** + * + * + *
+       * Output only. Right bound of the bucket.
+       * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The right to set. + * @return This builder for chaining. + */ + public Builder setRight(double value) { + + right_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. Right bound of the bucket.
+       * 
+ * + * double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRight() { + bitField0_ = (bitField0_ & ~0x00000004); + right_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket) + private static final com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket(); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatasetBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SUM_FIELD_NUMBER = 1; + private long sum_ = 0L; + /** + * + * + *
+   * Output only. Sum of a given population of values.
+   * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sum. + */ + @java.lang.Override + public long getSum() { + return sum_; + } + + public static final int MIN_FIELD_NUMBER = 2; + private double min_ = 0D; + /** + * + * + *
+   * Output only. The minimum of the population values.
+   * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The min. + */ + @java.lang.Override + public double getMin() { + return min_; + } + + public static final int MAX_FIELD_NUMBER = 3; + private double max_ = 0D; + /** + * + * + *
+   * Output only. The maximum of the population values.
+   * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The max. + */ + @java.lang.Override + public double getMax() { + return max_; + } + + public static final int MEAN_FIELD_NUMBER = 4; + private double mean_ = 0D; + /** + * + * + *
+   * Output only. The arithmetic mean of the values in the population.
+   * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mean. + */ + @java.lang.Override + public double getMean() { + return mean_; + } + + public static final int MEDIAN_FIELD_NUMBER = 5; + private double median_ = 0D; + /** + * + * + *
+   * Output only. The median of the values in the population.
+   * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The median. + */ + @java.lang.Override + public double getMedian() { + return median_; + } + + public static final int P5_FIELD_NUMBER = 6; + private double p5_ = 0D; + /** + * + * + *
+   * Output only. The 5th percentile of the values in the population.
+   * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p5. + */ + @java.lang.Override + public double getP5() { + return p5_; + } + + public static final int P95_FIELD_NUMBER = 7; + private double p95_ = 0D; + /** + * + * + *
+   * Output only. The 95th percentile of the values in the population.
+   * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p95. + */ + @java.lang.Override + public double getP95() { + return p95_; + } + + public static final int BUCKETS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket> + buckets_; + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket> + getBucketsList() { + return buckets_; + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsOrBuilderList() { + return buckets_; + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getBucketsCount() { + return buckets_.size(); + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + getBuckets(int index) { + return buckets_.get(index); + } + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder + getBucketsOrBuilder(int index) { + return buckets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sum_ != 0L) { + output.writeInt64(1, sum_); + } + if (java.lang.Double.doubleToRawLongBits(min_) != 0) { + output.writeDouble(2, min_); + } + if (java.lang.Double.doubleToRawLongBits(max_) != 0) { + output.writeDouble(3, max_); + } + if (java.lang.Double.doubleToRawLongBits(mean_) != 0) { + output.writeDouble(4, mean_); + } + if (java.lang.Double.doubleToRawLongBits(median_) != 0) { + output.writeDouble(5, median_); + } + if (java.lang.Double.doubleToRawLongBits(p5_) != 0) { + output.writeDouble(6, p5_); + } + if (java.lang.Double.doubleToRawLongBits(p95_) != 0) { + output.writeDouble(7, p95_); + } + for (int i = 0; i < buckets_.size(); i++) { + output.writeMessage(8, buckets_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sum_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, sum_); + } + if (java.lang.Double.doubleToRawLongBits(min_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, min_); + } + if (java.lang.Double.doubleToRawLongBits(max_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, max_); + } + if (java.lang.Double.doubleToRawLongBits(mean_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, mean_); + } + if (java.lang.Double.doubleToRawLongBits(median_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, median_); + } + if (java.lang.Double.doubleToRawLongBits(p5_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, p5_); + } + if (java.lang.Double.doubleToRawLongBits(p95_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, p95_); + } + for (int i = 0; i < buckets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, buckets_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution other = + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) obj; + + if (getSum() != other.getSum()) return false; + if (java.lang.Double.doubleToLongBits(getMin()) + != java.lang.Double.doubleToLongBits(other.getMin())) return false; + if (java.lang.Double.doubleToLongBits(getMax()) + != java.lang.Double.doubleToLongBits(other.getMax())) return false; + if (java.lang.Double.doubleToLongBits(getMean()) + != java.lang.Double.doubleToLongBits(other.getMean())) return false; + if (java.lang.Double.doubleToLongBits(getMedian()) + != java.lang.Double.doubleToLongBits(other.getMedian())) return false; + if (java.lang.Double.doubleToLongBits(getP5()) + != java.lang.Double.doubleToLongBits(other.getP5())) return false; + if (java.lang.Double.doubleToLongBits(getP95()) + != java.lang.Double.doubleToLongBits(other.getP95())) return false; + if (!getBucketsList().equals(other.getBucketsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSum()); + hash = (37 * hash) + MIN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMin())); + hash = (37 * hash) + MAX_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMax())); + hash = (37 * hash) + MEAN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMean())); + hash = (37 * hash) + MEDIAN_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMedian())); + hash = (37 * hash) + P5_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getP5())); + hash = (37 * hash) + P95_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getP95())); + if (getBucketsCount() > 0) { + hash = (37 * hash) + BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getBucketsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dataset distribution for Supervised Tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistributionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sum_ = 0L; + min_ = 0D; + max_ = 0D; + mean_ = 0D; + median_ = 0D; + p5_ = 0D; + p95_ = 0D; + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + } else { + buckets_ = null; + bucketsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution build() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution buildPartial() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution result = + new com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution result) { + if (bucketsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + buckets_ = java.util.Collections.unmodifiableList(buckets_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.buckets_ = buckets_; + } else { + result.buckets_ = bucketsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sum_ = sum_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.min_ = min_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.max_ = max_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mean_ = mean_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.median_ = median_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.p5_ = p5_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.p95_ = p95_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution other) { + if (other + == com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .getDefaultInstance()) return this; + if (other.getSum() != 0L) { + setSum(other.getSum()); + } + if (other.getMin() != 0D) { + setMin(other.getMin()); + } + if (other.getMax() != 0D) { + setMax(other.getMax()); + } + if (other.getMean() != 0D) { + setMean(other.getMean()); + } + if (other.getMedian() != 0D) { + setMedian(other.getMedian()); + } + if (other.getP5() != 0D) { + setP5(other.getP5()); + } + if (other.getP95() != 0D) { + setP95(other.getP95()); + } + if (bucketsBuilder_ == null) { + if (!other.buckets_.isEmpty()) { + if (buckets_.isEmpty()) { + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureBucketsIsMutable(); + buckets_.addAll(other.buckets_); + } + onChanged(); + } + } else { + if (!other.buckets_.isEmpty()) { + if (bucketsBuilder_.isEmpty()) { + bucketsBuilder_.dispose(); + bucketsBuilder_ = null; + buckets_ = other.buckets_; + bitField0_ = (bitField0_ & ~0x00000080); + bucketsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBucketsFieldBuilder() + : null; + } else { + bucketsBuilder_.addAllMessages(other.buckets_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + sum_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: + { + min_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: + { + max_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: + { + mean_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: + { + median_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 49: + { + p5_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 49 + case 57: + { + p95_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 66: + { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket + m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket.parser(), + extensionRegistry); + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(m); + } else { + bucketsBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long sum_; + /** + * + * + *
+     * Output only. Sum of a given population of values.
+     * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sum. + */ + @java.lang.Override + public long getSum() { + return sum_; + } + /** + * + * + *
+     * Output only. Sum of a given population of values.
+     * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The sum to set. + * @return This builder for chaining. + */ + public Builder setSum(long value) { + + sum_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Sum of a given population of values.
+     * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSum() { + bitField0_ = (bitField0_ & ~0x00000001); + sum_ = 0L; + onChanged(); + return this; + } + + private double min_; + /** + * + * + *
+     * Output only. The minimum of the population values.
+     * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The min. + */ + @java.lang.Override + public double getMin() { + return min_; + } + /** + * + * + *
+     * Output only. The minimum of the population values.
+     * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The min to set. + * @return This builder for chaining. + */ + public Builder setMin(double value) { + + min_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The minimum of the population values.
+     * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000002); + min_ = 0D; + onChanged(); + return this; + } + + private double max_; + /** + * + * + *
+     * Output only. The maximum of the population values.
+     * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The max. + */ + @java.lang.Override + public double getMax() { + return max_; + } + /** + * + * + *
+     * Output only. The maximum of the population values.
+     * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The max to set. + * @return This builder for chaining. + */ + public Builder setMax(double value) { + + max_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The maximum of the population values.
+     * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000004); + max_ = 0D; + onChanged(); + return this; + } + + private double mean_; + /** + * + * + *
+     * Output only. The arithmetic mean of the values in the population.
+     * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mean. + */ + @java.lang.Override + public double getMean() { + return mean_; + } + /** + * + * + *
+     * Output only. The arithmetic mean of the values in the population.
+     * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mean to set. + * @return This builder for chaining. + */ + public Builder setMean(double value) { + + mean_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The arithmetic mean of the values in the population.
+     * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMean() { + bitField0_ = (bitField0_ & ~0x00000008); + mean_ = 0D; + onChanged(); + return this; + } + + private double median_; + /** + * + * + *
+     * Output only. The median of the values in the population.
+     * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The median. + */ + @java.lang.Override + public double getMedian() { + return median_; + } + /** + * + * + *
+     * Output only. The median of the values in the population.
+     * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The median to set. + * @return This builder for chaining. + */ + public Builder setMedian(double value) { + + median_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The median of the values in the population.
+     * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMedian() { + bitField0_ = (bitField0_ & ~0x00000010); + median_ = 0D; + onChanged(); + return this; + } + + private double p5_; + /** + * + * + *
+     * Output only. The 5th percentile of the values in the population.
+     * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p5. + */ + @java.lang.Override + public double getP5() { + return p5_; + } + /** + * + * + *
+     * Output only. The 5th percentile of the values in the population.
+     * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The p5 to set. + * @return This builder for chaining. + */ + public Builder setP5(double value) { + + p5_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The 5th percentile of the values in the population.
+     * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearP5() { + bitField0_ = (bitField0_ & ~0x00000020); + p5_ = 0D; + onChanged(); + return this; + } + + private double p95_; + /** + * + * + *
+     * Output only. The 95th percentile of the values in the population.
+     * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p95. + */ + @java.lang.Override + public double getP95() { + return p95_; + } + /** + * + * + *
+     * Output only. The 95th percentile of the values in the population.
+     * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The p95 to set. + * @return This builder for chaining. + */ + public Builder setP95(double value) { + + p95_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The 95th percentile of the values in the population.
+     * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearP95() { + bitField0_ = (bitField0_ & ~0x00000040); + p95_ = 0D; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket> + buckets_ = java.util.Collections.emptyList(); + + private void ensureBucketsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + buckets_ = + new java.util.ArrayList< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket>(buckets_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + bucketsBuilder_; + + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket> + getBucketsList() { + if (bucketsBuilder_ == null) { + return java.util.Collections.unmodifiableList(buckets_); + } else { + return bucketsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getBucketsCount() { + if (bucketsBuilder_ == null) { + return buckets_.size(); + } else { + return bucketsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + getBuckets(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.set(index, value); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBuckets( + int index, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(value); + onChanged(); + } else { + bucketsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + value) { + if (bucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketsIsMutable(); + buckets_.add(index, value); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBuckets( + int index, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder + builderForValue) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllBuckets( + java.lang.Iterable< + ? extends + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket> + values) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, buckets_); + onChanged(); + } else { + bucketsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBuckets() { + if (bucketsBuilder_ == null) { + buckets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + bucketsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeBuckets(int index) { + if (bucketsBuilder_ == null) { + ensureBucketsIsMutable(); + buckets_.remove(index); + onChanged(); + } else { + bucketsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder + getBucketsBuilder(int index) { + return getBucketsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder + getBucketsOrBuilder(int index) { + if (bucketsBuilder_ == null) { + return buckets_.get(index); + } else { + return bucketsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsOrBuilderList() { + if (bucketsBuilder_ != null) { + return bucketsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(buckets_); + } + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder + addBucketsBuilder() { + return getBucketsFieldBuilder() + .addBuilder( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder + addBucketsBuilder(int index) { + return getBucketsFieldBuilder() + .addBuilder( + index, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Defines the histogram bucket.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder> + getBucketsBuilderList() { + return getBucketsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket + .Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsFieldBuilder() { + if (bucketsBuilder_ == null) { + bucketsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucket.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder>( + buckets_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); + buckets_ = null; + } + return bucketsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) + private static final com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution(); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedTuningDatasetDistribution parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistributionOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistributionOrBuilder.java new file mode 100644 index 000000000000..dd4df4fc934e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningDatasetDistributionOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface SupervisedTuningDatasetDistributionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Sum of a given population of values.
+   * 
+ * + * int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The sum. + */ + long getSum(); + + /** + * + * + *
+   * Output only. The minimum of the population values.
+   * 
+ * + * double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The min. + */ + double getMin(); + + /** + * + * + *
+   * Output only. The maximum of the population values.
+   * 
+ * + * double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The max. + */ + double getMax(); + + /** + * + * + *
+   * Output only. The arithmetic mean of the values in the population.
+   * 
+ * + * double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mean. + */ + double getMean(); + + /** + * + * + *
+   * Output only. The median of the values in the population.
+   * 
+ * + * double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The median. + */ + double getMedian(); + + /** + * + * + *
+   * Output only. The 5th percentile of the values in the population.
+   * 
+ * + * double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p5. + */ + double getP5(); + + /** + * + * + *
+   * Output only. The 95th percentile of the values in the population.
+   * 
+ * + * double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The p95. + */ + double getP95(); + + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket> + getBucketsList(); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket getBuckets( + int index); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getBucketsCount(); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution + .DatasetBucketOrBuilder> + getBucketsOrBuilderList(); + /** + * + * + *
+   * Output only. Defines the histogram bucket.
+   * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDatasetDistribution.DatasetBucketOrBuilder + getBucketsOrBuilder(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpec.java new file mode 100644 index 000000000000..ee3937b18964 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpec.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Tuning Spec for Supervised Tuning.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedTuningSpec} + */ +public final class SupervisedTuningSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) + SupervisedTuningSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SupervisedTuningSpec.newBuilder() to construct. + private SupervisedTuningSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SupervisedTuningSpec() { + trainingDatasetUri_ = ""; + validationDatasetUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SupervisedTuningSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder.class); + } + + private int bitField0_; + public static final int TRAINING_DATASET_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object trainingDatasetUri_ = ""; + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingDatasetUri. + */ + @java.lang.Override + public java.lang.String getTrainingDatasetUri() { + java.lang.Object ref = trainingDatasetUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trainingDatasetUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingDatasetUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTrainingDatasetUriBytes() { + java.lang.Object ref = trainingDatasetUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALIDATION_DATASET_URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object validationDatasetUri_ = ""; + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationDatasetUri. + */ + @java.lang.Override + public java.lang.String getValidationDatasetUri() { + java.lang.Object ref = validationDatasetUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationDatasetUri_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationDatasetUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidationDatasetUriBytes() { + java.lang.Object ref = validationDatasetUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HYPER_PARAMETERS_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyperParameters_; + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hyperParameters field is set. + */ + @java.lang.Override + public boolean hasHyperParameters() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hyperParameters. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters getHyperParameters() { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder + getHyperParametersOrBuilder() { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trainingDatasetUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, trainingDatasetUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationDatasetUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, validationDatasetUri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getHyperParameters()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(trainingDatasetUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, trainingDatasetUri_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validationDatasetUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, validationDatasetUri_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHyperParameters()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec other = + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) obj; + + if (!getTrainingDatasetUri().equals(other.getTrainingDatasetUri())) return false; + if (!getValidationDatasetUri().equals(other.getValidationDatasetUri())) return false; + if (hasHyperParameters() != other.hasHyperParameters()) return false; + if (hasHyperParameters()) { + if (!getHyperParameters().equals(other.getHyperParameters())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRAINING_DATASET_URI_FIELD_NUMBER; + hash = (53 * hash) + getTrainingDatasetUri().hashCode(); + hash = (37 * hash) + VALIDATION_DATASET_URI_FIELD_NUMBER; + hash = (53 * hash) + getValidationDatasetUri().hashCode(); + if (hasHyperParameters()) { + hash = (37 * hash) + HYPER_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getHyperParameters().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Tuning Spec for Supervised Tuning.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.SupervisedTuningSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.class, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHyperParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trainingDatasetUri_ = ""; + validationDatasetUri_ = ""; + hyperParameters_ = null; + if (hyperParametersBuilder_ != null) { + hyperParametersBuilder_.dispose(); + hyperParametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec build() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec buildPartial() { + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec result = + new com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trainingDatasetUri_ = trainingDatasetUri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.validationDatasetUri_ = validationDatasetUri_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.hyperParameters_ = + hyperParametersBuilder_ == null ? hyperParameters_ : hyperParametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec other) { + if (other == com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance()) + return this; + if (!other.getTrainingDatasetUri().isEmpty()) { + trainingDatasetUri_ = other.trainingDatasetUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getValidationDatasetUri().isEmpty()) { + validationDatasetUri_ = other.validationDatasetUri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasHyperParameters()) { + mergeHyperParameters(other.getHyperParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + trainingDatasetUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + validationDatasetUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getHyperParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object trainingDatasetUri_ = ""; + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingDatasetUri. + */ + public java.lang.String getTrainingDatasetUri() { + java.lang.Object ref = trainingDatasetUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trainingDatasetUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingDatasetUri. + */ + public com.google.protobuf.ByteString getTrainingDatasetUriBytes() { + java.lang.Object ref = trainingDatasetUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + trainingDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The trainingDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setTrainingDatasetUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + trainingDatasetUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTrainingDatasetUri() { + trainingDatasetUri_ = getDefaultInstance().getTrainingDatasetUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Storage path to file containing training dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for trainingDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setTrainingDatasetUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + trainingDatasetUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object validationDatasetUri_ = ""; + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationDatasetUri. + */ + public java.lang.String getValidationDatasetUri() { + java.lang.Object ref = validationDatasetUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validationDatasetUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationDatasetUri. + */ + public com.google.protobuf.ByteString getValidationDatasetUriBytes() { + java.lang.Object ref = validationDatasetUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + validationDatasetUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validationDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setValidationDatasetUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + validationDatasetUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidationDatasetUri() { + validationDatasetUri_ = getDefaultInstance().getValidationDatasetUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud Storage path to file containing validation dataset for
+     * tuning. The dataset must be formatted as a JSONL file.
+     * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for validationDatasetUri to set. + * @return This builder for chaining. + */ + public Builder setValidationDatasetUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + validationDatasetUri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyperParameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder> + hyperParametersBuilder_; + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hyperParameters field is set. + */ + public boolean hasHyperParameters() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hyperParameters. + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters getHyperParameters() { + if (hyperParametersBuilder_ == null) { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } else { + return hyperParametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHyperParameters( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters value) { + if (hyperParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hyperParameters_ = value; + } else { + hyperParametersBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setHyperParameters( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder builderForValue) { + if (hyperParametersBuilder_ == null) { + hyperParameters_ = builderForValue.build(); + } else { + hyperParametersBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeHyperParameters( + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters value) { + if (hyperParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && hyperParameters_ != null + && hyperParameters_ + != com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters + .getDefaultInstance()) { + getHyperParametersBuilder().mergeFrom(value); + } else { + hyperParameters_ = value; + } + } else { + hyperParametersBuilder_.mergeFrom(value); + } + if (hyperParameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearHyperParameters() { + bitField0_ = (bitField0_ & ~0x00000004); + hyperParameters_ = null; + if (hyperParametersBuilder_ != null) { + hyperParametersBuilder_.dispose(); + hyperParametersBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder + getHyperParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getHyperParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder + getHyperParametersOrBuilder() { + if (hyperParametersBuilder_ != null) { + return hyperParametersBuilder_.getMessageOrBuilder(); + } else { + return hyperParameters_ == null + ? com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.getDefaultInstance() + : hyperParameters_; + } + } + /** + * + * + *
+     * Optional. Hyperparameters for SFT.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder> + getHyperParametersFieldBuilder() { + if (hyperParametersBuilder_ == null) { + hyperParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder>( + getHyperParameters(), getParentForChildren(), isClean()); + hyperParameters_ = null; + } + return hyperParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) + private static final com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec(); + } + + public static com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SupervisedTuningSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpecOrBuilder.java new file mode 100644 index 000000000000..cacbe1a4efbd --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/SupervisedTuningSpecOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface SupervisedTuningSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The trainingDatasetUri. + */ + java.lang.String getTrainingDatasetUri(); + /** + * + * + *
+   * Required. Cloud Storage path to file containing training dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for trainingDatasetUri. + */ + com.google.protobuf.ByteString getTrainingDatasetUriBytes(); + + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validationDatasetUri. + */ + java.lang.String getValidationDatasetUri(); + /** + * + * + *
+   * Optional. Cloud Storage path to file containing validation dataset for
+   * tuning. The dataset must be formatted as a JSONL file.
+   * 
+ * + * string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for validationDatasetUri. + */ + com.google.protobuf.ByteString getValidationDatasetUriBytes(); + + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the hyperParameters field is set. + */ + boolean hasHyperParameters(); + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The hyperParameters. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters getHyperParameters(); + /** + * + * + *
+   * Optional. Hyperparameters for SFT.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedHyperParametersOrBuilder + getHyperParametersOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModel.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModel.java new file mode 100644 index 000000000000..de986c4e3744 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModel.java @@ -0,0 +1,850 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * The Model Registry Model and Online Prediction Endpoint assiociated with
+ * this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TunedModel} + */ +public final class TunedModel extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.TunedModel) + TunedModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use TunedModel.newBuilder() to construct. + private TunedModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TunedModel() { + model_ = ""; + endpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TunedModel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TunedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TunedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TunedModel.class, + com.google.cloud.aiplatform.v1beta1.TunedModel.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
+   * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
+   * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENDPOINT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object endpoint_ = ""; + /** + * + * + *
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + @java.lang.Override + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, endpoint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, endpoint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.TunedModel)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.TunedModel other = + (com.google.cloud.aiplatform.v1beta1.TunedModel) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.TunedModel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The Model Registry Model and Online Prediction Endpoint assiociated with
+   * this [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TunedModel} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.TunedModel) + com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TunedModel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TunedModel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TunedModel.class, + com.google.cloud.aiplatform.v1beta1.TunedModel.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.TunedModel.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + endpoint_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TunedModel_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TunedModel getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TunedModel build() { + com.google.cloud.aiplatform.v1beta1.TunedModel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TunedModel buildPartial() { + com.google.cloud.aiplatform.v1beta1.TunedModel result = + new com.google.cloud.aiplatform.v1beta1.TunedModel(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.TunedModel result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endpoint_ = endpoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.TunedModel) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.TunedModel) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.TunedModel other) { + if (other == com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance()) return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of the TunedModel. Format:
+     * `projects/{project}/locations/{location}/models/{model}`.
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + public java.lang.String getEndpoint() { + java.lang.Object ref = endpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + endpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + public com.google.protobuf.ByteString getEndpointBytes() { + java.lang.Object ref = endpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + endpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + endpoint_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearEndpoint() { + endpoint_ = getDefaultInstance().getEndpoint(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. A resource name of an Endpoint. Format:
+     * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+     * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for endpoint to set. + * @return This builder for chaining. + */ + public Builder setEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + endpoint_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.TunedModel) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.TunedModel) + private static final com.google.cloud.aiplatform.v1beta1.TunedModel DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.TunedModel(); + } + + public static com.google.cloud.aiplatform.v1beta1.TunedModel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TunedModel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TunedModel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModelOrBuilder.java new file mode 100644 index 000000000000..06de23f94f21 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TunedModelOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface TunedModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.TunedModel) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
+   * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * Output only. The resource name of the TunedModel. Format:
+   * `projects/{project}/locations/{location}/models/{model}`.
+   * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The endpoint. + */ + java.lang.String getEndpoint(); + /** + * + * + *
+   * Output only. A resource name of an Endpoint. Format:
+   * `projects/{project}/locations/{location}/endpoints/{endpoint}`.
+   * 
+ * + * + * string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for endpoint. + */ + com.google.protobuf.ByteString getEndpointBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStats.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStats.java new file mode 100644 index 000000000000..b954194005ce --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStats.java @@ -0,0 +1,857 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * The tuning data statistic values for
+ * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TuningDataStats} + */ +public final class TuningDataStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.TuningDataStats) + TuningDataStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuningDataStats.newBuilder() to construct. + private TuningDataStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuningDataStats() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuningDataStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TuningDataStats.class, + com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder.class); + } + + private int tuningDataStatsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object tuningDataStats_; + + public enum TuningDataStatsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUPERVISED_TUNING_DATA_STATS(1), + TUNINGDATASTATS_NOT_SET(0); + private final int value; + + private TuningDataStatsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TuningDataStatsCase valueOf(int value) { + return forNumber(value); + } + + public static TuningDataStatsCase forNumber(int value) { + switch (value) { + case 1: + return SUPERVISED_TUNING_DATA_STATS; + case 0: + return TUNINGDATASTATS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TuningDataStatsCase getTuningDataStatsCase() { + return TuningDataStatsCase.forNumber(tuningDataStatsCase_); + } + + public static final int SUPERVISED_TUNING_DATA_STATS_FIELD_NUMBER = 1; + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return Whether the supervisedTuningDataStats field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningDataStats() { + return tuningDataStatsCase_ == 1; + } + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return The supervisedTuningDataStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats + getSupervisedTuningDataStats() { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder + getSupervisedTuningDataStatsOrBuilder() { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (tuningDataStatsCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (tuningDataStatsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.TuningDataStats)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.TuningDataStats other = + (com.google.cloud.aiplatform.v1beta1.TuningDataStats) obj; + + if (!getTuningDataStatsCase().equals(other.getTuningDataStatsCase())) return false; + switch (tuningDataStatsCase_) { + case 1: + if (!getSupervisedTuningDataStats().equals(other.getSupervisedTuningDataStats())) + return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (tuningDataStatsCase_) { + case 1: + hash = (37 * hash) + SUPERVISED_TUNING_DATA_STATS_FIELD_NUMBER; + hash = (53 * hash) + getSupervisedTuningDataStats().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.TuningDataStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The tuning data statistic values for
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TuningDataStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.TuningDataStats) + com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TuningDataStats.class, + com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.TuningDataStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supervisedTuningDataStatsBuilder_ != null) { + supervisedTuningDataStatsBuilder_.clear(); + } + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningDataStats getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningDataStats build() { + com.google.cloud.aiplatform.v1beta1.TuningDataStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningDataStats buildPartial() { + com.google.cloud.aiplatform.v1beta1.TuningDataStats result = + new com.google.cloud.aiplatform.v1beta1.TuningDataStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.TuningDataStats result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.TuningDataStats result) { + result.tuningDataStatsCase_ = tuningDataStatsCase_; + result.tuningDataStats_ = this.tuningDataStats_; + if (tuningDataStatsCase_ == 1 && supervisedTuningDataStatsBuilder_ != null) { + result.tuningDataStats_ = supervisedTuningDataStatsBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.TuningDataStats) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.TuningDataStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.TuningDataStats other) { + if (other == com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance()) + return this; + switch (other.getTuningDataStatsCase()) { + case SUPERVISED_TUNING_DATA_STATS: + { + mergeSupervisedTuningDataStats(other.getSupervisedTuningDataStats()); + break; + } + case TUNINGDATASTATS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getSupervisedTuningDataStatsFieldBuilder().getBuilder(), extensionRegistry); + tuningDataStatsCase_ = 1; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int tuningDataStatsCase_ = 0; + private java.lang.Object tuningDataStats_; + + public TuningDataStatsCase getTuningDataStatsCase() { + return TuningDataStatsCase.forNumber(tuningDataStatsCase_); + } + + public Builder clearTuningDataStats() { + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder> + supervisedTuningDataStatsBuilder_; + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return Whether the supervisedTuningDataStats field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningDataStats() { + return tuningDataStatsCase_ == 1; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return The supervisedTuningDataStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats + getSupervisedTuningDataStats() { + if (supervisedTuningDataStatsBuilder_ == null) { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } else { + if (tuningDataStatsCase_ == 1) { + return supervisedTuningDataStatsBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder setSupervisedTuningDataStats( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats value) { + if (supervisedTuningDataStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningDataStats_ = value; + onChanged(); + } else { + supervisedTuningDataStatsBuilder_.setMessage(value); + } + tuningDataStatsCase_ = 1; + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder setSupervisedTuningDataStats( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder builderForValue) { + if (supervisedTuningDataStatsBuilder_ == null) { + tuningDataStats_ = builderForValue.build(); + onChanged(); + } else { + supervisedTuningDataStatsBuilder_.setMessage(builderForValue.build()); + } + tuningDataStatsCase_ = 1; + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder mergeSupervisedTuningDataStats( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats value) { + if (supervisedTuningDataStatsBuilder_ == null) { + if (tuningDataStatsCase_ == 1 + && tuningDataStats_ + != com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats + .getDefaultInstance()) { + tuningDataStats_ = + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.newBuilder( + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) + tuningDataStats_) + .mergeFrom(value) + .buildPartial(); + } else { + tuningDataStats_ = value; + } + onChanged(); + } else { + if (tuningDataStatsCase_ == 1) { + supervisedTuningDataStatsBuilder_.mergeFrom(value); + } else { + supervisedTuningDataStatsBuilder_.setMessage(value); + } + } + tuningDataStatsCase_ = 1; + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public Builder clearSupervisedTuningDataStats() { + if (supervisedTuningDataStatsBuilder_ == null) { + if (tuningDataStatsCase_ == 1) { + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + onChanged(); + } + } else { + if (tuningDataStatsCase_ == 1) { + tuningDataStatsCase_ = 0; + tuningDataStats_ = null; + } + supervisedTuningDataStatsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder + getSupervisedTuningDataStatsBuilder() { + return getSupervisedTuningDataStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder + getSupervisedTuningDataStatsOrBuilder() { + if ((tuningDataStatsCase_ == 1) && (supervisedTuningDataStatsBuilder_ != null)) { + return supervisedTuningDataStatsBuilder_.getMessageOrBuilder(); + } else { + if (tuningDataStatsCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } + } + /** + * + * + *
+     * The SFT Tuning data stats.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder> + getSupervisedTuningDataStatsFieldBuilder() { + if (supervisedTuningDataStatsBuilder_ == null) { + if (!(tuningDataStatsCase_ == 1)) { + tuningDataStats_ = + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.getDefaultInstance(); + } + supervisedTuningDataStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats) tuningDataStats_, + getParentForChildren(), + isClean()); + tuningDataStats_ = null; + } + tuningDataStatsCase_ = 1; + onChanged(); + return supervisedTuningDataStatsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.TuningDataStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.TuningDataStats) + private static final com.google.cloud.aiplatform.v1beta1.TuningDataStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.TuningDataStats(); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningDataStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuningDataStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningDataStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStatsOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStatsOrBuilder.java new file mode 100644 index 000000000000..ed8ea60a0c57 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningDataStatsOrBuilder.java @@ -0,0 +1,70 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface TuningDataStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.TuningDataStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return Whether the supervisedTuningDataStats field is set. + */ + boolean hasSupervisedTuningDataStats(); + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + * + * @return The supervisedTuningDataStats. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats getSupervisedTuningDataStats(); + /** + * + * + *
+   * The SFT Tuning data stats.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningDataStatsOrBuilder + getSupervisedTuningDataStatsOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.TuningDataStats.TuningDataStatsCase getTuningDataStatsCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJob.java new file mode 100644 index 000000000000..71274c0b02af --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJob.java @@ -0,0 +1,4918 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents a TuningJob that runs with Google owned models.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TuningJob} + */ +public final class TuningJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.TuningJob) + TuningJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuningJob.newBuilder() to construct. + private TuningJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuningJob() { + name_ = ""; + tunedModelDisplayName_ = ""; + description_ = ""; + state_ = 0; + experiment_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuningJob(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TuningJob.class, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder.class); + } + + private int bitField0_; + private int sourceModelCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object sourceModel_; + + public enum SourceModelCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BASE_MODEL(4), + SOURCEMODEL_NOT_SET(0); + private final int value; + + private SourceModelCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SourceModelCase valueOf(int value) { + return forNumber(value); + } + + public static SourceModelCase forNumber(int value) { + switch (value) { + case 4: + return BASE_MODEL; + case 0: + return SOURCEMODEL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceModelCase getSourceModelCase() { + return SourceModelCase.forNumber(sourceModelCase_); + } + + private int tuningSpecCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object tuningSpec_; + + public enum TuningSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SUPERVISED_TUNING_SPEC(5), + TUNINGSPEC_NOT_SET(0); + private final int value; + + private TuningSpecCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TuningSpecCase valueOf(int value) { + return forNumber(value); + } + + public static TuningSpecCase forNumber(int value) { + switch (value) { + case 5: + return SUPERVISED_TUNING_SPEC; + case 0: + return TUNINGSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TuningSpecCase getTuningSpecCase() { + return TuningSpecCase.forNumber(tuningSpecCase_); + } + + public static final int BASE_MODEL_FIELD_NUMBER = 4; + /** + * + * + *
+   * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return Whether the baseModel field is set. + */ + public boolean hasBaseModel() { + return sourceModelCase_ == 4; + } + /** + * + * + *
+   * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The baseModel. + */ + public java.lang.String getBaseModel() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceModelCase_ == 4) { + sourceModel_ = s; + } + return s; + } + } + /** + * + * + *
+   * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The bytes for baseModel. + */ + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceModelCase_ == 4) { + sourceModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUPERVISED_TUNING_SPEC_FIELD_NUMBER = 5; + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return Whether the supervisedTuningSpec field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningSpec() { + return tuningSpecCase_ == 5; + } + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return The supervisedTuningSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec getSupervisedTuningSpec() { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder + getSupervisedTuningSpecOrBuilder() { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TUNED_MODEL_DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object tunedModelDisplayName_ = ""; + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+   * characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tunedModelDisplayName. + */ + @java.lang.Override + public java.lang.String getTunedModelDisplayName() { + java.lang.Object ref = tunedModelDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tunedModelDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+   * characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tunedModelDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTunedModelDisplayNameBytes() { + java.lang.Object ref = tunedModelDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tunedModelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.JobState getState() { + com.google.cloud.aiplatform.v1beta1.JobState result = + com.google.cloud.aiplatform.v1beta1.JobState.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1beta1.JobState.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int ERROR_FIELD_NUMBER = 11; + private com.google.rpc.Status error_; + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + public static final int LABELS_FIELD_NUMBER = 12; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningJob_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int EXPERIMENT_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object experiment_ = ""; + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The experiment. + */ + @java.lang.Override + public java.lang.String getExperiment() { + java.lang.Object ref = experiment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + experiment_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for experiment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExperimentBytes() { + java.lang.Object ref = experiment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + experiment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TUNED_MODEL_FIELD_NUMBER = 14; + private com.google.cloud.aiplatform.v1beta1.TunedModel tunedModel_; + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tunedModel field is set. + */ + @java.lang.Override + public boolean hasTunedModel() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tunedModel. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TunedModel getTunedModel() { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance() + : tunedModel_; + } + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder getTunedModelOrBuilder() { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance() + : tunedModel_; + } + + public static final int TUNING_DATA_STATS_FIELD_NUMBER = 15; + private com.google.cloud.aiplatform.v1beta1.TuningDataStats tuningDataStats_; + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tuningDataStats field is set. + */ + @java.lang.Override + public boolean hasTuningDataStats() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDataStats. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningDataStats getTuningDataStats() { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder + getTuningDataStatsOrBuilder() { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 16; + private com.google.cloud.aiplatform.v1beta1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options for a TuningJob. If this is set,
+   * then all resources created by the TuningJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+   * Customer-managed encryption key options for a TuningJob. If this is set,
+   * then all resources created by the TuningJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key options for a TuningJob. If this is set,
+   * then all resources created by the TuningJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tunedModelDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tunedModelDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (sourceModelCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceModel_); + } + if (tuningSpecCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_); + } + if (state_ != com.google.cloud.aiplatform.v1beta1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(9, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(11, getError()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experiment_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, experiment_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(14, getTunedModel()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(15, getTuningDataStats()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(16, getEncryptionSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tunedModelDisplayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tunedModelDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (sourceModelCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceModel_); + } + if (tuningSpecCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_); + } + if (state_ != com.google.cloud.aiplatform.v1beta1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getError()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(experiment_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, experiment_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getTunedModel()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getTuningDataStats()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getEncryptionSpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.aiplatform.v1beta1.TuningJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.TuningJob other = + (com.google.cloud.aiplatform.v1beta1.TuningJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getTunedModelDisplayName().equals(other.getTunedModelDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getExperiment().equals(other.getExperiment())) return false; + if (hasTunedModel() != other.hasTunedModel()) return false; + if (hasTunedModel()) { + if (!getTunedModel().equals(other.getTunedModel())) return false; + } + if (hasTuningDataStats() != other.hasTuningDataStats()) return false; + if (hasTuningDataStats()) { + if (!getTuningDataStats().equals(other.getTuningDataStats())) return false; + } + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!getSourceModelCase().equals(other.getSourceModelCase())) return false; + switch (sourceModelCase_) { + case 4: + if (!getBaseModel().equals(other.getBaseModel())) return false; + break; + case 0: + default: + } + if (!getTuningSpecCase().equals(other.getTuningSpecCase())) return false; + switch (tuningSpecCase_) { + case 5: + if (!getSupervisedTuningSpec().equals(other.getSupervisedTuningSpec())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TUNED_MODEL_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTunedModelDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + EXPERIMENT_FIELD_NUMBER; + hash = (53 * hash) + getExperiment().hashCode(); + if (hasTunedModel()) { + hash = (37 * hash) + TUNED_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getTunedModel().hashCode(); + } + if (hasTuningDataStats()) { + hash = (37 * hash) + TUNING_DATA_STATS_FIELD_NUMBER; + hash = (53 * hash) + getTuningDataStats().hashCode(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + switch (sourceModelCase_) { + case 4: + hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getBaseModel().hashCode(); + break; + case 0: + default: + } + switch (tuningSpecCase_) { + case 5: + hash = (37 * hash) + SUPERVISED_TUNING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSupervisedTuningSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.aiplatform.v1beta1.TuningJob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a TuningJob that runs with Google owned models.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.TuningJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.TuningJob) + com.google.cloud.aiplatform.v1beta1.TuningJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 12: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.TuningJob.class, + com.google.cloud.aiplatform.v1beta1.TuningJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.TuningJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getStartTimeFieldBuilder(); + getEndTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getErrorFieldBuilder(); + getTunedModelFieldBuilder(); + getTuningDataStatsFieldBuilder(); + getEncryptionSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (supervisedTuningSpecBuilder_ != null) { + supervisedTuningSpecBuilder_.clear(); + } + name_ = ""; + tunedModelDisplayName_ = ""; + description_ = ""; + state_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + internalGetMutableLabels().clear(); + experiment_ = ""; + tunedModel_ = null; + if (tunedModelBuilder_ != null) { + tunedModelBuilder_.dispose(); + tunedModelBuilder_ = null; + } + tuningDataStats_ = null; + if (tuningDataStatsBuilder_ != null) { + tuningDataStatsBuilder_.dispose(); + tuningDataStatsBuilder_ = null; + } + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + sourceModelCase_ = 0; + sourceModel_ = null; + tuningSpecCase_ = 0; + tuningSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJobProto + .internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJob build() { + com.google.cloud.aiplatform.v1beta1.TuningJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJob buildPartial() { + com.google.cloud.aiplatform.v1beta1.TuningJob result = + new com.google.cloud.aiplatform.v1beta1.TuningJob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.TuningJob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tunedModelDisplayName_ = tunedModelDisplayName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.state_ = state_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.experiment_ = experiment_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.tunedModel_ = tunedModelBuilder_ == null ? tunedModel_ : tunedModelBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.tuningDataStats_ = + tuningDataStatsBuilder_ == null ? tuningDataStats_ : tuningDataStatsBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.encryptionSpec_ = + encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.TuningJob result) { + result.sourceModelCase_ = sourceModelCase_; + result.sourceModel_ = this.sourceModel_; + result.tuningSpecCase_ = tuningSpecCase_; + result.tuningSpec_ = this.tuningSpec_; + if (tuningSpecCase_ == 5 && supervisedTuningSpecBuilder_ != null) { + result.tuningSpec_ = supervisedTuningSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.aiplatform.v1beta1.TuningJob) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.TuningJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.TuningJob other) { + if (other == com.google.cloud.aiplatform.v1beta1.TuningJob.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTunedModelDisplayName().isEmpty()) { + tunedModelDisplayName_ = other.tunedModelDisplayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasError()) { + mergeError(other.getError()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000800; + if (!other.getExperiment().isEmpty()) { + experiment_ = other.experiment_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.hasTunedModel()) { + mergeTunedModel(other.getTunedModel()); + } + if (other.hasTuningDataStats()) { + mergeTuningDataStats(other.getTuningDataStats()); + } + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + switch (other.getSourceModelCase()) { + case BASE_MODEL: + { + sourceModelCase_ = 4; + sourceModel_ = other.sourceModel_; + onChanged(); + break; + } + case SOURCEMODEL_NOT_SET: + { + break; + } + } + switch (other.getTuningSpecCase()) { + case SUPERVISED_TUNING_SPEC: + { + mergeSupervisedTuningSpec(other.getSupervisedTuningSpec()); + break; + } + case TUNINGSPEC_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + tunedModelDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceModelCase_ = 4; + sourceModel_ = s; + break; + } // case 34 + case 42: + { + input.readMessage( + getSupervisedTuningSpecFieldBuilder().getBuilder(), extensionRegistry); + tuningSpecCase_ = 5; + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + experiment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: + { + input.readMessage(getTunedModelFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: + { + input.readMessage(getTuningDataStatsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceModelCase_ = 0; + private java.lang.Object sourceModel_; + + public SourceModelCase getSourceModelCase() { + return SourceModelCase.forNumber(sourceModelCase_); + } + + public Builder clearSourceModel() { + sourceModelCase_ = 0; + sourceModel_ = null; + onChanged(); + return this; + } + + private int tuningSpecCase_ = 0; + private java.lang.Object tuningSpec_; + + public TuningSpecCase getTuningSpecCase() { + return TuningSpecCase.forNumber(tuningSpecCase_); + } + + public Builder clearTuningSpec() { + tuningSpecCase_ = 0; + tuningSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return Whether the baseModel field is set. + */ + @java.lang.Override + public boolean hasBaseModel() { + return sourceModelCase_ == 4; + } + /** + * + * + *
+     * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return The baseModel. + */ + @java.lang.Override + public java.lang.String getBaseModel() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceModelCase_ == 4) { + sourceModel_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return The bytes for baseModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseModelBytes() { + java.lang.Object ref = ""; + if (sourceModelCase_ == 4) { + ref = sourceModel_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceModelCase_ == 4) { + sourceModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @param value The baseModel to set. + * @return This builder for chaining. + */ + public Builder setBaseModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceModelCase_ = 4; + sourceModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @return This builder for chaining. + */ + public Builder clearBaseModel() { + if (sourceModelCase_ == 4) { + sourceModelCase_ = 0; + sourceModel_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+     * 
+ * + * string base_model = 4; + * + * @param value The bytes for baseModel to set. + * @return This builder for chaining. + */ + public Builder setBaseModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceModelCase_ = 4; + sourceModel_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder> + supervisedTuningSpecBuilder_; + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * + * @return Whether the supervisedTuningSpec field is set. + */ + @java.lang.Override + public boolean hasSupervisedTuningSpec() { + return tuningSpecCase_ == 5; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * + * @return The supervisedTuningSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec getSupervisedTuningSpec() { + if (supervisedTuningSpecBuilder_ == null) { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } else { + if (tuningSpecCase_ == 5) { + return supervisedTuningSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + public Builder setSupervisedTuningSpec( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec value) { + if (supervisedTuningSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningSpec_ = value; + onChanged(); + } else { + supervisedTuningSpecBuilder_.setMessage(value); + } + tuningSpecCase_ = 5; + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + public Builder setSupervisedTuningSpec( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder builderForValue) { + if (supervisedTuningSpecBuilder_ == null) { + tuningSpec_ = builderForValue.build(); + onChanged(); + } else { + supervisedTuningSpecBuilder_.setMessage(builderForValue.build()); + } + tuningSpecCase_ = 5; + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + public Builder mergeSupervisedTuningSpec( + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec value) { + if (supervisedTuningSpecBuilder_ == null) { + if (tuningSpecCase_ == 5 + && tuningSpec_ + != com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance()) { + tuningSpec_ = + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.newBuilder( + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + tuningSpec_ = value; + } + onChanged(); + } else { + if (tuningSpecCase_ == 5) { + supervisedTuningSpecBuilder_.mergeFrom(value); + } else { + supervisedTuningSpecBuilder_.setMessage(value); + } + } + tuningSpecCase_ = 5; + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + public Builder clearSupervisedTuningSpec() { + if (supervisedTuningSpecBuilder_ == null) { + if (tuningSpecCase_ == 5) { + tuningSpecCase_ = 0; + tuningSpec_ = null; + onChanged(); + } + } else { + if (tuningSpecCase_ == 5) { + tuningSpecCase_ = 0; + tuningSpec_ = null; + } + supervisedTuningSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder + getSupervisedTuningSpecBuilder() { + return getSupervisedTuningSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder + getSupervisedTuningSpecOrBuilder() { + if ((tuningSpecCase_ == 5) && (supervisedTuningSpecBuilder_ != null)) { + return supervisedTuningSpecBuilder_.getMessageOrBuilder(); + } else { + if (tuningSpecCase_ == 5) { + return (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_; + } + return com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } + } + /** + * + * + *
+     * Tuning Spec for Supervised Fine Tuning.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder> + getSupervisedTuningSpecFieldBuilder() { + if (supervisedTuningSpecBuilder_ == null) { + if (!(tuningSpecCase_ == 5)) { + tuningSpec_ = + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.getDefaultInstance(); + } + supervisedTuningSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.Builder, + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec) tuningSpec_, + getParentForChildren(), + isClean()); + tuningSpec_ = null; + } + tuningSpecCase_ = 5; + onChanged(); + return supervisedTuningSpecBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Identifier. Resource name of a TuningJob. Format:
+     * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tunedModelDisplayName_ = ""; + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+     * characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tunedModelDisplayName. + */ + public java.lang.String getTunedModelDisplayName() { + java.lang.Object ref = tunedModelDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tunedModelDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+     * characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tunedModelDisplayName. + */ + public com.google.protobuf.ByteString getTunedModelDisplayNameBytes() { + java.lang.Object ref = tunedModelDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tunedModelDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+     * characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The tunedModelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTunedModelDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tunedModelDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+     * characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTunedModelDisplayName() { + tunedModelDisplayName_ = getDefaultInstance().getTunedModelDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The display name of the
+     * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+     * characters long and can consist of any UTF-8 characters.
+     * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for tunedModelDisplayName to set. + * @return This builder for chaining. + */ + public Builder setTunedModelDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tunedModelDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.JobState getState() { + com.google.cloud.aiplatform.v1beta1.JobState result = + com.google.cloud.aiplatform.v1beta1.JobState.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1beta1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1beta1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000020); + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000080); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+     * entered the `JOB_STATE_RUNNING` state.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + } else { + endTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + if (endTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000100); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Time when the TuningJob entered any of the following
+     * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+     * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Time when the
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000400); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + /** + * + * + *
+     * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+     * `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000800; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000800); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000800; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000800; + return this; + } + /** + * + * + *
+     * Optional. The labels with user-defined metadata to organize
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+     * such as [Model][google.cloud.aiplatform.v1.Model] and
+     * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+     *
+     * Label keys and values can be no longer than 64 characters
+     * (Unicode codepoints), can only contain lowercase letters, numeric
+     * characters, underscores and dashes. International characters are allowed.
+     *
+     * See https://goo.gl/xmQnxf for more information and examples of labels.
+     * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000800; + return this; + } + + private java.lang.Object experiment_ = ""; + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The experiment. + */ + public java.lang.String getExperiment() { + java.lang.Object ref = experiment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + experiment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for experiment. + */ + public com.google.protobuf.ByteString getExperimentBytes() { + java.lang.Object ref = experiment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + experiment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The experiment to set. + * @return This builder for chaining. + */ + public Builder setExperiment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + experiment_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearExperiment() { + experiment_ = getDefaultInstance().getExperiment(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Experiment associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for experiment to set. + * @return This builder for chaining. + */ + public Builder setExperimentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + experiment_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.TunedModel tunedModel_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TunedModel, + com.google.cloud.aiplatform.v1beta1.TunedModel.Builder, + com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder> + tunedModelBuilder_; + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tunedModel field is set. + */ + public boolean hasTunedModel() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tunedModel. + */ + public com.google.cloud.aiplatform.v1beta1.TunedModel getTunedModel() { + if (tunedModelBuilder_ == null) { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance() + : tunedModel_; + } else { + return tunedModelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTunedModel(com.google.cloud.aiplatform.v1beta1.TunedModel value) { + if (tunedModelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tunedModel_ = value; + } else { + tunedModelBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTunedModel( + com.google.cloud.aiplatform.v1beta1.TunedModel.Builder builderForValue) { + if (tunedModelBuilder_ == null) { + tunedModel_ = builderForValue.build(); + } else { + tunedModelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTunedModel(com.google.cloud.aiplatform.v1beta1.TunedModel value) { + if (tunedModelBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && tunedModel_ != null + && tunedModel_ != com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance()) { + getTunedModelBuilder().mergeFrom(value); + } else { + tunedModel_ = value; + } + } else { + tunedModelBuilder_.mergeFrom(value); + } + if (tunedModel_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTunedModel() { + bitField0_ = (bitField0_ & ~0x00002000); + tunedModel_ = null; + if (tunedModelBuilder_ != null) { + tunedModelBuilder_.dispose(); + tunedModelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.TunedModel.Builder getTunedModelBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getTunedModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder getTunedModelOrBuilder() { + if (tunedModelBuilder_ != null) { + return tunedModelBuilder_.getMessageOrBuilder(); + } else { + return tunedModel_ == null + ? com.google.cloud.aiplatform.v1beta1.TunedModel.getDefaultInstance() + : tunedModel_; + } + } + /** + * + * + *
+     * Output only. The tuned model resources assiociated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TunedModel, + com.google.cloud.aiplatform.v1beta1.TunedModel.Builder, + com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder> + getTunedModelFieldBuilder() { + if (tunedModelBuilder_ == null) { + tunedModelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TunedModel, + com.google.cloud.aiplatform.v1beta1.TunedModel.Builder, + com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder>( + getTunedModel(), getParentForChildren(), isClean()); + tunedModel_ = null; + } + return tunedModelBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.TuningDataStats tuningDataStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningDataStats, + com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder, + com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder> + tuningDataStatsBuilder_; + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tuningDataStats field is set. + */ + public boolean hasTuningDataStats() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDataStats. + */ + public com.google.cloud.aiplatform.v1beta1.TuningDataStats getTuningDataStats() { + if (tuningDataStatsBuilder_ == null) { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } else { + return tuningDataStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTuningDataStats(com.google.cloud.aiplatform.v1beta1.TuningDataStats value) { + if (tuningDataStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tuningDataStats_ = value; + } else { + tuningDataStatsBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTuningDataStats( + com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder builderForValue) { + if (tuningDataStatsBuilder_ == null) { + tuningDataStats_ = builderForValue.build(); + } else { + tuningDataStatsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTuningDataStats(com.google.cloud.aiplatform.v1beta1.TuningDataStats value) { + if (tuningDataStatsBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && tuningDataStats_ != null + && tuningDataStats_ + != com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance()) { + getTuningDataStatsBuilder().mergeFrom(value); + } else { + tuningDataStats_ = value; + } + } else { + tuningDataStatsBuilder_.mergeFrom(value); + } + if (tuningDataStats_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTuningDataStats() { + bitField0_ = (bitField0_ & ~0x00004000); + tuningDataStats_ = null; + if (tuningDataStatsBuilder_ != null) { + tuningDataStatsBuilder_.dispose(); + tuningDataStatsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder getTuningDataStatsBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getTuningDataStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder + getTuningDataStatsOrBuilder() { + if (tuningDataStatsBuilder_ != null) { + return tuningDataStatsBuilder_.getMessageOrBuilder(); + } else { + return tuningDataStats_ == null + ? com.google.cloud.aiplatform.v1beta1.TuningDataStats.getDefaultInstance() + : tuningDataStats_; + } + } + /** + * + * + *
+     * Output only. The tuning data statistics associated with this
+     * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningDataStats, + com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder, + com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder> + getTuningDataStatsFieldBuilder() { + if (tuningDataStatsBuilder_ == null) { + tuningDataStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.TuningDataStats, + com.google.cloud.aiplatform.v1beta1.TuningDataStats.Builder, + com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder>( + getTuningDataStats(), getParentForChildren(), isClean()); + tuningDataStats_ = null; + } + return tuningDataStatsBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1beta1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + } else { + encryptionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1beta1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && encryptionSpec_ != null + && encryptionSpec_ + != com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance()) { + getEncryptionSpecBuilder().mergeFrom(value); + } else { + encryptionSpec_ = value; + } + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + if (encryptionSpec_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + public Builder clearEncryptionSpec() { + bitField0_ = (bitField0_ & ~0x00008000); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder + getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a TuningJob. If this is set,
+     * then all resources created by the TuningJob will be encrypted with the
+     * provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.TuningJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.TuningJob) + private static final com.google.cloud.aiplatform.v1beta1.TuningJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.TuningJob(); + } + + public static com.google.cloud.aiplatform.v1beta1.TuningJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuningJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.TuningJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobName.java new file mode 100644 index 000000000000..6d2ed4b24bd1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobName.java @@ -0,0 +1,223 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class TuningJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_TUNING_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/tuningJobs/{tuning_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String tuningJob; + + @Deprecated + protected TuningJobName() { + project = null; + location = null; + tuningJob = null; + } + + private TuningJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + tuningJob = Preconditions.checkNotNull(builder.getTuningJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTuningJob() { + return tuningJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static TuningJobName of(String project, String location, String tuningJob) { + return newBuilder().setProject(project).setLocation(location).setTuningJob(tuningJob).build(); + } + + public static String format(String project, String location, String tuningJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setTuningJob(tuningJob) + .build() + .toString(); + } + + public static TuningJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_TUNING_JOB.validatedMatch( + formattedString, "TuningJobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("tuning_job")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (TuningJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_TUNING_JOB.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (tuningJob != null) { + fieldMapBuilder.put("tuning_job", tuningJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_TUNING_JOB.instantiate( + "project", project, "location", location, "tuning_job", tuningJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + TuningJobName that = ((TuningJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.tuningJob, that.tuningJob); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(tuningJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/tuningJobs/{tuning_job}. */ + public static class Builder { + private String project; + private String location; + private String tuningJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getTuningJob() { + return tuningJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setTuningJob(String tuningJob) { + this.tuningJob = tuningJob; + return this; + } + + private Builder(TuningJobName tuningJobName) { + this.project = tuningJobName.project; + this.location = tuningJobName.location; + this.tuningJob = tuningJobName.tuningJob; + } + + public TuningJobName build() { + return new TuningJobName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobOrBuilder.java new file mode 100644 index 000000000000..9157225ed131 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobOrBuilder.java @@ -0,0 +1,693 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public interface TuningJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.TuningJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return Whether the baseModel field is set. + */ + boolean hasBaseModel(); + /** + * + * + *
+   * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The baseModel. + */ + java.lang.String getBaseModel(); + /** + * + * + *
+   * The base model that is being tuned, e.g., "gemini-1.0-pro-002".
+   * 
+ * + * string base_model = 4; + * + * @return The bytes for baseModel. + */ + com.google.protobuf.ByteString getBaseModelBytes(); + + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return Whether the supervisedTuningSpec field is set. + */ + boolean hasSupervisedTuningSpec(); + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + * + * @return The supervisedTuningSpec. + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec getSupervisedTuningSpec(); + /** + * + * + *
+   * Tuning Spec for Supervised Fine Tuning.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.SupervisedTuningSpec supervised_tuning_spec = 5; + */ + com.google.cloud.aiplatform.v1beta1.SupervisedTuningSpecOrBuilder + getSupervisedTuningSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Identifier. Resource name of a TuningJob. Format:
+   * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+   * characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The tunedModelDisplayName. + */ + java.lang.String getTunedModelDisplayName(); + /** + * + * + *
+   * Optional. The display name of the
+   * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128
+   * characters long and can consist of any UTF-8 characters.
+   * 
+ * + * string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for tunedModelDisplayName. + */ + com.google.protobuf.ByteString getTunedModelDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1beta1.JobState getState(); + + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time
+   * entered the `JOB_STATE_RUNNING` state.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the TuningJob entered any of the following
+   * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`,
+   * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Time when the
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + /** + * + * + *
+   * Output only. Only populated when job's state is `JOB_STATE_FAILED` or
+   * `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. The labels with user-defined metadata to organize
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources
+   * such as [Model][google.cloud.aiplatform.v1.Model] and
+   * [Endpoint][google.cloud.aiplatform.v1.Endpoint].
+   *
+   * Label keys and values can be no longer than 64 characters
+   * (Unicode codepoints), can only contain lowercase letters, numeric
+   * characters, underscores and dashes. International characters are allowed.
+   *
+   * See https://goo.gl/xmQnxf for more information and examples of labels.
+   * 
+ * + * map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The experiment. + */ + java.lang.String getExperiment(); + /** + * + * + *
+   * Output only. The Experiment associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for experiment. + */ + com.google.protobuf.ByteString getExperimentBytes(); + + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tunedModel field is set. + */ + boolean hasTunedModel(); + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tunedModel. + */ + com.google.cloud.aiplatform.v1beta1.TunedModel getTunedModel(); + /** + * + * + *
+   * Output only. The tuned model resources assiociated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.TunedModelOrBuilder getTunedModelOrBuilder(); + + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tuningDataStats field is set. + */ + boolean hasTuningDataStats(); + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tuningDataStats. + */ + com.google.cloud.aiplatform.v1beta1.TuningDataStats getTuningDataStats(); + /** + * + * + *
+   * Output only. The tuning data statistics associated with this
+   * [TuningJob][google.cloud.aiplatform.v1.TuningJob].
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.TuningDataStatsOrBuilder getTuningDataStatsOrBuilder(); + + /** + * + * + *
+   * Customer-managed encryption key options for a TuningJob. If this is set,
+   * then all resources created by the TuningJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a TuningJob. If this is set,
+   * then all resources created by the TuningJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a TuningJob. If this is set,
+   * then all resources created by the TuningJob will be encrypted with the
+   * provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 16; + */ + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + com.google.cloud.aiplatform.v1beta1.TuningJob.SourceModelCase getSourceModelCase(); + + com.google.cloud.aiplatform.v1beta1.TuningJob.TuningSpecCase getTuningSpecCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobProto.java new file mode 100644 index 000000000000..0f4377ac7869 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/TuningJobProto.java @@ -0,0 +1,293 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/aiplatform/v1beta1/tuning_job.proto + +// Protobuf Java Version: 3.25.3 +package com.google.cloud.aiplatform.v1beta1; + +public final class TuningJobProto { + private TuningJobProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_TunedModel_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_TunedModel_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/aiplatform/v1beta1/tuning" + + "_job.proto\022\037google.cloud.aiplatform.v1be" + + "ta1\032\037google/api/field_behavior.proto\032\031go" + + "ogle/api/resource.proto\032-google/cloud/ai" + + "platform/v1beta1/content.proto\0325google/c" + + "loud/aiplatform/v1beta1/encryption_spec." + + "proto\032/google/cloud/aiplatform/v1beta1/j" + + "ob_state.proto\032\037google/protobuf/timestam" + + "p.proto\032\027google/rpc/status.proto\"\314\010\n\tTun" + + "ingJob\022\024\n\nbase_model\030\004 \001(\tH\000\022W\n\026supervis" + + "ed_tuning_spec\030\005 \001(\01325.google.cloud.aipl" + + "atform.v1beta1.SupervisedTuningSpecH\001\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\010\340A\003\022%\n\030tuned_model_displ" + + "ay_name\030\002 \001(\tB\003\340A\001\022\030\n\013description\030\003 \001(\tB" + + "\003\340A\001\022=\n\005state\030\006 \001(\0162).google.cloud.aipla" + + "tform.v1beta1.JobStateB\003\340A\003\0224\n\013create_ti" + + "me\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\0223\n\nstart_time\030\010 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\0221\n\010end_time\030\t \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" + + "\030\n \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "&\n\005error\030\013 \001(\0132\022.google.rpc.StatusB\003\340A\003\022" + + "K\n\006labels\030\014 \003(\01326.google.cloud.aiplatfor" + + "m.v1beta1.TuningJob.LabelsEntryB\003\340A\001\022=\n\n" + + "experiment\030\r \001(\tB)\340A\003\372A#\n!aiplatform.goo" + + "gleapis.com/Context\022E\n\013tuned_model\030\016 \001(\013" + + "2+.google.cloud.aiplatform.v1beta1.Tuned" + + "ModelB\003\340A\003\022P\n\021tuning_data_stats\030\017 \001(\01320." + + "google.cloud.aiplatform.v1beta1.TuningDa" + + "taStatsB\003\340A\003\022H\n\017encryption_spec\030\020 \001(\0132/." + + "google.cloud.aiplatform.v1beta1.Encrypti" + + "onSpec\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001:\200\001\352A}\n#aiplatform.googleap" + + "is.com/TuningJob\022?projects/{project}/loc" + + "ations/{location}/tuningJobs/{tuning_job" + + "}*\ntuningJobs2\ttuningJobB\016\n\014source_model" + + "B\r\n\013tuning_spec\"\202\001\n\nTunedModel\0226\n\005model\030" + + "\001 \001(\tB\'\340A\003\372A!\n\037aiplatform.googleapis.com" + + "/Model\022<\n\010endpoint\030\002 \001(\tB*\340A\003\372A$\n\"aiplat" + + "form.googleapis.com/Endpoint\"\334\002\n#Supervi" + + "sedTuningDatasetDistribution\022\020\n\003sum\030\001 \001(" + + "\003B\003\340A\003\022\020\n\003min\030\002 \001(\001B\003\340A\003\022\020\n\003max\030\003 \001(\001B\003\340" + + "A\003\022\021\n\004mean\030\004 \001(\001B\003\340A\003\022\023\n\006median\030\005 \001(\001B\003\340" + + "A\003\022\017\n\002p5\030\006 \001(\001B\003\340A\003\022\020\n\003p95\030\007 \001(\001B\003\340A\003\022h\n" + + "\007buckets\030\010 \003(\0132R.google.cloud.aiplatform" + + ".v1beta1.SupervisedTuningDatasetDistribu" + + "tion.DatasetBucketB\003\340A\003\032J\n\rDatasetBucket" + + "\022\022\n\005count\030\001 \001(\001B\003\340A\003\022\021\n\004left\030\002 \001(\001B\003\340A\003\022" + + "\022\n\005right\030\003 \001(\001B\003\340A\003\"\353\004\n\031SupervisedTuning" + + "DataStats\022)\n\034tuning_dataset_example_coun" + + "t\030\001 \001(\003B\003\340A\003\022)\n\034total_tuning_character_c" + + "ount\030\002 \001(\003B\003\340A\003\022+\n\036total_billable_charac" + + "ter_count\030\003 \001(\003B\003\340A\003\022\036\n\021tuning_step_coun" + + "t\030\004 \001(\003B\003\340A\003\022p\n\035user_input_token_distrib" + + "ution\030\005 \001(\0132D.google.cloud.aiplatform.v1" + + "beta1.SupervisedTuningDatasetDistributio" + + "nB\003\340A\003\022q\n\036user_output_token_distribution" + + "\030\006 \001(\0132D.google.cloud.aiplatform.v1beta1" + + ".SupervisedTuningDatasetDistributionB\003\340A" + + "\003\022x\n%user_message_per_example_distributi" + + "on\030\007 \001(\0132D.google.cloud.aiplatform.v1bet" + + "a1.SupervisedTuningDatasetDistributionB\003" + + "\340A\003\022L\n\025user_dataset_examples\030\010 \003(\0132(.goo" + + "gle.cloud.aiplatform.v1beta1.ContentB\003\340A" + + "\003\"\212\001\n\017TuningDataStats\022b\n\034supervised_tuni" + + "ng_data_stats\030\001 \001(\0132:.google.cloud.aipla" + + "tform.v1beta1.SupervisedTuningDataStatsH" + + "\000B\023\n\021tuning_data_stats\"\314\002\n\031SupervisedHyp" + + "erParameters\022\030\n\013epoch_count\030\001 \001(\003B\003\340A\001\022%" + + "\n\030learning_rate_multiplier\030\002 \001(\001B\003\340A\001\022a\n" + + "\014adapter_size\030\003 \001(\0162F.google.cloud.aipla" + + "tform.v1beta1.SupervisedHyperParameters." + + "AdapterSizeB\003\340A\001\"\212\001\n\013AdapterSize\022\034\n\030ADAP" + + "TER_SIZE_UNSPECIFIED\020\000\022\024\n\020ADAPTER_SIZE_O" + + "NE\020\001\022\025\n\021ADAPTER_SIZE_FOUR\020\002\022\026\n\022ADAPTER_S" + + "IZE_EIGHT\020\003\022\030\n\024ADAPTER_SIZE_SIXTEEN\020\004\"\271\001" + + "\n\024SupervisedTuningSpec\022!\n\024training_datas" + + "et_uri\030\001 \001(\tB\003\340A\002\022#\n\026validation_dataset_" + + "uri\030\002 \001(\tB\003\340A\001\022Y\n\020hyper_parameters\030\003 \001(\013" + + "2:.google.cloud.aiplatform.v1beta1.Super" + + "visedHyperParametersB\003\340A\001B\345\001\n#com.google" + + ".cloud.aiplatform.v1beta1B\016TuningJobProt" + + "oP\001ZCcloud.google.com/go/aiplatform/apiv" + + "1beta1/aiplatformpb;aiplatformpb\252\002\037Googl" + + "e.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Clou" + + "d\\AIPlatform\\V1beta1\352\002\"Google::Cloud::AI" + + "Platform::V1beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.ContentProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.JobStateProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor, + new java.lang.String[] { + "BaseModel", + "SupervisedTuningSpec", + "Name", + "TunedModelDisplayName", + "Description", + "State", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Error", + "Labels", + "Experiment", + "TunedModel", + "TuningDataStats", + "EncryptionSpec", + "SourceModel", + "TuningSpec", + }); + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_TuningJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1beta1_TunedModel_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_TunedModel_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_TunedModel_descriptor, + new java.lang.String[] { + "Model", "Endpoint", + }); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor, + new java.lang.String[] { + "Sum", "Min", "Max", "Mean", "Median", "P5", "P95", "Buckets", + }); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDatasetDistribution_DatasetBucket_descriptor, + new java.lang.String[] { + "Count", "Left", "Right", + }); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningDataStats_descriptor, + new java.lang.String[] { + "TuningDatasetExampleCount", + "TotalTuningCharacterCount", + "TotalBillableCharacterCount", + "TuningStepCount", + "UserInputTokenDistribution", + "UserOutputTokenDistribution", + "UserMessagePerExampleDistribution", + "UserDatasetExamples", + }); + internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_TuningDataStats_descriptor, + new java.lang.String[] { + "SupervisedTuningDataStats", "TuningDataStats", + }); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_SupervisedHyperParameters_descriptor, + new java.lang.String[] { + "EpochCount", "LearningRateMultiplier", "AdapterSize", + }); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_SupervisedTuningSpec_descriptor, + new java.lang.String[] { + "TrainingDatasetUri", "ValidationDatasetUri", "HyperParameters", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.ContentProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.JobStateProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/genai_tuning_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/genai_tuning_service.proto new file mode 100644 index 000000000000..cc44a829f9b8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/genai_tuning_service.proto @@ -0,0 +1,164 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/tuning_job.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "GenAiTuningServiceProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// A service for creating and managing GenAI Tuning Jobs. +service GenAiTuningService { + option (google.api.default_host) = "aiplatform.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a TuningJob. A created TuningJob right away will be attempted to + // be run. + rpc CreateTuningJob(CreateTuningJobRequest) returns (TuningJob) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/tuningJobs" + body: "tuning_job" + }; + option (google.api.method_signature) = "parent,tuning_job"; + } + + // Gets a TuningJob. + rpc GetTuningJob(GetTuningJobRequest) returns (TuningJob) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/tuningJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists TuningJobs in a Location. + rpc ListTuningJobs(ListTuningJobsRequest) returns (ListTuningJobsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/tuningJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Cancels a TuningJob. + // Starts asynchronous cancellation on the TuningJob. The server makes a best + // effort to cancel the job, but success is not guaranteed. Clients can use + // [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob] + // or other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, the + // TuningJob is not deleted; instead it becomes a job with a + // [TuningJob.error][google.cloud.aiplatform.v1beta1.TuningJob.error] value + // with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding + // to `Code.CANCELLED`, and + // [TuningJob.state][google.cloud.aiplatform.v1beta1.TuningJob.state] is set + // to `CANCELLED`. + rpc CancelTuningJob(CancelTuningJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/tuningJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for +// [GenAiTuningService.CreateTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.CreateTuningJob]. +message CreateTuningJobRequest { + // Required. The resource name of the Location to create the TuningJob in. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The TuningJob to create. + TuningJob tuning_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.GetTuningJob]. +message GetTuningJobRequest { + // Required. The name of the TuningJob resource. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TuningJob" + } + ]; +} + +// Request message for +// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1beta1.GenAiTuningService.ListTuningJobs]. +message ListTuningJobsRequest { + // Required. The resource name of the Location to list the TuningJobs from. + // Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. The standard list filter. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page size. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The standard list page token. + // Typically obtained via [ListTuningJob.next_page_token][] of the + // previous GenAiTuningService.ListTuningJob][] call. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [GenAiTuningService.ListTuningJobs][google.cloud.aiplatform.v1beta1.GenAiTuningService.ListTuningJobs] +message ListTuningJobsResponse { + // List of TuningJobs in the requested page. + repeated TuningJob tuning_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListTuningJobsRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [GenAiTuningService.CancelTuningJob][google.cloud.aiplatform.v1beta1.GenAiTuningService.CancelTuningJob]. +message CancelTuningJobRequest { + // Required. The name of the TuningJob to cancel. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/TuningJob" + } + ]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tuning_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tuning_job.proto new file mode 100644 index 000000000000..7dd52c5047e3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/tuning_job.proto @@ -0,0 +1,286 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/content.proto"; +import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1beta1/job_state.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; +option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; +option java_multiple_files = true; +option java_outer_classname = "TuningJobProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Represents a TuningJob that runs with Google owned models. +message TuningJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/TuningJob" + pattern: "projects/{project}/locations/{location}/tuningJobs/{tuning_job}" + plural: "tuningJobs" + singular: "tuningJob" + }; + + oneof source_model { + // The base model that is being tuned, e.g., "gemini-1.0-pro-002". + string base_model = 4; + } + + oneof tuning_spec { + // Tuning Spec for Supervised Fine Tuning. + SupervisedTuningSpec supervised_tuning_spec = 5; + } + + // Output only. Identifier. Resource name of a TuningJob. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. The display name of the + // [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 + // characters long and can consist of any UTF-8 characters. + string tuned_model_display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The description of the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The detailed state of the job. + JobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + // entered the `JOB_STATE_RUNNING` state. + google.protobuf.Timestamp start_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the TuningJob entered any of the following + // [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + // `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + google.protobuf.Timestamp end_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + // updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Only populated when job's state is `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + google.rpc.Status error = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The labels with user-defined metadata to organize + // [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + // such as [Model][google.cloud.aiplatform.v1.Model] and + // [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + // + // Label keys and values can be no longer than 64 characters + // (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // + // See https://goo.gl/xmQnxf for more information and examples of labels. + map labels = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Experiment associated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + string experiment = 13 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Context" + } + ]; + + // Output only. The tuned model resources assiociated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + TunedModel tuned_model = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The tuning data statistics associated with this + // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + TuningDataStats tuning_data_stats = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Customer-managed encryption key options for a TuningJob. If this is set, + // then all resources created by the TuningJob will be encrypted with the + // provided encryption key. + EncryptionSpec encryption_spec = 16; +} + +// The Model Registry Model and Online Prediction Endpoint assiociated with +// this [TuningJob][google.cloud.aiplatform.v1.TuningJob]. +message TunedModel { + // Output only. The resource name of the TunedModel. Format: + // `projects/{project}/locations/{location}/models/{model}`. + string model = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // Output only. A resource name of an Endpoint. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + string endpoint = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; +} + +// Dataset distribution for Supervised Tuning. +message SupervisedTuningDatasetDistribution { + // Dataset bucket used to create a histogram for the distribution given a + // population of values. + message DatasetBucket { + // Output only. Number of values in the bucket. + double count = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Left bound of the bucket. + double left = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Right bound of the bucket. + double right = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Sum of a given population of values. + int64 sum = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The minimum of the population values. + double min = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The maximum of the population values. + double max = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The arithmetic mean of the values in the population. + double mean = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The median of the values in the population. + double median = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The 5th percentile of the values in the population. + double p5 = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The 95th percentile of the values in the population. + double p95 = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Defines the histogram bucket. + repeated DatasetBucket buckets = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Tuning data statistics for Supervised Tuning. +message SupervisedTuningDataStats { + // Output only. Number of examples in the tuning dataset. + int64 tuning_dataset_example_count = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of tuning characters in the tuning dataset. + int64 total_tuning_character_count = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of billable characters in the tuning dataset. + int64 total_billable_character_count = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Number of tuning steps for this Tuning Job. + int64 tuning_step_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dataset distributions for the user input tokens. + SupervisedTuningDatasetDistribution user_input_token_distribution = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dataset distributions for the user output tokens. + SupervisedTuningDatasetDistribution user_output_token_distribution = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Dataset distributions for the messages per example. + SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Sample user messages in the training dataset uri. + repeated Content user_dataset_examples = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The tuning data statistic values for +// [TuningJob][google.cloud.aiplatform.v1.TuningJob]. +message TuningDataStats { + oneof tuning_data_stats { + // The SFT Tuning data stats. + SupervisedTuningDataStats supervised_tuning_data_stats = 1; + } +} + +// Hyperparameters for SFT. +message SupervisedHyperParameters { + // Supported adapter sizes for tuning. + enum AdapterSize { + // Adapter size is unspecified. + ADAPTER_SIZE_UNSPECIFIED = 0; + + // Adapter size 1. + ADAPTER_SIZE_ONE = 1; + + // Adapter size 4. + ADAPTER_SIZE_FOUR = 2; + + // Adapter size 8. + ADAPTER_SIZE_EIGHT = 3; + + // Adapter size 16. + ADAPTER_SIZE_SIXTEEN = 4; + } + + // Optional. Number of complete passes the model makes over the entire + // training dataset during training. + int64 epoch_count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Multiplier for adjusting the default learning rate. + double learning_rate_multiplier = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Adapter size for tuning. + AdapterSize adapter_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Tuning Spec for Supervised Tuning. +message SupervisedTuningSpec { + // Required. Cloud Storage path to file containing training dataset for + // tuning. The dataset must be formatted as a JSONL file. + string training_dataset_uri = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Cloud Storage path to file containing validation dataset for + // tuning. The dataset must be formatted as a JSONL file. + string validation_dataset_uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hyperparameters for SFT. + SupervisedHyperParameters hyper_parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java new file mode 100644 index 000000000000..af4b5a11dfea --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/AsyncCancelTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; +import com.google.protobuf.Empty; + +public class AsyncCancelTuningJob { + + public static void main(String[] args) throws Exception { + asyncCancelTuningJob(); + } + + public static void asyncCancelTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CancelTuningJobRequest request = + CancelTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + ApiFuture future = + genAiTuningServiceClient.cancelTuningJobCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java new file mode 100644 index 000000000000..a583b0ddb495 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJob.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_sync] +import com.google.cloud.aiplatform.v1beta1.CancelTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; +import com.google.protobuf.Empty; + +public class SyncCancelTuningJob { + + public static void main(String[] args) throws Exception { + syncCancelTuningJob(); + } + + public static void syncCancelTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CancelTuningJobRequest request = + CancelTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + genAiTuningServiceClient.cancelTuningJob(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java new file mode 100644 index 000000000000..8920ce4cfcfa --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_String_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; +import com.google.protobuf.Empty; + +public class SyncCancelTuningJobString { + + public static void main(String[] args) throws Exception { + syncCancelTuningJobString(); + } + + public static void syncCancelTuningJobString() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString(); + genAiTuningServiceClient.cancelTuningJob(name); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java new file mode 100644 index 000000000000..1f22edbe169e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/canceltuningjob/SyncCancelTuningJobTuningjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_Tuningjobname_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; +import com.google.protobuf.Empty; + +public class SyncCancelTuningJobTuningjobname { + + public static void main(String[] args) throws Exception { + syncCancelTuningJobTuningjobname(); + } + + public static void syncCancelTuningJobTuningjobname() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + genAiTuningServiceClient.cancelTuningJob(name); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CancelTuningJob_Tuningjobname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetCredentialsProvider.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..434fab64e314 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + GenAiTuningServiceSettings genAiTuningServiceSettings = + GenAiTuningServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + GenAiTuningServiceClient genAiTuningServiceClient = + GenAiTuningServiceClient.create(genAiTuningServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_Create_SetCredentialsProvider_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetEndpoint.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..adb431770511 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_Create_SetEndpoint_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceSettings; +import com.google.cloud.aiplatform.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + GenAiTuningServiceSettings genAiTuningServiceSettings = + GenAiTuningServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + GenAiTuningServiceClient genAiTuningServiceClient = + GenAiTuningServiceClient.create(genAiTuningServiceSettings); + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_Create_SetEndpoint_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java new file mode 100644 index 000000000000..b0a360acbccb --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/AsyncCreateTuningJob.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class AsyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + asyncCreateTuningJob(); + } + + public static void asyncCreateTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTuningJob(TuningJob.newBuilder().build()) + .build(); + ApiFuture future = + genAiTuningServiceClient.createTuningJobCallable().futureCall(request); + // Do something. + TuningJob response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJob.java new file mode 100644 index 000000000000..b730d21081b6 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJob.java @@ -0,0 +1,47 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_sync] +import com.google.cloud.aiplatform.v1beta1.CreateTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class SyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJob(); + } + + public static void syncCreateTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + CreateTuningJobRequest request = + CreateTuningJobRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setTuningJob(TuningJob.newBuilder().build()) + .build(); + TuningJob response = genAiTuningServiceClient.createTuningJob(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java new file mode 100644 index 000000000000..409d36e61d84 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobLocationnameTuningjob.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_LocationnameTuningjob_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class SyncCreateTuningJobLocationnameTuningjob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJobLocationnameTuningjob(); + } + + public static void syncCreateTuningJobLocationnameTuningjob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + TuningJob tuningJob = TuningJob.newBuilder().build(); + TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_LocationnameTuningjob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java new file mode 100644 index 000000000000..0ea8f37a3475 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/createtuningjob/SyncCreateTuningJobStringTuningjob.java @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_StringTuningjob_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class SyncCreateTuningJobStringTuningjob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJobStringTuningjob(); + } + + public static void syncCreateTuningJobStringTuningjob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + TuningJob tuningJob = TuningJob.newBuilder().build(); + TuningJob response = genAiTuningServiceClient.createTuningJob(parent, tuningJob); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_CreateTuningJob_StringTuningjob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..402fc82eb251 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = + genAiTuningServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/SyncGetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..11b10c20704b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = genAiTuningServiceClient.getIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/AsyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..1d18d4659711 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + genAiTuningServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetLocation_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/SyncGetLocation.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..e2077a3b0730 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetLocation_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = genAiTuningServiceClient.getLocation(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetLocation_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/AsyncGetTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/AsyncGetTuningJob.java new file mode 100644 index 000000000000..23f8dcb91c4b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/AsyncGetTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; + +public class AsyncGetTuningJob { + + public static void main(String[] args) throws Exception { + asyncGetTuningJob(); + } + + public static void asyncGetTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetTuningJobRequest request = + GetTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + ApiFuture future = + genAiTuningServiceClient.getTuningJobCallable().futureCall(request); + // Do something. + TuningJob response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJob.java new file mode 100644 index 000000000000..8987758c7625 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJob.java @@ -0,0 +1,46 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.GetTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; + +public class SyncGetTuningJob { + + public static void main(String[] args) throws Exception { + syncGetTuningJob(); + } + + public static void syncGetTuningJob() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + GetTuningJobRequest request = + GetTuningJobRequest.newBuilder() + .setName(TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString()) + .build(); + TuningJob response = genAiTuningServiceClient.getTuningJob(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobString.java new file mode 100644 index 000000000000..ff6ee37d3f2e --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_String_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; + +public class SyncGetTuningJobString { + + public static void main(String[] args) throws Exception { + syncGetTuningJobString(); + } + + public static void syncGetTuningJobString() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]").toString(); + TuningJob response = genAiTuningServiceClient.getTuningJob(name); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java new file mode 100644 index 000000000000..787e950acc5b --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/gettuningjob/SyncGetTuningJobTuningjobname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_Tuningjobname_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.cloud.aiplatform.v1beta1.TuningJobName; + +public class SyncGetTuningJobTuningjobname { + + public static void main(String[] args) throws Exception { + syncGetTuningJobTuningjobname(); + } + + public static void syncGetTuningJobTuningjobname() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TuningJobName name = TuningJobName.of("[PROJECT]", "[LOCATION]", "[TUNING_JOB]"); + TuningJob response = genAiTuningServiceClient.getTuningJob(name); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_GetTuningJob_Tuningjobname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..93e07d36eb29 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + genAiTuningServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListLocations_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocationsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..9099a107c5ee --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListLocations_Paged_async] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + genAiTuningServiceClient.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; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListLocations_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/SyncListLocations.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..d715b3fa159d --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListLocations_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : genAiTuningServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListLocations_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java new file mode 100644 index 000000000000..721c2cff1ef7 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobs.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class AsyncListTuningJobs { + + public static void main(String[] args) throws Exception { + asyncListTuningJobs(); + } + + public static void asyncListTuningJobs() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + genAiTuningServiceClient.listTuningJobsPagedCallable().futureCall(request); + // Do something. + for (TuningJob element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java new file mode 100644 index 000000000000..b87320c50f34 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/AsyncListTuningJobsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_Paged_async] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsResponse; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; +import com.google.common.base.Strings; + +public class AsyncListTuningJobsPaged { + + public static void main(String[] args) throws Exception { + asyncListTuningJobsPaged(); + } + + public static void asyncListTuningJobsPaged() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListTuningJobsResponse response = + genAiTuningServiceClient.listTuningJobsCallable().call(request); + for (TuningJob element : response.getTuningJobsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_Paged_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobs.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobs.java new file mode 100644 index 000000000000..64be308b13fe --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobs.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.ListTuningJobsRequest; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class SyncListTuningJobs { + + public static void main(String[] args) throws Exception { + syncListTuningJobs(); + } + + public static void syncListTuningJobs() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + ListTuningJobsRequest request = + ListTuningJobsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (TuningJob element : genAiTuningServiceClient.listTuningJobs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java new file mode 100644 index 000000000000..bbd14ad28734 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsLocationname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_Locationname_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class SyncListTuningJobsLocationname { + + public static void main(String[] args) throws Exception { + syncListTuningJobsLocationname(); + } + + public static void syncListTuningJobsLocationname() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_Locationname_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java new file mode 100644 index 000000000000..afe9a946580c --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/listtuningjobs/SyncListTuningJobsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_String_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.cloud.aiplatform.v1beta1.LocationName; +import com.google.cloud.aiplatform.v1beta1.TuningJob; + +public class SyncListTuningJobsString { + + public static void main(String[] args) throws Exception { + syncListTuningJobsString(); + } + + public static void syncListTuningJobsString() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (TuningJob element : genAiTuningServiceClient.listTuningJobs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_ListTuningJobs_String_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..22da371b28de --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,56 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + genAiTuningServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_SetIamPolicy_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/SyncSetIamPolicy.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..ce0211eff6ed --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_SetIamPolicy_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = genAiTuningServiceClient.setIamPolicy(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_SetIamPolicy_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java new file mode 100644 index 000000000000..25d358fa5a59 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/AsyncTestIamPermissions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_TestIamPermissions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class AsyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + asyncTestIamPermissions(); + } + + public static void asyncTestIamPermissions() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + ApiFuture future = + genAiTuningServiceClient.testIamPermissionsCallable().futureCall(request); + // Do something. + TestIamPermissionsResponse response = future.get(); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_TestIamPermissions_async] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/SyncTestIamPermissions.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/SyncTestIamPermissions.java new file mode 100644 index 000000000000..031886d86fe9 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservice/testiampermissions/SyncTestIamPermissions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningService_TestIamPermissions_sync] +import com.google.cloud.aiplatform.v1beta1.EndpointName; +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceClient; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import java.util.ArrayList; + +public class SyncTestIamPermissions { + + public static void main(String[] args) throws Exception { + syncTestIamPermissions(); + } + + public static void syncTestIamPermissions() throws Exception { + // 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 (GenAiTuningServiceClient genAiTuningServiceClient = GenAiTuningServiceClient.create()) { + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource( + EndpointName.ofProjectLocationEndpointName( + "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllPermissions(new ArrayList()) + .build(); + TestIamPermissionsResponse response = genAiTuningServiceClient.testIamPermissions(request); + } + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningService_TestIamPermissions_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java new file mode 100644 index 000000000000..efd5aa3a7be3 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/genaituningservicesettings/createtuningjob/SyncCreateTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningServiceSettings_CreateTuningJob_sync] +import com.google.cloud.aiplatform.v1beta1.GenAiTuningServiceSettings; +import java.time.Duration; + +public class SyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJob(); + } + + public static void syncCreateTuningJob() throws Exception { + // 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 + GenAiTuningServiceSettings.Builder genAiTuningServiceSettingsBuilder = + GenAiTuningServiceSettings.newBuilder(); + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .setRetrySettings( + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GenAiTuningServiceSettings genAiTuningServiceSettings = + genAiTuningServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningServiceSettings_CreateTuningJob_sync] diff --git a/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java new file mode 100644 index 000000000000..9658630b0bd5 --- /dev/null +++ b/java-aiplatform/samples/snippets/generated/com/google/cloud/aiplatform/v1beta1/stub/genaituningservicestubsettings/createtuningjob/SyncCreateTuningJob.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.aiplatform.v1beta1.stub.samples; + +// [START aiplatform_v1beta1_generated_GenAiTuningServiceStubSettings_CreateTuningJob_sync] +import com.google.cloud.aiplatform.v1beta1.stub.GenAiTuningServiceStubSettings; +import java.time.Duration; + +public class SyncCreateTuningJob { + + public static void main(String[] args) throws Exception { + syncCreateTuningJob(); + } + + public static void syncCreateTuningJob() throws Exception { + // 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 + GenAiTuningServiceStubSettings.Builder genAiTuningServiceSettingsBuilder = + GenAiTuningServiceStubSettings.newBuilder(); + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .setRetrySettings( + genAiTuningServiceSettingsBuilder + .createTuningJobSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + GenAiTuningServiceStubSettings genAiTuningServiceSettings = + genAiTuningServiceSettingsBuilder.build(); + } +} +// [END aiplatform_v1beta1_generated_GenAiTuningServiceStubSettings_CreateTuningJob_sync] diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java index 191dba14abea..31a5835cb532 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecution.java @@ -68,8 +68,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * When task is completed as the status of FAILED or SUCCEEDED,
-   * exit code is for one task execution result, default is 0 as success.
+   * The exit code of a finished task.
+   *
+   * If the task succeeded, the exit code will be 0. If the task failed but not
+   * due to the following reasons, the exit code will be 50000.
+   *
+   * Otherwise, it can be from different sources:
+   * - Batch known failures as
+   * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+   * - Batch runnable execution failures: You can rely on Batch logs for further
+   * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+   * If there are multiple runnables failures, Batch only exposes the first
+   * error caught for now.
    * 
* * int32 exit_code = 1; @@ -425,8 +435,18 @@ public Builder mergeFrom( * * *
-     * When task is completed as the status of FAILED or SUCCEEDED,
-     * exit code is for one task execution result, default is 0 as success.
+     * The exit code of a finished task.
+     *
+     * If the task succeeded, the exit code will be 0. If the task failed but not
+     * due to the following reasons, the exit code will be 50000.
+     *
+     * Otherwise, it can be from different sources:
+     * - Batch known failures as
+     * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+     * - Batch runnable execution failures: You can rely on Batch logs for further
+     * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+     * If there are multiple runnables failures, Batch only exposes the first
+     * error caught for now.
      * 
* * int32 exit_code = 1; @@ -441,8 +461,18 @@ public int getExitCode() { * * *
-     * When task is completed as the status of FAILED or SUCCEEDED,
-     * exit code is for one task execution result, default is 0 as success.
+     * The exit code of a finished task.
+     *
+     * If the task succeeded, the exit code will be 0. If the task failed but not
+     * due to the following reasons, the exit code will be 50000.
+     *
+     * Otherwise, it can be from different sources:
+     * - Batch known failures as
+     * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+     * - Batch runnable execution failures: You can rely on Batch logs for further
+     * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+     * If there are multiple runnables failures, Batch only exposes the first
+     * error caught for now.
      * 
* * int32 exit_code = 1; @@ -461,8 +491,18 @@ public Builder setExitCode(int value) { * * *
-     * When task is completed as the status of FAILED or SUCCEEDED,
-     * exit code is for one task execution result, default is 0 as success.
+     * The exit code of a finished task.
+     *
+     * If the task succeeded, the exit code will be 0. If the task failed but not
+     * due to the following reasons, the exit code will be 50000.
+     *
+     * Otherwise, it can be from different sources:
+     * - Batch known failures as
+     * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+     * - Batch runnable execution failures: You can rely on Batch logs for further
+     * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+     * If there are multiple runnables failures, Batch only exposes the first
+     * error caught for now.
      * 
* * int32 exit_code = 1; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java index 6f0f39ca36d9..d49b68bb2d37 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1/src/main/java/com/google/cloud/batch/v1/TaskExecutionOrBuilder.java @@ -28,8 +28,18 @@ public interface TaskExecutionOrBuilder * * *
-   * When task is completed as the status of FAILED or SUCCEEDED,
-   * exit code is for one task execution result, default is 0 as success.
+   * The exit code of a finished task.
+   *
+   * If the task succeeded, the exit code will be 0. If the task failed but not
+   * due to the following reasons, the exit code will be 50000.
+   *
+   * Otherwise, it can be from different sources:
+   * - Batch known failures as
+   * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+   * - Batch runnable execution failures: You can rely on Batch logs for further
+   * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+   * If there are multiple runnables failures, Batch only exposes the first
+   * error caught for now.
    * 
* * int32 exit_code = 1; diff --git a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto index dabd66b0d9be..3b5f6d03fa94 100644 --- a/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto +++ b/java-batch/proto-google-cloud-batch-v1/src/main/proto/google/cloud/batch/v1/task.proto @@ -102,8 +102,18 @@ message StatusEvent { // This Task Execution field includes detail information for // task execution procedures, based on StatusEvent types. message TaskExecution { - // When task is completed as the status of FAILED or SUCCEEDED, - // exit code is for one task execution result, default is 0 as success. + // The exit code of a finished task. + // + // If the task succeeded, the exit code will be 0. If the task failed but not + // due to the following reasons, the exit code will be 50000. + // + // Otherwise, it can be from different sources: + // - Batch known failures as + // https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + // - Batch runnable execution failures: You can rely on Batch logs for further + // diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. + // If there are multiple runnables failures, Batch only exposes the first + // error caught for now. int32 exit_code = 1; } diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecution.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecution.java index e067b750ee2d..48a34a07eb0c 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecution.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecution.java @@ -70,8 +70,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * When task is completed as the status of FAILED or SUCCEEDED,
-   * exit code is for one task execution result, default is 0 as success.
+   * The exit code of a finished task.
+   *
+   * If the task succeeded, the exit code will be 0. If the task failed but not
+   * due to the following reasons, the exit code will be 50000.
+   *
+   * Otherwise, it can be from different sources:
+   * - Batch known failures as
+   * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+   * - Batch runnable execution failures: You can rely on Batch logs for further
+   * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+   * If there are multiple runnables failures, Batch only exposes the first
+   * error caught for now.
    * 
* * int32 exit_code = 1; @@ -505,8 +515,18 @@ public Builder mergeFrom( * * *
-     * When task is completed as the status of FAILED or SUCCEEDED,
-     * exit code is for one task execution result, default is 0 as success.
+     * The exit code of a finished task.
+     *
+     * If the task succeeded, the exit code will be 0. If the task failed but not
+     * due to the following reasons, the exit code will be 50000.
+     *
+     * Otherwise, it can be from different sources:
+     * - Batch known failures as
+     * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+     * - Batch runnable execution failures: You can rely on Batch logs for further
+     * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+     * If there are multiple runnables failures, Batch only exposes the first
+     * error caught for now.
      * 
* * int32 exit_code = 1; @@ -521,8 +541,18 @@ public int getExitCode() { * * *
-     * When task is completed as the status of FAILED or SUCCEEDED,
-     * exit code is for one task execution result, default is 0 as success.
+     * The exit code of a finished task.
+     *
+     * If the task succeeded, the exit code will be 0. If the task failed but not
+     * due to the following reasons, the exit code will be 50000.
+     *
+     * Otherwise, it can be from different sources:
+     * - Batch known failures as
+     * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+     * - Batch runnable execution failures: You can rely on Batch logs for further
+     * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+     * If there are multiple runnables failures, Batch only exposes the first
+     * error caught for now.
      * 
* * int32 exit_code = 1; @@ -541,8 +571,18 @@ public Builder setExitCode(int value) { * * *
-     * When task is completed as the status of FAILED or SUCCEEDED,
-     * exit code is for one task execution result, default is 0 as success.
+     * The exit code of a finished task.
+     *
+     * If the task succeeded, the exit code will be 0. If the task failed but not
+     * due to the following reasons, the exit code will be 50000.
+     *
+     * Otherwise, it can be from different sources:
+     * - Batch known failures as
+     * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+     * - Batch runnable execution failures: You can rely on Batch logs for further
+     * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+     * If there are multiple runnables failures, Batch only exposes the first
+     * error caught for now.
      * 
* * int32 exit_code = 1; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecutionOrBuilder.java b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecutionOrBuilder.java index f7ab5c58c623..f8d8e23e72dd 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecutionOrBuilder.java +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/java/com/google/cloud/batch/v1alpha/TaskExecutionOrBuilder.java @@ -28,8 +28,18 @@ public interface TaskExecutionOrBuilder * * *
-   * When task is completed as the status of FAILED or SUCCEEDED,
-   * exit code is for one task execution result, default is 0 as success.
+   * The exit code of a finished task.
+   *
+   * If the task succeeded, the exit code will be 0. If the task failed but not
+   * due to the following reasons, the exit code will be 50000.
+   *
+   * Otherwise, it can be from different sources:
+   * - Batch known failures as
+   * https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
+   * - Batch runnable execution failures: You can rely on Batch logs for further
+   * diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
+   * If there are multiple runnables failures, Batch only exposes the first
+   * error caught for now.
    * 
* * int32 exit_code = 1; diff --git a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto index fb059487aa11..81a2e038752b 100644 --- a/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto +++ b/java-batch/proto-google-cloud-batch-v1alpha/src/main/proto/google/cloud/batch/v1alpha/task.proto @@ -107,8 +107,18 @@ message StatusEvent { // This Task Execution field includes detail information for // task execution procedures, based on StatusEvent types. message TaskExecution { - // When task is completed as the status of FAILED or SUCCEEDED, - // exit code is for one task execution result, default is 0 as success. + // The exit code of a finished task. + // + // If the task succeeded, the exit code will be 0. If the task failed but not + // due to the following reasons, the exit code will be 50000. + // + // Otherwise, it can be from different sources: + // - Batch known failures as + // https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes. + // - Batch runnable execution failures: You can rely on Batch logs for further + // diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. + // If there are multiple runnables failures, Batch only exposes the first + // error caught for now. int32 exit_code = 1; // Optional. The tail end of any content written to standard error by the task diff --git a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java index 01b0d577aed0..1f282a13f09c 100644 --- a/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java +++ b/java-chat/google-cloud-chat/src/main/java/com/google/chat/v1/ChatServiceClient.java @@ -68,7 +68,7 @@ * * *

CreateMessage - *

Creates a message in a Google Chat space. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). + *

Creates a message in a Google Chat space. The maximum message size, including text and cards, is 32,000 bytes. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). *

Calling this method requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) and supports the following authentication types: *

- For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.) * @@ -306,8 +306,8 @@ * *

SetUpSpace *

Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). - *

To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user{@literal @}example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user{@literal @}example.com` or `users/123456789`. - *

For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. + *

To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user{@literal @}example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user{@literal @}example.com` or `users/123456789`. + *

For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. *

To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. *

To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). *

If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. @@ -397,7 +397,7 @@ * *

CreateMembership *

Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [Invite or add a user or a Google Chat app to a space](https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - *

To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: + *

To specify the member to add, set the `membership.member.name` for the human or app member. *

- To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. *

- To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user{@literal @}example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user{@literal @}example.com` or `users/123456789`. * @@ -418,7 +418,8 @@ * * *

UpdateMembership - *

Updates a membership. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). + *

Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). + *

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    @@ -514,7 +515,7 @@ * * *

    GetSpaceReadState - *

    Returns details about a user's read state within a space, used to identify read and unread messages. + *

    Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see [Get details about a user's space read state](https://developers.google.com/workspace/chat/get-space-read-state). *

    Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    @@ -534,7 +535,7 @@ * * *

    UpdateSpaceReadState - *

    Updates a user's read state within a space, used to identify read and unread messages. + *

    Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). *

    Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    @@ -553,7 +554,7 @@ * * *

    GetThreadReadState - *

    Returns details about a user's read state within a thread, used to identify read and unread messages. + *

    Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see [Get details about a user's thread read state](https://developers.google.com/workspace/chat/get-thread-read-state). *

    Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    @@ -676,7 +677,8 @@ public ChatServiceStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a message in a Google Chat space. For an example, see [Send a + * Creates a message in a Google Chat space. The maximum message size, including text and cards, + * is 32,000 bytes. For an example, see [Send a * message](https://developers.google.com/workspace/chat/create-messages). * *

    Calling this method requires @@ -732,7 +734,8 @@ public final Message createMessage(SpaceName parent, Message message, String mes // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a message in a Google Chat space. For an example, see [Send a + * Creates a message in a Google Chat space. The maximum message size, including text and cards, + * is 32,000 bytes. For an example, see [Send a * message](https://developers.google.com/workspace/chat/create-messages). * *

    Calling this method requires @@ -788,7 +791,8 @@ public final Message createMessage(String parent, Message message, String messag // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a message in a Google Chat space. For an example, see [Send a + * Creates a message in a Google Chat space. The maximum message size, including text and cards, + * is 32,000 bytes. For an example, see [Send a * message](https://developers.google.com/workspace/chat/create-messages). * *

    Calling this method requires @@ -828,7 +832,8 @@ public final Message createMessage(CreateMessageRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a message in a Google Chat space. For an example, see [Send a + * Creates a message in a Google Chat space. The maximum message size, including text and cards, + * is 32,000 bytes. For an example, see [Send a * message](https://developers.google.com/workspace/chat/create-messages). * *

    Calling this method requires @@ -1324,7 +1329,9 @@ public final ListMembershipsPagedResponse listMemberships(ListMembershipsRequest * } * * @param name Required. Resource name of the membership to retrieve. - *

    To get the app's own membership, you can optionally use `spaces/{space}/members/app`. + *

    To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. *

    Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` *

    When [authenticated as a * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you @@ -1366,7 +1373,9 @@ public final Membership getMembership(MembershipName name) { * } * * @param name Required. Resource name of the membership to retrieve. - *

    To get the app's own membership, you can optionally use `spaces/{space}/members/app`. + *

    To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. *

    Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` *

    When [authenticated as a * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you @@ -2529,16 +2538,17 @@ public final UnaryCallable createSpaceCallable() { * space, and shouldn't be specified as a membership in the request. For an example, see [Set up a * space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). * - *

    To specify the human members to add, add memberships with the appropriate `member.name` in - * the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the + *

    To specify the human members to add, add memberships with the appropriate + * `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the * email address for the user. For users in the same Workspace organization `{user}` can also be * the `id` for the person from the People API, or the `id` for the user in the Directory API. For * example, if the People API Person profile ID for `user{@literal @}example.com` is `123456789`, * you can add the user to the space by setting the `membership.member.name` to * `users/user{@literal @}example.com` or `users/123456789`. * - *

    For a space or group chat, if the caller blocks or is blocked by some members, then those - * members aren't added to the created space. + *

    For a named space or group chat, if the caller blocks, or is blocked by some members, or + * doesn't have permission to add some members, then those members aren't added to the created + * space. * *

    To create a direct message (DM) between the calling user and another human user, specify * exactly one membership to represent the human user. If one user blocks the other, the request @@ -2592,16 +2602,17 @@ public final Space setUpSpace(SetUpSpaceRequest request) { * space, and shouldn't be specified as a membership in the request. For an example, see [Set up a * space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). * - *

    To specify the human members to add, add memberships with the appropriate `member.name` in - * the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the + *

    To specify the human members to add, add memberships with the appropriate + * `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the * email address for the user. For users in the same Workspace organization `{user}` can also be * the `id` for the person from the People API, or the `id` for the user in the Directory API. For * example, if the People API Person profile ID for `user{@literal @}example.com` is `123456789`, * you can add the user to the space by setting the `membership.member.name` to * `users/user{@literal @}example.com` or `users/123456789`. * - *

    For a space or group chat, if the caller blocks or is blocked by some members, then those - * members aren't added to the created space. + *

    For a named space or group chat, if the caller blocks, or is blocked by some members, or + * doesn't have permission to add some members, then those members aren't added to the created + * space. * *

    To create a direct message (DM) between the calling user and another human user, specify * exactly one membership to represent the human user. If one user blocks the other, the request @@ -3061,8 +3072,7 @@ public final UnaryCallable findDirectMessageCal * adds the member directly to the specified space. Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * - *

    To specify the member to add, set the `membership.member.name` in the - * `CreateMembershipRequest`: + *

    To specify the member to add, set the `membership.member.name` for the human or app member. * *

    - To add the calling app to a space or a direct message between two human users, use * `users/app`. Unable to add other apps to the space. @@ -3126,8 +3136,7 @@ public final Membership createMembership(SpaceName parent, Membership membership * adds the member directly to the specified space. Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * - *

    To specify the member to add, set the `membership.member.name` in the - * `CreateMembershipRequest`: + *

    To specify the member to add, set the `membership.member.name` for the human or app member. * *

    - To add the calling app to a space or a direct message between two human users, use * `users/app`. Unable to add other apps to the space. @@ -3188,8 +3197,7 @@ public final Membership createMembership(String parent, Membership membership) { * adds the member directly to the specified space. Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * - *

    To specify the member to add, set the `membership.member.name` in the - * `CreateMembershipRequest`: + *

    To specify the member to add, set the `membership.member.name` for the human or app member. * *

    - To add the calling app to a space or a direct message between two human users, use * `users/app`. Unable to add other apps to the space. @@ -3236,8 +3244,7 @@ public final Membership createMembership(CreateMembershipRequest request) { * adds the member directly to the specified space. Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * - *

    To specify the member to add, set the `membership.member.name` in the - * `CreateMembershipRequest`: + *

    To specify the member to add, set the `membership.member.name` for the human or app member. * *

    - To add the calling app to a space or a direct message between two human users, use * `users/app`. Unable to add other apps to the space. @@ -3276,8 +3283,11 @@ public final UnaryCallable createMembership // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a membership. Requires [user - * authentication](https://developers.google.com/chat/api/guides/auth/users). + * Updates a membership. For an example, see [Update a user's membership in a + * space](https://developers.google.com/workspace/chat/update-members). + * + *

    Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

    Sample code: * @@ -3313,8 +3323,11 @@ public final Membership updateMembership(Membership membership, FieldMask update // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a membership. Requires [user - * authentication](https://developers.google.com/chat/api/guides/auth/users). + * Updates a membership. For an example, see [Update a user's membership in a + * space](https://developers.google.com/workspace/chat/update-members). + * + *

    Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

    Sample code: * @@ -3343,8 +3356,11 @@ public final Membership updateMembership(UpdateMembershipRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a membership. Requires [user - * authentication](https://developers.google.com/chat/api/guides/auth/users). + * Updates a membership. For an example, see [Update a user's membership in a + * space](https://developers.google.com/workspace/chat/update-members). + * + *

    Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). * *

    Sample code: * @@ -3942,7 +3958,8 @@ public final UnaryCallable deleteReactionCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a space, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -3982,7 +3999,8 @@ public final SpaceReadState getSpaceReadState(SpaceReadStateName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a space, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4019,7 +4037,8 @@ public final SpaceReadState getSpaceReadState(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a space, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4051,7 +4070,8 @@ public final SpaceReadState getSpaceReadState(GetSpaceReadStateRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a space, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4082,7 +4102,9 @@ public final UnaryCallable getSpaceRea // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a user's read state within a space, used to identify read and unread messages. + * Updates a user's read state within a space, used to identify read and unread messages. For an + * example, see [Update a user's space read + * state](https://developers.google.com/workspace/chat/update-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4133,7 +4155,9 @@ public final SpaceReadState updateSpaceReadState( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a user's read state within a space, used to identify read and unread messages. + * Updates a user's read state within a space, used to identify read and unread messages. For an + * example, see [Update a user's space read + * state](https://developers.google.com/workspace/chat/update-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4165,7 +4189,9 @@ public final SpaceReadState updateSpaceReadState(UpdateSpaceReadStateRequest req // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Updates a user's read state within a space, used to identify read and unread messages. + * Updates a user's read state within a space, used to identify read and unread messages. For an + * example, see [Update a user's space read + * state](https://developers.google.com/workspace/chat/update-space-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4199,7 +4225,8 @@ public final SpaceReadState updateSpaceReadState(UpdateSpaceReadStateRequest req // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a thread, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4241,7 +4268,8 @@ public final ThreadReadState getThreadReadState(ThreadReadStateName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a thread, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4281,7 +4309,8 @@ public final ThreadReadState getThreadReadState(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a thread, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -4313,7 +4342,8 @@ public final ThreadReadState getThreadReadState(GetThreadReadStateRequest reques // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns details about a user's read state within a thread, used to identify read and unread - * messages. + * messages. For an example, see [Get details about a user's thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). * *

    Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). diff --git a/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java b/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java index d5cb09d7dc1c..3193bd90514f 100644 --- a/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java +++ b/java-chat/grpc-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceGrpc.java @@ -1138,7 +1138,8 @@ public interface AsyncService { * * *

    -     * Creates a message in a Google Chat space. For an example, see [Send a
    +     * Creates a message in a Google Chat space. The maximum message size,
    +     * including text and cards, is 32,000 bytes. For an example, see [Send a
          * message](https://developers.google.com/workspace/chat/create-messages).
          * Calling this method requires
          * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
    @@ -1424,16 +1425,16 @@ default void createSpace(
          * [Set up a space with initial
          * members](https://developers.google.com/workspace/chat/set-up-spaces).
          * To specify the human members to add, add memberships with the appropriate
    -     * `member.name` in the `SetUpSpaceRequest`. To add a human user, use
    -     * `users/{user}`, where `{user}` can be the email address for the user. For
    -     * users in the same Workspace organization `{user}` can also be the `id` for
    -     * the person from the People API, or the `id` for the user in the Directory
    -     * API. For example, if the People API Person profile ID for
    -     * `user@example.com` is `123456789`, you can add the user to the space by
    -     * setting the `membership.member.name` to `users/user@example.com` or
    -     * `users/123456789`.
    -     * For a space or group chat, if the caller blocks or is blocked by some
    -     * members, then those members aren't added to the created space.
    +     * `membership.member.name`. To add a human user, use `users/{user}`, where
    +     * `{user}` can be the email address for the user. For users in the same
    +     * Workspace organization `{user}` can also be the `id` for the person from
    +     * the People API, or the `id` for the user in the Directory API. For example,
    +     * if the People API Person profile ID for `user@example.com` is `123456789`,
    +     * you can add the user to the space by setting the `membership.member.name`
    +     * to `users/user@example.com` or `users/123456789`.
    +     * For a named space or group chat, if the caller blocks, or is blocked
    +     * by some members, or doesn't have permission to add some members, then
    +     * those members aren't added to the created space.
          * To create a direct message (DM) between the calling user and another human
          * user, specify exactly one membership to represent the human user. If
          * one user blocks the other, the request fails and the DM isn't created.
    @@ -1564,8 +1565,8 @@ default void findDirectMessage(
          * invitation before joining. Otherwise, creating a membership adds the member
          * directly to the specified space. Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
    -     * To specify the member to add, set the `membership.member.name` in the
    -     * `CreateMembershipRequest`:
    +     * To specify the member to add, set the `membership.member.name` for the
    +     * human or app member.
          * - To add the calling app to a space or a direct message between two human
          *   users, use `users/app`. Unable to add other
          *   apps to the space.
    @@ -1589,8 +1590,10 @@ default void createMembership(
          *
          *
          * 
    -     * Updates a membership. Requires [user
    -     * authentication](https://developers.google.com/chat/api/guides/auth/users).
    +     * Updates a membership. For an example, see [Update a user's membership in
    +     * a space](https://developers.google.com/workspace/chat/update-members).
    +     * Requires [user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    */ default void updateMembership( @@ -1679,7 +1682,9 @@ default void deleteReaction( * *
          * Returns details about a user's read state within a space, used to identify
    -     * read and unread messages.
    +     * read and unread messages. For an example, see [Get details about a user's
    +     * space read
    +     * state](https://developers.google.com/workspace/chat/get-space-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -1696,7 +1701,8 @@ default void getSpaceReadState( * *
          * Updates a user's read state within a space, used to identify read and
    -     * unread messages.
    +     * unread messages. For an example, see [Update a user's space read
    +     * state](https://developers.google.com/workspace/chat/update-space-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -1713,7 +1719,9 @@ default void updateSpaceReadState( * *
          * Returns details about a user's read state within a thread, used to identify
    -     * read and unread messages.
    +     * read and unread messages. For an example, see [Get details about a user's
    +     * thread read
    +     * state](https://developers.google.com/workspace/chat/get-thread-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -1766,7 +1774,8 @@ protected ChatServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions cal * * *
    -     * Creates a message in a Google Chat space. For an example, see [Send a
    +     * Creates a message in a Google Chat space. The maximum message size,
    +     * including text and cards, is 32,000 bytes. For an example, see [Send a
          * message](https://developers.google.com/workspace/chat/create-messages).
          * Calling this method requires
          * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
    @@ -2073,16 +2082,16 @@ public void createSpace(
          * [Set up a space with initial
          * members](https://developers.google.com/workspace/chat/set-up-spaces).
          * To specify the human members to add, add memberships with the appropriate
    -     * `member.name` in the `SetUpSpaceRequest`. To add a human user, use
    -     * `users/{user}`, where `{user}` can be the email address for the user. For
    -     * users in the same Workspace organization `{user}` can also be the `id` for
    -     * the person from the People API, or the `id` for the user in the Directory
    -     * API. For example, if the People API Person profile ID for
    -     * `user@example.com` is `123456789`, you can add the user to the space by
    -     * setting the `membership.member.name` to `users/user@example.com` or
    -     * `users/123456789`.
    -     * For a space or group chat, if the caller blocks or is blocked by some
    -     * members, then those members aren't added to the created space.
    +     * `membership.member.name`. To add a human user, use `users/{user}`, where
    +     * `{user}` can be the email address for the user. For users in the same
    +     * Workspace organization `{user}` can also be the `id` for the person from
    +     * the People API, or the `id` for the user in the Directory API. For example,
    +     * if the People API Person profile ID for `user@example.com` is `123456789`,
    +     * you can add the user to the space by setting the `membership.member.name`
    +     * to `users/user@example.com` or `users/123456789`.
    +     * For a named space or group chat, if the caller blocks, or is blocked
    +     * by some members, or doesn't have permission to add some members, then
    +     * those members aren't added to the created space.
          * To create a direct message (DM) between the calling user and another human
          * user, specify exactly one membership to represent the human user. If
          * one user blocks the other, the request fails and the DM isn't created.
    @@ -2222,8 +2231,8 @@ public void findDirectMessage(
          * invitation before joining. Otherwise, creating a membership adds the member
          * directly to the specified space. Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
    -     * To specify the member to add, set the `membership.member.name` in the
    -     * `CreateMembershipRequest`:
    +     * To specify the member to add, set the `membership.member.name` for the
    +     * human or app member.
          * - To add the calling app to a space or a direct message between two human
          *   users, use `users/app`. Unable to add other
          *   apps to the space.
    @@ -2249,8 +2258,10 @@ public void createMembership(
          *
          *
          * 
    -     * Updates a membership. Requires [user
    -     * authentication](https://developers.google.com/chat/api/guides/auth/users).
    +     * Updates a membership. For an example, see [Update a user's membership in
    +     * a space](https://developers.google.com/workspace/chat/update-members).
    +     * Requires [user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    */ public void updateMembership( @@ -2349,7 +2360,9 @@ public void deleteReaction( * *
          * Returns details about a user's read state within a space, used to identify
    -     * read and unread messages.
    +     * read and unread messages. For an example, see [Get details about a user's
    +     * space read
    +     * state](https://developers.google.com/workspace/chat/get-space-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -2368,7 +2381,8 @@ public void getSpaceReadState( * *
          * Updates a user's read state within a space, used to identify read and
    -     * unread messages.
    +     * unread messages. For an example, see [Update a user's space read
    +     * state](https://developers.google.com/workspace/chat/update-space-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -2387,7 +2401,9 @@ public void updateSpaceReadState( * *
          * Returns details about a user's read state within a thread, used to identify
    -     * read and unread messages.
    +     * read and unread messages. For an example, see [Get details about a user's
    +     * thread read
    +     * state](https://developers.google.com/workspace/chat/get-thread-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -2426,7 +2442,8 @@ protected ChatServiceBlockingStub build( * * *
    -     * Creates a message in a Google Chat space. For an example, see [Send a
    +     * Creates a message in a Google Chat space. The maximum message size,
    +     * including text and cards, is 32,000 bytes. For an example, see [Send a
          * message](https://developers.google.com/workspace/chat/create-messages).
          * Calling this method requires
          * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
    @@ -2700,16 +2717,16 @@ public com.google.chat.v1.Space createSpace(com.google.chat.v1.CreateSpaceReques
          * [Set up a space with initial
          * members](https://developers.google.com/workspace/chat/set-up-spaces).
          * To specify the human members to add, add memberships with the appropriate
    -     * `member.name` in the `SetUpSpaceRequest`. To add a human user, use
    -     * `users/{user}`, where `{user}` can be the email address for the user. For
    -     * users in the same Workspace organization `{user}` can also be the `id` for
    -     * the person from the People API, or the `id` for the user in the Directory
    -     * API. For example, if the People API Person profile ID for
    -     * `user@example.com` is `123456789`, you can add the user to the space by
    -     * setting the `membership.member.name` to `users/user@example.com` or
    -     * `users/123456789`.
    -     * For a space or group chat, if the caller blocks or is blocked by some
    -     * members, then those members aren't added to the created space.
    +     * `membership.member.name`. To add a human user, use `users/{user}`, where
    +     * `{user}` can be the email address for the user. For users in the same
    +     * Workspace organization `{user}` can also be the `id` for the person from
    +     * the People API, or the `id` for the user in the Directory API. For example,
    +     * if the People API Person profile ID for `user@example.com` is `123456789`,
    +     * you can add the user to the space by setting the `membership.member.name`
    +     * to `users/user@example.com` or `users/123456789`.
    +     * For a named space or group chat, if the caller blocks, or is blocked
    +     * by some members, or doesn't have permission to add some members, then
    +     * those members aren't added to the created space.
          * To create a direct message (DM) between the calling user and another human
          * user, specify exactly one membership to represent the human user. If
          * one user blocks the other, the request fails and the DM isn't created.
    @@ -2832,8 +2849,8 @@ public com.google.chat.v1.Space findDirectMessage(
          * invitation before joining. Otherwise, creating a membership adds the member
          * directly to the specified space. Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
    -     * To specify the member to add, set the `membership.member.name` in the
    -     * `CreateMembershipRequest`:
    +     * To specify the member to add, set the `membership.member.name` for the
    +     * human or app member.
          * - To add the calling app to a space or a direct message between two human
          *   users, use `users/app`. Unable to add other
          *   apps to the space.
    @@ -2856,8 +2873,10 @@ public com.google.chat.v1.Membership createMembership(
          *
          *
          * 
    -     * Updates a membership. Requires [user
    -     * authentication](https://developers.google.com/chat/api/guides/auth/users).
    +     * Updates a membership. For an example, see [Update a user's membership in
    +     * a space](https://developers.google.com/workspace/chat/update-members).
    +     * Requires [user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    */ public com.google.chat.v1.Membership updateMembership( @@ -2941,7 +2960,9 @@ public com.google.protobuf.Empty deleteReaction( * *
          * Returns details about a user's read state within a space, used to identify
    -     * read and unread messages.
    +     * read and unread messages. For an example, see [Get details about a user's
    +     * space read
    +     * state](https://developers.google.com/workspace/chat/get-space-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -2957,7 +2978,8 @@ public com.google.chat.v1.SpaceReadState getSpaceReadState( * *
          * Updates a user's read state within a space, used to identify read and
    -     * unread messages.
    +     * unread messages. For an example, see [Update a user's space read
    +     * state](https://developers.google.com/workspace/chat/update-space-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -2973,7 +2995,9 @@ public com.google.chat.v1.SpaceReadState updateSpaceReadState( * *
          * Returns details about a user's read state within a thread, used to identify
    -     * read and unread messages.
    +     * read and unread messages. For an example, see [Get details about a user's
    +     * thread read
    +     * state](https://developers.google.com/workspace/chat/get-thread-read-state).
          * Requires [user
          * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    @@ -3009,7 +3033,8 @@ protected ChatServiceFutureStub build( * * *
    -     * Creates a message in a Google Chat space. For an example, see [Send a
    +     * Creates a message in a Google Chat space. The maximum message size,
    +     * including text and cards, is 32,000 bytes. For an example, see [Send a
          * message](https://developers.google.com/workspace/chat/create-messages).
          * Calling this method requires
          * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize)
    @@ -3289,16 +3314,16 @@ public com.google.common.util.concurrent.ListenableFuture
    -     * Updates a membership. Requires [user
    -     * authentication](https://developers.google.com/chat/api/guides/auth/users).
    +     * Updates a membership. For an example, see [Update a user's membership in
    +     * a space](https://developers.google.com/workspace/chat/update-members).
    +     * Requires [user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
          * 
    */ public com.google.common.util.concurrent.ListenableFuture @@ -3535,7 +3562,9 @@ public com.google.common.util.concurrent.ListenableFuture * Returns details about a user's read state within a space, used to identify - * read and unread messages. + * read and unread messages. For an example, see [Get details about a user's + * space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). * Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). *
    @@ -3551,7 +3580,8 @@ public com.google.common.util.concurrent.ListenableFuture * Updates a user's read state within a space, used to identify read and - * unread messages. + * unread messages. For an example, see [Update a user's space read + * state](https://developers.google.com/workspace/chat/update-space-read-state). * Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). *
    @@ -3567,7 +3597,9 @@ public com.google.common.util.concurrent.ListenableFuture * Returns details about a user's read state within a thread, used to identify - * read and unread messages. + * read and unread messages. For an example, see [Get details about a user's + * thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). * Requires [user * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). *
    diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ActionStatusProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ActionStatusProto.java index 678ee9209078..69e692b8c593 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ActionStatusProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ActionStatusProto.java @@ -45,11 +45,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ogle.chat.v1\032\025google/rpc/code.proto\"R\n\014A" + "ctionStatus\022%\n\013status_code\030\001 \001(\0162\020.googl" + "e.rpc.Code\022\033\n\023user_facing_message\030\002 \001(\tB" - + "\234\001\n\022com.google.chat.v1B\021ActionStatusProt" + + "\252\001\n\022com.google.chat.v1B\021ActionStatusProt" + "oP\001Z,cloud.google.com/go/chat/apiv1/chat" - + "pb;chatpb\252\002\023Google.Apps.Chat.V1\312\002\023Google" - + "\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006" - + "proto3" + + "pb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Apps.Ch" + + "at.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Ap" + + "ps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AnnotationProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AnnotationProto.java index 0c3cd28483a4..c81bdb66e9ad 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AnnotationProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AnnotationProto.java @@ -58,46 +58,48 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n\037google/chat/v1/annotation.proto\022\016googl" - + "e.chat.v1\032\037google/chat/v1/attachment.pro" - + "to\032\031google/chat/v1/user.proto\"\274\002\n\nAnnota" - + "tion\022,\n\004type\030\001 \001(\0162\036.google.chat.v1.Anno" - + "tationType\022\030\n\013start_index\030\002 \001(\005H\001\210\001\001\022\016\n\006" - + "length\030\003 \001(\005\022;\n\014user_mention\030\004 \001(\0132#.goo" - + "gle.chat.v1.UserMentionMetadataH\000\022=\n\rsla" - + "sh_command\030\005 \001(\0132$.google.chat.v1.SlashC" - + "ommandMetadataH\000\022>\n\022rich_link_metadata\030\006" - + " \001(\0132 .google.chat.v1.RichLinkMetadataH\000" - + "B\n\n\010metadataB\016\n\014_start_index\"\245\001\n\023UserMen" - + "tionMetadata\022\"\n\004user\030\001 \001(\0132\024.google.chat" - + ".v1.User\0226\n\004type\030\002 \001(\0162(.google.chat.v1." - + "UserMentionMetadata.Type\"2\n\004Type\022\024\n\020TYPE" - + "_UNSPECIFIED\020\000\022\007\n\003ADD\020\001\022\013\n\007MENTION\020\002\"\350\001\n" - + "\024SlashCommandMetadata\022!\n\003bot\030\001 \001(\0132\024.goo" - + "gle.chat.v1.User\0227\n\004type\030\002 \001(\0162).google." - + "chat.v1.SlashCommandMetadata.Type\022\024\n\014com" - + "mand_name\030\003 \001(\t\022\022\n\ncommand_id\030\004 \001(\003\022\027\n\017t" - + "riggers_dialog\030\005 \001(\010\"1\n\004Type\022\024\n\020TYPE_UNS" - + "PECIFIED\020\000\022\007\n\003ADD\020\001\022\n\n\006INVOKE\020\002\"\350\001\n\020Rich" - + "LinkMetadata\022\013\n\003uri\030\001 \001(\t\022E\n\016rich_link_t" - + "ype\030\002 \001(\0162-.google.chat.v1.RichLinkMetad" - + "ata.RichLinkType\0228\n\017drive_link_data\030\003 \001(" - + "\0132\035.google.chat.v1.DriveLinkDataH\000\">\n\014Ri" - + "chLinkType\022\036\n\032RICH_LINK_TYPE_UNSPECIFIED" - + "\020\000\022\016\n\nDRIVE_FILE\020\001B\006\n\004data\"X\n\rDriveLinkD" - + "ata\0224\n\016drive_data_ref\030\001 \001(\0132\034.google.cha" - + "t.v1.DriveDataRef\022\021\n\tmime_type\030\002 \001(\t*e\n\016" - + "AnnotationType\022\037\n\033ANNOTATION_TYPE_UNSPEC" - + "IFIED\020\000\022\020\n\014USER_MENTION\020\001\022\021\n\rSLASH_COMMA" - + "ND\020\002\022\r\n\tRICH_LINK\020\003B\232\001\n\022com.google.chat." - + "v1B\017AnnotationProtoP\001Z,cloud.google.com/" - + "go/chat/apiv1/chatpb;chatpb\252\002\023Google.App" - + "s.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google" - + "::Apps::Chat::V1b\006proto3" + + "e.chat.v1\032\031google/api/resource.proto\032\037go" + + "ogle/chat/v1/attachment.proto\032\031google/ch" + + "at/v1/user.proto\"\274\002\n\nAnnotation\022,\n\004type\030" + + "\001 \001(\0162\036.google.chat.v1.AnnotationType\022\030\n" + + "\013start_index\030\002 \001(\005H\001\210\001\001\022\016\n\006length\030\003 \001(\005\022" + + ";\n\014user_mention\030\004 \001(\0132#.google.chat.v1.U" + + "serMentionMetadataH\000\022=\n\rslash_command\030\005 " + + "\001(\0132$.google.chat.v1.SlashCommandMetadat" + + "aH\000\022>\n\022rich_link_metadata\030\006 \001(\0132 .google" + + ".chat.v1.RichLinkMetadataH\000B\n\n\010metadataB" + + "\016\n\014_start_index\"\245\001\n\023UserMentionMetadata\022" + + "\"\n\004user\030\001 \001(\0132\024.google.chat.v1.User\0226\n\004t" + + "ype\030\002 \001(\0162(.google.chat.v1.UserMentionMe" + + "tadata.Type\"2\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020" + + "\000\022\007\n\003ADD\020\001\022\013\n\007MENTION\020\002\"\350\001\n\024SlashCommand" + + "Metadata\022!\n\003bot\030\001 \001(\0132\024.google.chat.v1.U" + + "ser\0227\n\004type\030\002 \001(\0162).google.chat.v1.Slash" + + "CommandMetadata.Type\022\024\n\014command_name\030\003 \001" + + "(\t\022\022\n\ncommand_id\030\004 \001(\003\022\027\n\017triggers_dialo" + + "g\030\005 \001(\010\"1\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\007\n" + + "\003ADD\020\001\022\n\n\006INVOKE\020\002\"\350\001\n\020RichLinkMetadata\022" + + "\013\n\003uri\030\001 \001(\t\022E\n\016rich_link_type\030\002 \001(\0162-.g" + + "oogle.chat.v1.RichLinkMetadata.RichLinkT" + + "ype\0228\n\017drive_link_data\030\003 \001(\0132\035.google.ch" + + "at.v1.DriveLinkDataH\000\">\n\014RichLinkType\022\036\n" + + "\032RICH_LINK_TYPE_UNSPECIFIED\020\000\022\016\n\nDRIVE_F" + + "ILE\020\001B\006\n\004data\"X\n\rDriveLinkData\0224\n\016drive_" + + "data_ref\030\001 \001(\0132\034.google.chat.v1.DriveDat" + + "aRef\022\021\n\tmime_type\030\002 \001(\t*e\n\016AnnotationTyp" + + "e\022\037\n\033ANNOTATION_TYPE_UNSPECIFIED\020\000\022\020\n\014US" + + "ER_MENTION\020\001\022\021\n\rSLASH_COMMAND\020\002\022\r\n\tRICH_" + + "LINK\020\003B\250\001\n\022com.google.chat.v1B\017Annotatio" + + "nProtoP\001Z,cloud.google.com/go/chat/apiv1" + + "/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Ap" + + "ps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Googl" + + "e::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), com.google.chat.v1.AttachmentProto.getDescriptor(), com.google.chat.v1.UserProto.getDescriptor(), }); @@ -146,6 +148,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DriveDataRef", "MimeType", }); + com.google.api.ResourceProto.getDescriptor(); com.google.chat.v1.AttachmentProto.getDescriptor(); com.google.chat.v1.UserProto.getDescriptor(); } diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AttachmentProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AttachmentProto.java index 360606b1013c..291b24d4d30a 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AttachmentProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/AttachmentProto.java @@ -86,11 +86,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ssage\022\025\n\010filename\030\004 \001(\tB\003\340A\002\"Z\n\030UploadAt" + "tachmentResponse\022>\n\023attachment_data_ref\030" + "\001 \001(\0132!.google.chat.v1.AttachmentDataRef" - + "B\232\001\n\022com.google.chat.v1B\017AttachmentProto" + + "B\250\001\n\022com.google.chat.v1B\017AttachmentProto" + "P\001Z,cloud.google.com/go/chat/apiv1/chatp" - + "b;chatpb\252\002\023Google.Apps.Chat.V1\312\002\023Google\\" - + "Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006p" - + "roto3" + + "b;chatpb\242\002\013DYNAPIProto\252\002\023Google.Apps.Cha" + + "t.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::App" + + "s::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java index d889a0ec32d6..89b83248c686 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ChatServiceProto.java @@ -163,11 +163,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pis.com/auth/chat.spaces.readonly,https:" + "//www.googleapis.com/auth/chat.users.rea" + "dstate,https://www.googleapis.com/auth/c" - + "hat.users.readstate.readonlyB\233\001\n\022com.goo" + + "hat.users.readstate.readonlyB\251\001\n\022com.goo" + "gle.chat.v1B\020ChatServiceProtoP\001Z,cloud.g" - + "oogle.com/go/chat/apiv1/chatpb;chatpb\252\002\023" - + "Google.Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V" - + "1\352\002\026Google::Apps::Chat::V1b\006proto3" + + "oogle.com/go/chat/apiv1/chatpb;chatpb\242\002\013" + + "DYNAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023Goog" + + "le\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ContextualAddOnProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ContextualAddOnProto.java index 5d40eb17bcc2..cc51459c5367 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ContextualAddOnProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ContextualAddOnProto.java @@ -75,11 +75,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "-\n\007widgets\030\002 \003(\0132\034.google.chat.v1.Widget" + "Markup\032Z\n\nCardAction\022\024\n\014action_label\030\001 \001" + "(\t\0226\n\010on_click\030\002 \001(\0132$.google.chat.v1.Wi" - + "dgetMarkup.OnClickB\237\001\n\022com.google.chat.v" + + "dgetMarkup.OnClickB\255\001\n\022com.google.chat.v" + "1B\024ContextualAddOnProtoP\001Z,cloud.google." - + "com/go/chat/apiv1/chatpb;chatpb\252\002\023Google" - + ".Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Go" - + "ogle::Apps::Chat::V1b\006proto3" + + "com/go/chat/apiv1/chatpb;chatpb\242\002\013DYNAPI" + + "Proto\252\002\023Google.Apps.Chat.V1\312\002\023Google\\App" + + "s\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java index 8ef6e67da259..b267dd72fd3a 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java @@ -373,7 +373,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return The threadKey. */ @java.lang.Override @@ -406,7 +406,7 @@ public java.lang.String getThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return The bytes for threadKey. */ @java.lang.Override @@ -1408,7 +1408,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return The threadKey. */ @java.lang.Deprecated @@ -1440,7 +1440,7 @@ public java.lang.String getThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return The bytes for threadKey. */ @java.lang.Deprecated @@ -1472,7 +1472,7 @@ public com.google.protobuf.ByteString getThreadKeyBytes() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @param value The threadKey to set. * @return This builder for chaining. */ @@ -1503,7 +1503,7 @@ public Builder setThreadKey(java.lang.String value) { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1530,7 +1530,7 @@ public Builder clearThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @param value The bytes for threadKey to set. * @return This builder for chaining. */ diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java index f2d60f90eaca..7324b46bfb57 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java @@ -109,7 +109,7 @@ public interface CreateMessageRequestOrBuilder * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return The threadKey. */ @java.lang.Deprecated @@ -131,7 +131,7 @@ public interface CreateMessageRequestOrBuilder * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=502 + * google/chat/v1/message.proto;l=503 * @return The bytes for threadKey. */ @java.lang.Deprecated diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmoji.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmoji.java index 771c9c9216d1..11423abbc288 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmoji.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmoji.java @@ -69,10 +69,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
    -   * Unique key for the custom emoji resource.
    +   * Output only. Unique key for the custom emoji resource.
        * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The uid. */ @@ -92,10 +92,10 @@ public java.lang.String getUid() { * * *
    -   * Unique key for the custom emoji resource.
    +   * Output only. Unique key for the custom emoji resource.
        * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for uid. */ @@ -452,10 +452,10 @@ public Builder mergeFrom( * * *
    -     * Unique key for the custom emoji resource.
    +     * Output only. Unique key for the custom emoji resource.
          * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The uid. */ @@ -474,10 +474,10 @@ public java.lang.String getUid() { * * *
    -     * Unique key for the custom emoji resource.
    +     * Output only. Unique key for the custom emoji resource.
          * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for uid. */ @@ -496,10 +496,10 @@ public com.google.protobuf.ByteString getUidBytes() { * * *
    -     * Unique key for the custom emoji resource.
    +     * Output only. Unique key for the custom emoji resource.
          * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The uid to set. * @return This builder for chaining. @@ -517,10 +517,10 @@ public Builder setUid(java.lang.String value) { * * *
    -     * Unique key for the custom emoji resource.
    +     * Output only. Unique key for the custom emoji resource.
          * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -534,10 +534,10 @@ public Builder clearUid() { * * *
    -     * Unique key for the custom emoji resource.
    +     * Output only. Unique key for the custom emoji resource.
          * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for uid to set. * @return This builder for chaining. diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmojiOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmojiOrBuilder.java index 28de5908367d..36054d27bce5 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmojiOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CustomEmojiOrBuilder.java @@ -28,10 +28,10 @@ public interface CustomEmojiOrBuilder * * *
    -   * Unique key for the custom emoji resource.
    +   * Output only. Unique key for the custom emoji resource.
        * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The uid. */ @@ -40,10 +40,10 @@ public interface CustomEmojiOrBuilder * * *
    -   * Unique key for the custom emoji resource.
    +   * Output only. Unique key for the custom emoji resource.
        * 
    * - * string uid = 1; + * string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for uid. */ diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeletionMetadataProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeletionMetadataProto.java index ae588ee81fa0..adb026d78f75 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeletionMetadataProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/DeletionMetadataProto.java @@ -48,11 +48,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Type\022\035\n\031DELETION_TYPE_UNSPECIFIED\020\000\022\013\n\007C" + "REATOR\020\001\022\017\n\013SPACE_OWNER\020\002\022\t\n\005ADMIN\020\003\022\026\n\022" + "APP_MESSAGE_EXPIRY\020\004\022\023\n\017CREATOR_VIA_APP\020" - + "\005\022\027\n\023SPACE_OWNER_VIA_APP\020\006B\240\001\n\022com.googl" + + "\005\022\027\n\023SPACE_OWNER_VIA_APP\020\006B\256\001\n\022com.googl" + "e.chat.v1B\025DeletionMetadataProtoP\001Z,clou" + "d.google.com/go/chat/apiv1/chatpb;chatpb" - + "\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Cha" - + "t\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" + + "\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023G" + + "oogle\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat:" + + ":V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequest.java index d547e501fedf..7988459cbd04 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequest.java @@ -73,8 +73,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
        * Required. Resource name of the membership to retrieve.
        *
    -   * To get the app's own membership, you can optionally use
    -   * `spaces/{space}/members/app`.
    +   * To get the app's own membership [by using user
    +   * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +   * you can optionally use `spaces/{space}/members/app`.
        *
        * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
        *
    @@ -109,8 +110,9 @@ public java.lang.String getName() {
        * 
        * Required. Resource name of the membership to retrieve.
        *
    -   * To get the app's own membership, you can optionally use
    -   * `spaces/{space}/members/app`.
    +   * To get the app's own membership [by using user
    +   * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +   * you can optionally use `spaces/{space}/members/app`.
        *
        * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
        *
    @@ -487,8 +489,9 @@ public Builder mergeFrom(
          * 
          * Required. Resource name of the membership to retrieve.
          *
    -     * To get the app's own membership, you can optionally use
    -     * `spaces/{space}/members/app`.
    +     * To get the app's own membership [by using user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +     * you can optionally use `spaces/{space}/members/app`.
          *
          * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
          *
    @@ -522,8 +525,9 @@ public java.lang.String getName() {
          * 
          * Required. Resource name of the membership to retrieve.
          *
    -     * To get the app's own membership, you can optionally use
    -     * `spaces/{space}/members/app`.
    +     * To get the app's own membership [by using user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +     * you can optionally use `spaces/{space}/members/app`.
          *
          * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
          *
    @@ -557,8 +561,9 @@ public com.google.protobuf.ByteString getNameBytes() {
          * 
          * Required. Resource name of the membership to retrieve.
          *
    -     * To get the app's own membership, you can optionally use
    -     * `spaces/{space}/members/app`.
    +     * To get the app's own membership [by using user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +     * you can optionally use `spaces/{space}/members/app`.
          *
          * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
          *
    @@ -591,8 +596,9 @@ public Builder setName(java.lang.String value) {
          * 
          * Required. Resource name of the membership to retrieve.
          *
    -     * To get the app's own membership, you can optionally use
    -     * `spaces/{space}/members/app`.
    +     * To get the app's own membership [by using user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +     * you can optionally use `spaces/{space}/members/app`.
          *
          * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
          *
    @@ -621,8 +627,9 @@ public Builder clearName() {
          * 
          * Required. Resource name of the membership to retrieve.
          *
    -     * To get the app's own membership, you can optionally use
    -     * `spaces/{space}/members/app`.
    +     * To get the app's own membership [by using user
    +     * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +     * you can optionally use `spaces/{space}/members/app`.
          *
          * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
          *
    diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequestOrBuilder.java
    index aae249716330..478d43484749 100644
    --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequestOrBuilder.java
    +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GetMembershipRequestOrBuilder.java
    @@ -30,8 +30,9 @@ public interface GetMembershipRequestOrBuilder
        * 
        * Required. Resource name of the membership to retrieve.
        *
    -   * To get the app's own membership, you can optionally use
    -   * `spaces/{space}/members/app`.
    +   * To get the app's own membership [by using user
    +   * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +   * you can optionally use `spaces/{space}/members/app`.
        *
        * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
        *
    @@ -55,8 +56,9 @@ public interface GetMembershipRequestOrBuilder
        * 
        * Required. Resource name of the membership to retrieve.
        *
    -   * To get the app's own membership, you can optionally use
    -   * `spaces/{space}/members/app`.
    +   * To get the app's own membership [by using user
    +   * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
    +   * you can optionally use `spaces/{space}/members/app`.
        *
        * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
        *
    diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GroupProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GroupProto.java
    index 6ba0c957c803..73f05f2519ad 100644
    --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GroupProto.java
    +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/GroupProto.java
    @@ -42,11 +42,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
       static {
         java.lang.String[] descriptorData = {
           "\n\032google/chat/v1/group.proto\022\016google.cha"
    -          + "t.v1\"\025\n\005Group\022\014\n\004name\030\001 \001(\tB\225\001\n\022com.goog"
    +          + "t.v1\"\025\n\005Group\022\014\n\004name\030\001 \001(\tB\243\001\n\022com.goog"
               + "le.chat.v1B\nGroupProtoP\001Z,cloud.google.c"
    -          + "om/go/chat/apiv1/chatpb;chatpb\252\002\023Google."
    -          + "Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Goo"
    -          + "gle::Apps::Chat::V1b\006proto3"
    +          + "om/go/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIP"
    +          + "roto\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps"
    +          + "\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto"
    +          + "3"
         };
         descriptor =
             com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
    diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/HistoryStateProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/HistoryStateProto.java
    index baf4a33ae358..f9da616b42c4 100644
    --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/HistoryStateProto.java
    +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/HistoryStateProto.java
    @@ -39,11 +39,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           "\n\"google/chat/v1/history_state.proto\022\016go"
               + "ogle.chat.v1*N\n\014HistoryState\022\035\n\031HISTORY_"
               + "STATE_UNSPECIFIED\020\000\022\017\n\013HISTORY_OFF\020\001\022\016\n\n"
    -          + "HISTORY_ON\020\002B\234\001\n\022com.google.chat.v1B\021His"
    +          + "HISTORY_ON\020\002B\252\001\n\022com.google.chat.v1B\021His"
               + "toryStateProtoP\001Z,cloud.google.com/go/ch"
    -          + "at/apiv1/chatpb;chatpb\252\002\023Google.Apps.Cha"
    -          + "t.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::App"
    -          + "s::Chat::V1b\006proto3"
    +          + "at/apiv1/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023G"
    +          + "oogle.Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1"
    +          + "\352\002\026Google::Apps::Chat::V1b\006proto3"
         };
         descriptor =
             com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
    diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MatchedUrlProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MatchedUrlProto.java
    index fc3aa9512ba1..80398ca27c41 100644
    --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MatchedUrlProto.java
    +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MatchedUrlProto.java
    @@ -43,11 +43,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
         java.lang.String[] descriptorData = {
           "\n google/chat/v1/matched_url.proto\022\016goog"
               + "le.chat.v1\032\037google/api/field_behavior.pr"
    -          + "oto\"\036\n\nMatchedUrl\022\020\n\003url\030\002 \001(\tB\003\340A\003B\232\001\n\022"
    +          + "oto\"\036\n\nMatchedUrl\022\020\n\003url\030\002 \001(\tB\003\340A\003B\250\001\n\022"
               + "com.google.chat.v1B\017MatchedUrlProtoP\001Z,c"
               + "loud.google.com/go/chat/apiv1/chatpb;cha"
    -          + "tpb\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\"
    -          + "Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3"
    +          + "tpb\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312"
    +          + "\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Ch"
    +          + "at::V1b\006proto3"
         };
         descriptor =
             com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
    diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Membership.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Membership.java
    index 1bb6481d1d80..74b924f9f536 100644
    --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Membership.java
    +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Membership.java
    @@ -683,8 +683,8 @@ public com.google.chat.v1.UserOrBuilder getMemberOrBuilder() {
        *
        * 
        * The Google Group the membership corresponds to.
    -   * Only supports read operations. Other operations, like creating or
    -   * updating a membership, aren't currently supported.
    +   * Only supports read operations. Other operations, like
    +   * creating or updating a membership, aren't currently supported.
        * 
    * * .google.chat.v1.Group group_member = 5; @@ -700,8 +700,8 @@ public boolean hasGroupMember() { * *
        * The Google Group the membership corresponds to.
    -   * Only supports read operations. Other operations, like creating or
    -   * updating a membership, aren't currently supported.
    +   * Only supports read operations. Other operations, like
    +   * creating or updating a membership, aren't currently supported.
        * 
    * * .google.chat.v1.Group group_member = 5; @@ -720,8 +720,8 @@ public com.google.chat.v1.Group getGroupMember() { * *
        * The Google Group the membership corresponds to.
    -   * Only supports read operations. Other operations, like creating or
    -   * updating a membership, aren't currently supported.
    +   * Only supports read operations. Other operations, like
    +   * creating or updating a membership, aren't currently supported.
        * 
    * * .google.chat.v1.Group group_member = 5; @@ -2003,8 +2003,8 @@ public com.google.chat.v1.UserOrBuilder getMemberOrBuilder() { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2020,8 +2020,8 @@ public boolean hasGroupMember() { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2047,8 +2047,8 @@ public com.google.chat.v1.Group getGroupMember() { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2071,8 +2071,8 @@ public Builder setGroupMember(com.google.chat.v1.Group value) { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2092,8 +2092,8 @@ public Builder setGroupMember(com.google.chat.v1.Group.Builder builderForValue) * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2124,8 +2124,8 @@ public Builder mergeGroupMember(com.google.chat.v1.Group value) { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2151,8 +2151,8 @@ public Builder clearGroupMember() { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2165,8 +2165,8 @@ public com.google.chat.v1.Group.Builder getGroupMemberBuilder() { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; @@ -2187,8 +2187,8 @@ public com.google.chat.v1.GroupOrBuilder getGroupMemberOrBuilder() { * *
          * The Google Group the membership corresponds to.
    -     * Only supports read operations. Other operations, like creating or
    -     * updating a membership, aren't currently supported.
    +     * Only supports read operations. Other operations, like
    +     * creating or updating a membership, aren't currently supported.
          * 
    * * .google.chat.v1.Group group_member = 5; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipOrBuilder.java index 1579c614451d..fca5afed335f 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipOrBuilder.java @@ -172,8 +172,8 @@ public interface MembershipOrBuilder * *
        * The Google Group the membership corresponds to.
    -   * Only supports read operations. Other operations, like creating or
    -   * updating a membership, aren't currently supported.
    +   * Only supports read operations. Other operations, like
    +   * creating or updating a membership, aren't currently supported.
        * 
    * * .google.chat.v1.Group group_member = 5; @@ -186,8 +186,8 @@ public interface MembershipOrBuilder * *
        * The Google Group the membership corresponds to.
    -   * Only supports read operations. Other operations, like creating or
    -   * updating a membership, aren't currently supported.
    +   * Only supports read operations. Other operations, like
    +   * creating or updating a membership, aren't currently supported.
        * 
    * * .google.chat.v1.Group group_member = 5; @@ -200,8 +200,8 @@ public interface MembershipOrBuilder * *
        * The Google Group the membership corresponds to.
    -   * Only supports read operations. Other operations, like creating or
    -   * updating a membership, aren't currently supported.
    +   * Only supports read operations. Other operations, like
    +   * creating or updating a membership, aren't currently supported.
        * 
    * * .google.chat.v1.Group group_member = 5; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipProto.java index cbfe38755ac2..b1310505a1d6 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MembershipProto.java @@ -105,11 +105,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tMembershipRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A " + "\n\036chat.googleapis.com/Membership\"O\n\027Dele" + "teMembershipRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A" - + " \n\036chat.googleapis.com/MembershipB\232\001\n\022co" + + " \n\036chat.googleapis.com/MembershipB\250\001\n\022co" + "m.google.chat.v1B\017MembershipProtoP\001Z,clo" + "ud.google.com/go/chat/apiv1/chatpb;chatp" - + "b\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Ch" - + "at\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" + + "b\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023" + + "Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat" + + "::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java index 513d1f809c87..5a719e2bb370 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java @@ -210,11 +210,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003\340A\004B\010\n\006action\"6\n\006Dialog\022,\n\004body\030\001 \001(\0132\031" + ".google.apps.card.v1.CardB\003\340A\004\"F\n\nCardWi" + "thId\022\017\n\007card_id\030\001 \001(\t\022\'\n\004card\030\002 \001(\0132\031.go" - + "ogle.apps.card.v1.CardB\227\001\n\022com.google.ch" + + "ogle.apps.card.v1.CardB\245\001\n\022com.google.ch" + "at.v1B\014MessageProtoP\001Z,cloud.google.com/" - + "go/chat/apiv1/chatpb;chatpb\252\002\023Google.App" - + "s.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google" - + "::Apps::Chat::V1b\006proto3" + + "go/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIProt" + + "o\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Ch" + + "at\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ReactionProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ReactionProto.java index 8f6f23406b02..7484f43db5ed 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ReactionProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ReactionProto.java @@ -79,26 +79,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ces/{space}/messages/{message}/reactions" + "/{reaction}\"_\n\005Emoji\022\021\n\007unicode\030\001 \001(\tH\000\022" + "8\n\014custom_emoji\030\002 \001(\0132\033.google.chat.v1.C" - + "ustomEmojiB\003\340A\003H\000B\t\n\007content\"\032\n\013CustomEm" - + "oji\022\013\n\003uid\030\001 \001(\t\"l\n\024EmojiReactionSummary" - + "\022$\n\005emoji\030\001 \001(\0132\025.google.chat.v1.Emoji\022\033" - + "\n\016reaction_count\030\002 \001(\005H\000\210\001\001B\021\n\017_reaction" - + "_count\"~\n\025CreateReactionRequest\0224\n\006paren" - + "t\030\001 \001(\tB$\340A\002\372A\036\022\034chat.googleapis.com/Rea" - + "ction\022/\n\010reaction\030\002 \001(\0132\030.google.chat.v1" - + ".ReactionB\003\340A\002\"\222\001\n\024ListReactionsRequest\022" - + "4\n\006parent\030\001 \001(\tB$\340A\002\372A\036\022\034chat.googleapis" - + ".com/Reaction\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" - + "\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003" - + "\340A\001\"]\n\025ListReactionsResponse\022+\n\treaction" - + "s\030\001 \003(\0132\030.google.chat.v1.Reaction\022\027\n\017nex" - + "t_page_token\030\002 \001(\t\"K\n\025DeleteReactionRequ" - + "est\0222\n\004name\030\001 \001(\tB$\340A\002\372A\036\n\034chat.googleap" - + "is.com/ReactionB\230\001\n\022com.google.chat.v1B\r" - + "ReactionProtoP\001Z,cloud.google.com/go/cha" - + "t/apiv1/chatpb;chatpb\252\002\023Google.Apps.Chat" - + ".V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps" - + "::Chat::V1b\006proto3" + + "ustomEmojiB\003\340A\003H\000B\t\n\007content\"\037\n\013CustomEm" + + "oji\022\020\n\003uid\030\001 \001(\tB\003\340A\003\"l\n\024EmojiReactionSu" + + "mmary\022$\n\005emoji\030\001 \001(\0132\025.google.chat.v1.Em" + + "oji\022\033\n\016reaction_count\030\002 \001(\005H\000\210\001\001B\021\n\017_rea" + + "ction_count\"~\n\025CreateReactionRequest\0224\n\006" + + "parent\030\001 \001(\tB$\340A\002\372A\036\022\034chat.googleapis.co" + + "m/Reaction\022/\n\010reaction\030\002 \001(\0132\030.google.ch" + + "at.v1.ReactionB\003\340A\002\"\222\001\n\024ListReactionsReq" + + "uest\0224\n\006parent\030\001 \001(\tB$\340A\002\372A\036\022\034chat.googl" + + "eapis.com/Reaction\022\026\n\tpage_size\030\002 \001(\005B\003\340" + + "A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 " + + "\001(\tB\003\340A\001\"]\n\025ListReactionsResponse\022+\n\trea" + + "ctions\030\001 \003(\0132\030.google.chat.v1.Reaction\022\027" + + "\n\017next_page_token\030\002 \001(\t\"K\n\025DeleteReactio" + + "nRequest\0222\n\004name\030\001 \001(\tB$\340A\002\372A\036\n\034chat.goo" + + "gleapis.com/ReactionB\246\001\n\022com.google.chat" + + ".v1B\rReactionProtoP\001Z,cloud.google.com/g" + + "o/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIProto" + + "\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Cha" + + "t\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java index ecfc4d0df43a..50e586da9c42 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequest.java @@ -251,14 +251,14 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -290,14 +290,14 @@ public java.util.List getMembershipsList() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -330,14 +330,14 @@ public java.util.List getMembershipsList() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -369,14 +369,14 @@ public int getMembershipsCount() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -408,14 +408,14 @@ public com.google.chat.v1.Membership getMemberships(int index) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1425,14 +1425,14 @@ private void ensureMembershipsIsMutable() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1467,14 +1467,14 @@ public java.util.List getMembershipsList() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1509,14 +1509,14 @@ public int getMembershipsCount() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1551,14 +1551,14 @@ public com.google.chat.v1.Membership getMemberships(int index) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1599,14 +1599,14 @@ public Builder setMemberships(int index, com.google.chat.v1.Membership value) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1645,14 +1645,14 @@ public Builder setMemberships( * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1693,14 +1693,14 @@ public Builder addMemberships(com.google.chat.v1.Membership value) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1741,14 +1741,14 @@ public Builder addMemberships(int index, com.google.chat.v1.Membership value) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1786,14 +1786,14 @@ public Builder addMemberships(com.google.chat.v1.Membership.Builder builderForVa * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1832,14 +1832,14 @@ public Builder addMemberships( * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1878,14 +1878,14 @@ public Builder addAllMemberships( * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1923,14 +1923,14 @@ public Builder clearMemberships() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -1968,14 +1968,14 @@ public Builder removeMemberships(int index) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -2006,14 +2006,14 @@ public com.google.chat.v1.Membership.Builder getMembershipsBuilder(int index) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -2048,14 +2048,14 @@ public com.google.chat.v1.MembershipOrBuilder getMembershipsOrBuilder(int index) * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -2091,14 +2091,14 @@ public com.google.chat.v1.MembershipOrBuilder getMembershipsOrBuilder(int index) * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -2130,14 +2130,14 @@ public com.google.chat.v1.Membership.Builder addMembershipsBuilder() { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -2169,14 +2169,14 @@ public com.google.chat.v1.Membership.Builder addMembershipsBuilder(int index) { * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java index 636e203530a1..ecb1967f7642 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SetUpSpaceRequestOrBuilder.java @@ -169,14 +169,14 @@ public interface SetUpSpaceRequestOrBuilder * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -205,14 +205,14 @@ public interface SetUpSpaceRequestOrBuilder * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -241,14 +241,14 @@ public interface SetUpSpaceRequestOrBuilder * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -277,14 +277,14 @@ public interface SetUpSpaceRequestOrBuilder * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * @@ -313,14 +313,14 @@ public interface SetUpSpaceRequestOrBuilder * * The set currently allows up to 20 memberships (in addition to the caller). * - * The `Membership.member` field must contain a `user` with `name` populated - * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - * add human users when setting up a space (adding Chat apps is only supported - * for direct message setup with the calling app). You can also add members - * using the user's email as an alias for {user}. For example, the `user.name` - * can be `users/example@gmail.com`." To invite Gmail users or users from - * external Google Workspace domains, user's email must be used for - * `{user}`. + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. * * Optional when setting `Space.spaceType` to `SPACE`. * diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommandProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommandProto.java index c557b7f7a133..33a4b643f435 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommandProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommandProto.java @@ -43,11 +43,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\"google/chat/v1/slash_command.proto\022\016go" + "ogle.chat.v1\"\"\n\014SlashCommand\022\022\n\ncommand_" - + "id\030\001 \001(\003B\234\001\n\022com.google.chat.v1B\021SlashCo" + + "id\030\001 \001(\003B\252\001\n\022com.google.chat.v1B\021SlashCo" + "mmandProtoP\001Z,cloud.google.com/go/chat/a" - + "piv1/chatpb;chatpb\252\002\023Google.Apps.Chat.V1" - + "\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::C" - + "hat::V1b\006proto3" + + "piv1/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Googl" + + "e.Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026G" + + "oogle::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java index 08234ca7a2d2..106fc6508ff5 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java @@ -1560,7 +1560,7 @@ public com.google.protobuf.ByteString getNameBytes() { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return The enum numeric value on the wire for type. */ @java.lang.Override @@ -1580,7 +1580,7 @@ public int getTypeValue() { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return The type. */ @java.lang.Override @@ -1658,7 +1658,7 @@ public boolean getSingleUserBotDm() { * * bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * - * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=123 + * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=124 * @return The threaded. */ @java.lang.Override @@ -1994,13 +1994,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
    -   * Output only. Whether the Chat app was installed by a Google Workspace
    -   * administrator. Administrators can install a Chat app for their domain,
    -   * organizational unit, or a group of users.
    +   * Output only. For direct message (DM) spaces with a Chat app, whether the
    +   * space was created by a Google Workspace administrator. Administrators can
    +   * install and set up a direct message with a Chat app on behalf of users in
    +   * their organization.
        *
    -   * Administrators can only install Chat apps for direct messaging between
    -   * users and the app. To support admin install, your app must feature direct
    -   * messaging.
    +   * To support admin install, your Chat app must feature direct messaging.
        * 
    * * bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2781,7 +2780,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return The enum numeric value on the wire for type. */ @java.lang.Override @@ -2801,7 +2800,7 @@ public int getTypeValue() { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ @@ -2824,7 +2823,7 @@ public Builder setTypeValue(int value) { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return The type. */ @java.lang.Override @@ -2845,7 +2844,7 @@ public com.google.chat.v1.Space.Type getType() { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @param value The type to set. * @return This builder for chaining. */ @@ -2871,7 +2870,7 @@ public Builder setType(com.google.chat.v1.Space.Type value) { * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3045,7 +3044,7 @@ public Builder clearSingleUserBotDm() { * bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=123 + * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=124 * @return The threaded. */ @java.lang.Override @@ -3064,7 +3063,7 @@ public boolean getThreaded() { * bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=123 + * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=124 * @param value The threaded to set. * @return This builder for chaining. */ @@ -3087,7 +3086,7 @@ public Builder setThreaded(boolean value) { * bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=123 + * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=124 * @return This builder for chaining. */ @java.lang.Deprecated @@ -4058,13 +4057,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
    -     * Output only. Whether the Chat app was installed by a Google Workspace
    -     * administrator. Administrators can install a Chat app for their domain,
    -     * organizational unit, or a group of users.
    +     * Output only. For direct message (DM) spaces with a Chat app, whether the
    +     * space was created by a Google Workspace administrator. Administrators can
    +     * install and set up a direct message with a Chat app on behalf of users in
    +     * their organization.
          *
    -     * Administrators can only install Chat apps for direct messaging between
    -     * users and the app. To support admin install, your app must feature direct
    -     * messaging.
    +     * To support admin install, your Chat app must feature direct messaging.
          * 
    * * bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4079,13 +4077,12 @@ public boolean getAdminInstalled() { * * *
    -     * Output only. Whether the Chat app was installed by a Google Workspace
    -     * administrator. Administrators can install a Chat app for their domain,
    -     * organizational unit, or a group of users.
    +     * Output only. For direct message (DM) spaces with a Chat app, whether the
    +     * space was created by a Google Workspace administrator. Administrators can
    +     * install and set up a direct message with a Chat app on behalf of users in
    +     * their organization.
          *
    -     * Administrators can only install Chat apps for direct messaging between
    -     * users and the app. To support admin install, your app must feature direct
    -     * messaging.
    +     * To support admin install, your Chat app must feature direct messaging.
          * 
    * * bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -4104,13 +4101,12 @@ public Builder setAdminInstalled(boolean value) { * * *
    -     * Output only. Whether the Chat app was installed by a Google Workspace
    -     * administrator. Administrators can install a Chat app for their domain,
    -     * organizational unit, or a group of users.
    +     * Output only. For direct message (DM) spaces with a Chat app, whether the
    +     * space was created by a Google Workspace administrator. Administrators can
    +     * install and set up a direct message with a Chat app on behalf of users in
    +     * their organization.
          *
    -     * Administrators can only install Chat apps for direct messaging between
    -     * users and the app. To support admin install, your app must feature direct
    -     * messaging.
    +     * To support admin install, your Chat app must feature direct messaging.
          * 
    * * bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java index 20edd04deccc..ec10f52641af 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java @@ -65,7 +65,7 @@ public interface SpaceOrBuilder * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return The enum numeric value on the wire for type. */ @java.lang.Deprecated @@ -82,7 +82,7 @@ public interface SpaceOrBuilder * .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=111 + * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=112 * @return The type. */ @java.lang.Deprecated @@ -139,7 +139,7 @@ public interface SpaceOrBuilder * * bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; * - * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=123 + * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=124 * @return The threaded. */ @java.lang.Deprecated @@ -388,13 +388,12 @@ public interface SpaceOrBuilder * * *
    -   * Output only. Whether the Chat app was installed by a Google Workspace
    -   * administrator. Administrators can install a Chat app for their domain,
    -   * organizational unit, or a group of users.
    +   * Output only. For direct message (DM) spaces with a Chat app, whether the
    +   * space was created by a Google Workspace administrator. Administrators can
    +   * install and set up a direct message with a Chat app on behalf of users in
    +   * their organization.
        *
    -   * Administrators can only install Chat apps for direct messaging between
    -   * users and the app. To support admin install, your app must feature direct
    -   * messaging.
    +   * To support admin install, your Chat app must feature direct messaging.
        * 
    * * bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java index 612093c21f88..2b8dff0fc329 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java @@ -127,11 +127,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "aceRequest\022/\n\004name\030\001 \001(\tB!\340A\002\372A\033\n\031chat.g" + "oogleapis.com/Space\"C\n\033CompleteImportSpa" + "ceResponse\022$\n\005space\030\001 \001(\0132\025.google.chat." - + "v1.SpaceB\225\001\n\022com.google.chat.v1B\nSpacePr" + + "v1.SpaceB\243\001\n\022com.google.chat.v1B\nSpacePr" + "otoP\001Z,cloud.google.com/go/chat/apiv1/ch" - + "atpb;chatpb\252\002\023Google.Apps.Chat.V1\312\002\023Goog" - + "le\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1" - + "b\006proto3" + + "atpb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Apps." + + "Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::" + + "Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceReadStateProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceReadStateProto.java index da44e06c6411..367038419108 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceReadStateProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceReadStateProto.java @@ -64,11 +64,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tateRequest\022=\n\020space_read_state\030\001 \001(\0132\036." + "google.chat.v1.SpaceReadStateB\003\340A\002\0224\n\013up" + "date_mask\030\002 \001(\0132\032.google.protobuf.FieldM" - + "askB\003\340A\002B\236\001\n\022com.google.chat.v1B\023SpaceRe" + + "askB\003\340A\002B\254\001\n\022com.google.chat.v1B\023SpaceRe" + "adStateProtoP\001Z,cloud.google.com/go/chat" - + "/apiv1/chatpb;chatpb\252\002\023Google.Apps.Chat." - + "V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps:" - + ":Chat::V1b\006proto3" + + "/apiv1/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Goo" + + "gle.Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002" + + "\026Google::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceSetupProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceSetupProto.java index 26ba69a6dd77..813dee832184 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceSetupProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceSetupProto.java @@ -48,11 +48,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "equest\022)\n\005space\030\001 \001(\0132\025.google.chat.v1.S" + "paceB\003\340A\002\022\027\n\nrequest_id\030\002 \001(\tB\003\340A\001\0224\n\013me" + "mberships\030\004 \003(\0132\032.google.chat.v1.Members" - + "hipB\003\340A\001B\232\001\n\022com.google.chat.v1B\017SpaceSe" + + "hipB\003\340A\001B\250\001\n\022com.google.chat.v1B\017SpaceSe" + "tupProtoP\001Z,cloud.google.com/go/chat/api" - + "v1/chatpb;chatpb\252\002\023Google.Apps.Chat.V1\312\002" - + "\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Cha" - + "t::V1b\006proto3" + + "v1/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Google." + + "Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Goo" + + "gle::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ThreadReadStateProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ThreadReadStateProto.java index 1a76c41567a0..473409712b10 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ThreadReadStateProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/ThreadReadStateProto.java @@ -56,11 +56,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ad}/threadReadState2\017threadReadState\"V\n\031" + "GetThreadReadStateRequest\0229\n\004name\030\001 \001(\tB" + "+\340A\002\372A%\n#chat.googleapis.com/ThreadReadS" - + "tateB\237\001\n\022com.google.chat.v1B\024ThreadReadS" + + "tateB\255\001\n\022com.google.chat.v1B\024ThreadReadS" + "tateProtoP\001Z,cloud.google.com/go/chat/ap" - + "iv1/chatpb;chatpb\252\002\023Google.Apps.Chat.V1\312" - + "\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Ch" - + "at::V1b\006proto3" + + "iv1/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Google" + + ".Apps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Go" + + "ogle::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserProto.java index 0d73bf08fd3b..880d01bdbcbf 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/UserProto.java @@ -48,11 +48,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ain_id\030\006 \001(\t\022\'\n\004type\030\005 \001(\0162\031.google.chat" + ".v1.User.Type\022\031\n\014is_anonymous\030\007 \001(\010B\003\340A\003" + "\"0\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\t\n\005HUMAN\020" - + "\001\022\007\n\003BOT\020\002B\224\001\n\022com.google.chat.v1B\tUserP" + + "\001\022\007\n\003BOT\020\002B\242\001\n\022com.google.chat.v1B\tUserP" + "rotoP\001Z,cloud.google.com/go/chat/apiv1/c" - + "hatpb;chatpb\252\002\023Google.Apps.Chat.V1\312\002\023Goo" - + "gle\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V" - + "1b\006proto3" + + "hatpb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Apps" + + ".Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google:" + + ":Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/WidgetsProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/WidgetsProto.java index e7ce2621d917..bf7848303bbc 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/WidgetsProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/WidgetsProto.java @@ -129,11 +129,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\n\005OFFER\020\036\022\n\n\006PERSON\020\013\022\t\n\005PHONE\020\r\022\023\n\017REST" + "AURANT_ICON\020\007\022\021\n\rSHOPPING_CART\020\010\022\010\n\004STAR" + "\020\005\022\t\n\005STORE\020\026\022\n\n\006TICKET\020\004\022\t\n\005TRAIN\020\027\022\020\n\014" - + "VIDEO_CAMERA\020\034\022\016\n\nVIDEO_PLAY\020\035B\006\n\004dataB\227" + + "VIDEO_CAMERA\020\034\022\016\n\nVIDEO_PLAY\020\035B\006\n\004dataB\245" + "\001\n\022com.google.chat.v1B\014WidgetsProtoP\001Z,c" + "loud.google.com/go/chat/apiv1/chatpb;cha" - + "tpb\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\" - + "Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" + + "tpb\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312" + + "\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Ch" + + "at::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/action_status.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/action_status.proto index b59b629948e6..192022327c34 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/action_status.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/action_status.proto @@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ActionStatusProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto index 4a7115d60687..cdb24119d22b 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/annotation.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.chat.v1; +import "google/api/resource.proto"; import "google/chat/v1/attachment.proto"; import "google/chat/v1/user.proto"; @@ -24,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "AnnotationProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/attachment.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/attachment.proto index eb559336f6df..2831a00a1a29 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/attachment.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/attachment.proto @@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "AttachmentProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto index 4f7f51864d77..44aed729f931 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto @@ -33,6 +33,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ChatServiceProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -59,7 +60,8 @@ service ChatService { "https://www.googleapis.com/auth/chat.users.readstate," "https://www.googleapis.com/auth/chat.users.readstate.readonly"; - // Creates a message in a Google Chat space. For an example, see [Send a + // Creates a message in a Google Chat space. The maximum message size, + // including text and cards, is 32,000 bytes. For an example, see [Send a // message](https://developers.google.com/workspace/chat/create-messages). // // Calling this method requires @@ -250,6 +252,7 @@ service ChatService { // // Lists spaces visible to the caller or authenticated user. Group chats // and DMs aren't listed until the first message is sent. + // rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) { option (google.api.http) = { get: "/v1/spaces" @@ -300,17 +303,17 @@ service ChatService { // members](https://developers.google.com/workspace/chat/set-up-spaces). // // To specify the human members to add, add memberships with the appropriate - // `member.name` in the `SetUpSpaceRequest`. To add a human user, use - // `users/{user}`, where `{user}` can be the email address for the user. For - // users in the same Workspace organization `{user}` can also be the `id` for - // the person from the People API, or the `id` for the user in the Directory - // API. For example, if the People API Person profile ID for - // `user@example.com` is `123456789`, you can add the user to the space by - // setting the `membership.member.name` to `users/user@example.com` or - // `users/123456789`. - // - // For a space or group chat, if the caller blocks or is blocked by some - // members, then those members aren't added to the created space. + // `membership.member.name`. To add a human user, use `users/{user}`, where + // `{user}` can be the email address for the user. For users in the same + // Workspace organization `{user}` can also be the `id` for the person from + // the People API, or the `id` for the user in the Directory API. For example, + // if the People API Person profile ID for `user@example.com` is `123456789`, + // you can add the user to the space by setting the `membership.member.name` + // to `users/user@example.com` or `users/123456789`. + // + // For a named space or group chat, if the caller blocks, or is blocked + // by some members, or doesn't have permission to add some members, then + // those members aren't added to the created space. // // To create a direct message (DM) between the calling user and another human // user, specify exactly one membership to represent the human user. If @@ -423,8 +426,8 @@ service ChatService { // directly to the specified space. Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). // - // To specify the member to add, set the `membership.member.name` in the - // `CreateMembershipRequest`: + // To specify the member to add, set the `membership.member.name` for the + // human or app member. // // - To add the calling app to a space or a direct message between two human // users, use `users/app`. Unable to add other @@ -445,8 +448,11 @@ service ChatService { option (google.api.method_signature) = "parent,membership"; } - // Updates a membership. Requires [user - // authentication](https://developers.google.com/chat/api/guides/auth/users). + // Updates a membership. For an example, see [Update a user's membership in + // a space](https://developers.google.com/workspace/chat/update-members). + // + // Requires [user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). rpc UpdateMembership(UpdateMembershipRequest) returns (Membership) { option (google.api.http) = { patch: "/v1/{membership.name=spaces/*/members/*}" @@ -508,7 +514,9 @@ service ChatService { } // Returns details about a user's read state within a space, used to identify - // read and unread messages. + // read and unread messages. For an example, see [Get details about a user's + // space read + // state](https://developers.google.com/workspace/chat/get-space-read-state). // // Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -520,7 +528,8 @@ service ChatService { } // Updates a user's read state within a space, used to identify read and - // unread messages. + // unread messages. For an example, see [Update a user's space read + // state](https://developers.google.com/workspace/chat/update-space-read-state). // // Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). @@ -534,7 +543,9 @@ service ChatService { } // Returns details about a user's read state within a thread, used to identify - // read and unread messages. + // read and unread messages. For an example, see [Get details about a user's + // thread read + // state](https://developers.google.com/workspace/chat/get-thread-read-state). // // Requires [user // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/contextual_addon.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/contextual_addon.proto index 9c0266e91e1f..9daa7346c38c 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/contextual_addon.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/contextual_addon.proto @@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ContextualAddOnProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/deletion_metadata.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/deletion_metadata.proto index d0210b37c71e..4b208755efcc 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/deletion_metadata.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/deletion_metadata.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "DeletionMetadataProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/group.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/group.proto index 74aa5acae006..068828e3ba37 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/group.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/group.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "GroupProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/history_state.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/history_state.proto index 2f7110c67bd0..41828c8a7ecf 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/history_state.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/history_state.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "HistoryStateProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/matched_url.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/matched_url.proto index 27a08a5338f3..89c95c635cce 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/matched_url.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/matched_url.proto @@ -23,6 +23,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "MatchedUrlProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/membership.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/membership.proto index 698e0faf46ed..8751f7d6c924 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/membership.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/membership.proto @@ -28,6 +28,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "MembershipProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -105,8 +106,8 @@ message Membership { User member = 3; // The Google Group the membership corresponds to. - // Only supports read operations. Other operations, like creating or - // updating a membership, aren't currently supported. + // Only supports read operations. Other operations, like + // creating or updating a membership, aren't currently supported. Group group_member = 5; } @@ -275,8 +276,9 @@ message ListMembershipsResponse { message GetMembershipRequest { // Required. Resource name of the membership to retrieve. // - // To get the app's own membership, you can optionally use - // `spaces/{space}/members/app`. + // To get the app's own membership [by using user + // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + // you can optionally use `spaces/{space}/members/app`. // // Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` // diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto index 77d0b63d47d4..ca6a432c83e1 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto @@ -37,6 +37,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "MessageProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/reaction.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/reaction.proto index c06233014642..9639b1f5b29a 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/reaction.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/reaction.proto @@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ReactionProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -61,8 +62,8 @@ message Emoji { // Represents a custom emoji. message CustomEmoji { - // Unique key for the custom emoji resource. - string uid = 1; + // Output only. Unique key for the custom emoji resource. + string uid = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The number of people who reacted to a message with a specific emoji. diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto index a7ce686ffa78..75f213549555 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/slash_command.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SlashCommandProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto index 61db5b05ee70..b5fa106f6ed9 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto @@ -27,6 +27,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SpaceProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -184,13 +185,12 @@ message Space { (google.api.field_behavior) = OPTIONAL ]; - // Output only. Whether the Chat app was installed by a Google Workspace - // administrator. Administrators can install a Chat app for their domain, - // organizational unit, or a group of users. + // Output only. For direct message (DM) spaces with a Chat app, whether the + // space was created by a Google Workspace administrator. Administrators can + // install and set up a direct message with a Chat app on behalf of users in + // their organization. // - // Administrators can only install Chat apps for direct messaging between - // users and the app. To support admin install, your app must feature direct - // messaging. + // To support admin install, your Chat app must feature direct messaging. bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_read_state.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_read_state.proto index 014cecacf67b..24c4f56b861e 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_read_state.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_read_state.proto @@ -26,6 +26,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SpaceReadStateProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto index eb04a4e1a14b..17e42269e12b 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space_setup.proto @@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "SpaceSetupProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; @@ -68,14 +69,14 @@ message SetUpSpaceRequest { // // The set currently allows up to 20 memberships (in addition to the caller). // - // The `Membership.member` field must contain a `user` with `name` populated - // (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only - // add human users when setting up a space (adding Chat apps is only supported - // for direct message setup with the calling app). You can also add members - // using the user's email as an alias for {user}. For example, the `user.name` - // can be `users/example@gmail.com`." To invite Gmail users or users from - // external Google Workspace domains, user's email must be used for - // `{user}`. + // For human membership, the `Membership.member` field must contain a `user` + // with `name` populated (format: `users/{user}`) and `type` set to + // `User.Type.HUMAN`. You can only add human users when setting up a space + // (adding Chat apps is only supported for direct message setup with the + // calling app). You can also add members using the user's email as an alias + // for {user}. For example, the `user.name` can be `users/example@gmail.com`. + // To invite Gmail users or users from external Google Workspace domains, + // user's email must be used for `{user}`. // // Optional when setting `Space.spaceType` to `SPACE`. // diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/thread_read_state.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/thread_read_state.proto index 65b59becf6fc..38c86feb7b3e 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/thread_read_state.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/thread_read_state.proto @@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "ThreadReadStateProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/user.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/user.proto index a292853934e3..8e02de7608f9 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/user.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/user.proto @@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "UserProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/widgets.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/widgets.proto index 426a6e7af244..c28c969fec64 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/widgets.proto +++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/widgets.proto @@ -21,6 +21,7 @@ option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; option java_multiple_files = true; option java_outer_classname = "WidgetsProto"; option java_package = "com.google.chat.v1"; +option objc_class_prefix = "DYNAPIProto"; option php_namespace = "Google\\Apps\\Chat\\V1"; option ruby_package = "Google::Apps::Chat::V1"; diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java index d6f5c0644c76..9cf149c8879d 100644 --- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java +++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/AzureClustersClient.java @@ -2043,6 +2043,7 @@ public final OperationFuture deleteAzureClusterAsync(S * .setAllowMissing(true) * .setValidateOnly(true) * .setEtag("etag3123477") + * .setIgnoreErrors(true) * .build(); * azureClustersClient.deleteAzureClusterAsync(request).get(); * } @@ -2082,6 +2083,7 @@ public final OperationFuture deleteAzureClusterAsync( * .setAllowMissing(true) * .setValidateOnly(true) * .setEtag("etag3123477") + * .setIgnoreErrors(true) * .build(); * OperationFuture future = * azureClustersClient.deleteAzureClusterOperationCallable().futureCall(request); @@ -2121,6 +2123,7 @@ public final OperationFuture deleteAzureClusterAsync( * .setAllowMissing(true) * .setValidateOnly(true) * .setEtag("etag3123477") + * .setIgnoreErrors(true) * .build(); * ApiFuture future = * azureClustersClient.deleteAzureClusterCallable().futureCall(request); @@ -3047,6 +3050,7 @@ public final OperationFuture deleteAzureNodePoolAsync( * .setValidateOnly(true) * .setAllowMissing(true) * .setEtag("etag3123477") + * .setIgnoreErrors(true) * .build(); * azureClustersClient.deleteAzureNodePoolAsync(request).get(); * } @@ -3086,6 +3090,7 @@ public final OperationFuture deleteAzureNodePoolAsync( * .setValidateOnly(true) * .setAllowMissing(true) * .setEtag("etag3123477") + * .setIgnoreErrors(true) * .build(); * OperationFuture future = * azureClustersClient.deleteAzureNodePoolOperationCallable().futureCall(request); @@ -3125,6 +3130,7 @@ public final OperationFuture deleteAzureNodePoolAsync( * .setValidateOnly(true) * .setAllowMissing(true) * .setEtag("etag3123477") + * .setIgnoreErrors(true) * .build(); * ApiFuture future = * azureClustersClient.deleteAzureNodePoolCallable().futureCall(request); @@ -3280,7 +3286,7 @@ public final AzureOpenIdConfig getAzureOpenIdConfig(GetAzureOpenIdConfigRequest * }
    * * @param azureCluster Required. The AzureCluster, which owns the JsonWebKeys. Format: - * projects/<project-id>/locations/<region>/azureClusters/<cluster-id> + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AzureJsonWebKeys getAzureJsonWebKeys(AzureClusterName azureCluster) { @@ -3311,7 +3317,7 @@ public final AzureJsonWebKeys getAzureJsonWebKeys(AzureClusterName azureCluster) * }
    * * @param azureCluster Required. The AzureCluster, which owns the JsonWebKeys. Format: - * projects/<project-id>/locations/<region>/azureClusters/<cluster-id> + * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final AzureJsonWebKeys getAzureJsonWebKeys(String azureCluster) { diff --git a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/HttpJsonAzureClustersStub.java b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/HttpJsonAzureClustersStub.java index a8ef4e0ca28f..df3f401c6bea 100644 --- a/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/HttpJsonAzureClustersStub.java +++ b/java-gke-multi-cloud/google-cloud-gke-multi-cloud/src/main/java/com/google/cloud/gkemulticloud/v1/stub/HttpJsonAzureClustersStub.java @@ -426,6 +426,8 @@ public class HttpJsonAzureClustersStub extends AzureClustersStub { serializer.putQueryParam( fields, "allowMissing", request.getAllowMissing()); serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam( + fields, "ignoreErrors", request.getIgnoreErrors()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); return fields; @@ -701,6 +703,8 @@ public class HttpJsonAzureClustersStub extends AzureClustersStub { serializer.putQueryParam( fields, "allowMissing", request.getAllowMissing()); serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam( + fields, "ignoreErrors", request.getIgnoreErrors()); serializer.putQueryParam( fields, "validateOnly", request.getValidateOnly()); return fields; diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java index cc2dbf7d6fa5..54719242352d 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfig.java @@ -520,8 +520,8 @@ public java.lang.String getTagsOrThrow(java.lang.String key) { * * *
    -   * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -   * pool.
    +   * Required. The name or ARN of the AWS IAM instance profile to assign to
    +   * nodes in the pool.
        * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -544,8 +544,8 @@ public java.lang.String getIamInstanceProfile() { * * *
    -   * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -   * pool.
    +   * Required. The name or ARN of the AWS IAM instance profile to assign to
    +   * nodes in the pool.
        * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -3025,8 +3025,8 @@ public Builder putAllTags(java.util.Map valu * * *
    -     * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -     * pool.
    +     * Required. The name or ARN of the AWS IAM instance profile to assign to
    +     * nodes in the pool.
          * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -3048,8 +3048,8 @@ public java.lang.String getIamInstanceProfile() { * * *
    -     * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -     * pool.
    +     * Required. The name or ARN of the AWS IAM instance profile to assign to
    +     * nodes in the pool.
          * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -3071,8 +3071,8 @@ public com.google.protobuf.ByteString getIamInstanceProfileBytes() { * * *
    -     * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -     * pool.
    +     * Required. The name or ARN of the AWS IAM instance profile to assign to
    +     * nodes in the pool.
          * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -3093,8 +3093,8 @@ public Builder setIamInstanceProfile(java.lang.String value) { * * *
    -     * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -     * pool.
    +     * Required. The name or ARN of the AWS IAM instance profile to assign to
    +     * nodes in the pool.
          * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -3111,8 +3111,8 @@ public Builder clearIamInstanceProfile() { * * *
    -     * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -     * pool.
    +     * Required. The name or ARN of the AWS IAM instance profile to assign to
    +     * nodes in the pool.
          * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java index 9d2c793f3958..715c6437fffa 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AwsNodeConfigOrBuilder.java @@ -315,8 +315,8 @@ java.lang.String getTagsOrDefault( * * *
    -   * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -   * pool.
    +   * Required. The name or ARN of the AWS IAM instance profile to assign to
    +   * nodes in the pool.
        * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; @@ -328,8 +328,8 @@ java.lang.String getTagsOrDefault( * * *
    -   * Required. The name or ARN of the AWS IAM role assigned to nodes in the
    -   * pool.
    +   * Required. The name or ARN of the AWS IAM instance profile to assign to
    +   * nodes in the pool.
        * 
    * * string iam_instance_profile = 6 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java index 28656b30a354..c01a60ed0dd2 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/AzureServiceProto.java @@ -162,197 +162,198 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"y\n\031ListAzure" + "ClustersResponse\022C\n\016azure_clusters\030\001 \003(\013" + "2+.google.cloud.gkemulticloud.v1.AzureCl" - + "uster\022\027\n\017next_page_token\030\002 \001(\t\"\230\001\n\031Delet" + + "uster\022\027\n\017next_page_token\030\002 \001(\t\"\264\001\n\031Delet" + "eAzureClusterRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372" + "A+\n)gkemulticloud.googleapis.com/AzureCl" + "uster\022\025\n\rallow_missing\030\002 \001(\010\022\025\n\rvalidate" - + "_only\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\"\344\001\n\032CreateAzur" - + "eNodePoolRequest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A," - + "\022*gkemulticloud.googleapis.com/AzureNode" - + "Pool\022J\n\017azure_node_pool\030\002 \001(\0132,.google.c" - + "loud.gkemulticloud.v1.AzureNodePoolB\003\340A\002" - + "\022\037\n\022azure_node_pool_id\030\003 \001(\tB\003\340A\002\022\025\n\rval" - + "idate_only\030\004 \001(\010\"\265\001\n\032UpdateAzureNodePool" - + "Request\022J\n\017azure_node_pool\030\001 \001(\0132,.googl" - + "e.cloud.gkemulticloud.v1.AzureNodePoolB\003" - + "\340A\002\022\025\n\rvalidate_only\030\002 \001(\010\0224\n\013update_mas" - + "k\030\003 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002" - + "\"[\n\027GetAzureNodePoolRequest\022@\n\004name\030\001 \001(" - + "\tB2\340A\002\372A,\n*gkemulticloud.googleapis.com/" - + "AzureNodePool\"\206\001\n\031ListAzureNodePoolsRequ" - + "est\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*gkemulticlo" - + "ud.googleapis.com/AzureNodePool\022\021\n\tpage_" - + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"}\n\032ListAz" - + "ureNodePoolsResponse\022F\n\020azure_node_pools" - + "\030\001 \003(\0132,.google.cloud.gkemulticloud.v1.A" - + "zureNodePool\022\027\n\017next_page_token\030\002 \001(\t\"\232\001" - + "\n\032DeleteAzureNodePoolRequest\022@\n\004name\030\001 \001" - + "(\tB2\340A\002\372A,\n*gkemulticloud.googleapis.com" - + "/AzureNodePool\022\025\n\rvalidate_only\030\002 \001(\010\022\025\n" - + "\rallow_missing\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\"g\n\033Ge" - + "tAzureOpenIdConfigRequest\022H\n\razure_clust" + + "_only\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\022\032\n\rignore_erro" + + "rs\030\005 \001(\010B\003\340A\001\"\344\001\n\032CreateAzureNodePoolReq" + + "uest\022B\n\006parent\030\001 \001(\tB2\340A\002\372A,\022*gkemulticl" + + "oud.googleapis.com/AzureNodePool\022J\n\017azur" + + "e_node_pool\030\002 \001(\0132,.google.cloud.gkemult" + + "icloud.v1.AzureNodePoolB\003\340A\002\022\037\n\022azure_no" + + "de_pool_id\030\003 \001(\tB\003\340A\002\022\025\n\rvalidate_only\030\004" + + " \001(\010\"\265\001\n\032UpdateAzureNodePoolRequest\022J\n\017a" + + "zure_node_pool\030\001 \001(\0132,.google.cloud.gkem" + + "ulticloud.v1.AzureNodePoolB\003\340A\002\022\025\n\rvalid" + + "ate_only\030\002 \001(\010\0224\n\013update_mask\030\003 \001(\0132\032.go" + + "ogle.protobuf.FieldMaskB\003\340A\002\"[\n\027GetAzure" + + "NodePoolRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*g" + + "kemulticloud.googleapis.com/AzureNodePoo" + + "l\"\206\001\n\031ListAzureNodePoolsRequest\022B\n\006paren" + + "t\030\001 \001(\tB2\340A\002\372A,\022*gkemulticloud.googleapi" + + "s.com/AzureNodePool\022\021\n\tpage_size\030\002 \001(\005\022\022" + + "\n\npage_token\030\003 \001(\t\"}\n\032ListAzureNodePools" + + "Response\022F\n\020azure_node_pools\030\001 \003(\0132,.goo" + + "gle.cloud.gkemulticloud.v1.AzureNodePool" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\266\001\n\032DeleteAzur" + + "eNodePoolRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*" + + "gkemulticloud.googleapis.com/AzureNodePo" + + "ol\022\025\n\rvalidate_only\030\002 \001(\010\022\025\n\rallow_missi" + + "ng\030\003 \001(\010\022\014\n\004etag\030\004 \001(\t\022\032\n\rignore_errors\030" + + "\005 \001(\010B\003\340A\001\"g\n\033GetAzureOpenIdConfigReques" + + "t\022H\n\razure_cluster\030\001 \001(\tB1\340A\002\372A+\n)gkemul" + + "ticloud.googleapis.com/AzureCluster\"f\n\032G" + + "etAzureJsonWebKeysRequest\022H\n\razure_clust" + "er\030\001 \001(\tB1\340A\002\372A+\n)gkemulticloud.googleap" - + "is.com/AzureCluster\"f\n\032GetAzureJsonWebKe" - + "ysRequest\022H\n\razure_cluster\030\001 \001(\tB1\340A\002\372A+" - + "\n)gkemulticloud.googleapis.com/AzureClus" - + "ter\"c\n\033GetAzureServerConfigRequest\022D\n\004na" - + "me\030\001 \001(\tB6\340A\002\372A0\n.gkemulticloud.googleap" - + "is.com/AzureServerConfig\"\330\001\n\030CreateAzure" - + "ClientRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(g" - + "kemulticloud.googleapis.com/AzureClient\022" - + "E\n\014azure_client\030\002 \001(\0132*.google.cloud.gke" - + "multicloud.v1.AzureClientB\003\340A\002\022\034\n\017azure_" - + "client_id\030\004 \001(\tB\003\340A\002\022\025\n\rvalidate_only\030\003 " - + "\001(\010\"W\n\025GetAzureClientRequest\022>\n\004name\030\001 \001" - + "(\tB0\340A\002\372A*\n(gkemulticloud.googleapis.com" - + "/AzureClient\"\202\001\n\027ListAzureClientsRequest" - + "\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(gkemulticloud." - + "googleapis.com/AzureClient\022\021\n\tpage_size\030" - + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"v\n\030ListAzureCl" - + "ientsResponse\022A\n\razure_clients\030\001 \003(\0132*.g" - + "oogle.cloud.gkemulticloud.v1.AzureClient" - + "\022\027\n\017next_page_token\030\002 \001(\t\"\210\001\n\030DeleteAzur" - + "eClientRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(gk" - + "emulticloud.googleapis.com/AzureClient\022\025" - + "\n\rallow_missing\030\002 \001(\010\022\025\n\rvalidate_only\030\003" - + " \001(\010\"k\n\037GenerateAzureAccessTokenRequest\022" - + "H\n\razure_cluster\030\001 \001(\tB1\340A\002\372A+\n)gkemulti" - + "cloud.googleapis.com/AzureCluster\"w\n Gen" - + "erateAzureAccessTokenResponse\022\031\n\014access_" - + "token\030\001 \001(\tB\003\340A\003\0228\n\017expiration_time\030\002 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\003\"\334\002\n%G" - + "enerateAzureClusterAgentTokenRequest\022H\n\r" - + "azure_cluster\030\001 \001(\tB1\340A\002\372A+\n)gkemulticlo" - + "ud.googleapis.com/AzureCluster\022\032\n\rsubjec" - + "t_token\030\002 \001(\tB\003\340A\002\022\037\n\022subject_token_type" - + "\030\003 \001(\tB\003\340A\002\022\024\n\007version\030\004 \001(\tB\003\340A\002\022\031\n\014nod" - + "e_pool_id\030\005 \001(\tB\003\340A\001\022\027\n\ngrant_type\030\006 \001(\t" - + "B\003\340A\001\022\025\n\010audience\030\007 \001(\tB\003\340A\001\022\022\n\005scope\030\010 " - + "\001(\tB\003\340A\001\022!\n\024requested_token_type\030\t \001(\tB\003" - + "\340A\001\022\024\n\007options\030\n \001(\tB\003\340A\001\"f\n&GenerateAzu" - + "reClusterAgentTokenResponse\022\024\n\014access_to" - + "ken\030\001 \001(\t\022\022\n\nexpires_in\030\002 \001(\005\022\022\n\ntoken_t" - + "ype\030\003 \001(\t2\314#\n\rAzureClusters\022\375\001\n\021CreateAz" - + "ureClient\0227.google.cloud.gkemulticloud.v" - + "1.CreateAzureClientRequest\032\035.google.long" - + "running.Operation\"\217\001\312A \n\013AzureClient\022\021Op" - + "erationMetadata\332A#parent,azure_client,az" - + "ure_client_id\202\323\344\223\002@\"0/v1/{parent=project" - + "s/*/locations/*}/azureClients:\014azure_cli" - + "ent\022\263\001\n\016GetAzureClient\0224.google.cloud.gk" - + "emulticloud.v1.GetAzureClientRequest\032*.g" - + "oogle.cloud.gkemulticloud.v1.AzureClient" - + "\"?\332A\004name\202\323\344\223\0022\0220/v1/{name=projects/*/lo" - + "cations/*/azureClients/*}\022\306\001\n\020ListAzureC" - + "lients\0226.google.cloud.gkemulticloud.v1.L" - + "istAzureClientsRequest\0327.google.cloud.gk" - + "emulticloud.v1.ListAzureClientsResponse\"" - + "A\332A\006parent\202\323\344\223\0022\0220/v1/{parent=projects/*" - + "/locations/*}/azureClients\022\331\001\n\021DeleteAzu" - + "reClient\0227.google.cloud.gkemulticloud.v1" - + ".DeleteAzureClientRequest\032\035.google.longr" - + "unning.Operation\"l\312A*\n\025google.protobuf.E" - + "mpty\022\021OperationMetadata\332A\004name\202\323\344\223\0022*0/v" - + "1/{name=projects/*/locations/*/azureClie" - + "nts/*}\022\204\002\n\022CreateAzureCluster\0228.google.c" - + "loud.gkemulticloud.v1.CreateAzureCluster" - + "Request\032\035.google.longrunning.Operation\"\224" - + "\001\312A!\n\014AzureCluster\022\021OperationMetadata\332A%" - + "parent,azure_cluster,azure_cluster_id\202\323\344" - + "\223\002B\"1/v1/{parent=projects/*/locations/*}" - + "/azureClusters:\razure_cluster\022\206\002\n\022Update" - + "AzureCluster\0228.google.cloud.gkemulticlou" - + "d.v1.UpdateAzureClusterRequest\032\035.google." - + "longrunning.Operation\"\226\001\312A!\n\014AzureCluste" - + "r\022\021OperationMetadata\332A\031azure_cluster,upd" - + "ate_mask\202\323\344\223\002P2?/v1/{azure_cluster.name=" - + "projects/*/locations/*/azureClusters/*}:" - + "\razure_cluster\022\267\001\n\017GetAzureCluster\0225.goo" - + "gle.cloud.gkemulticloud.v1.GetAzureClust" - + "erRequest\032+.google.cloud.gkemulticloud.v" - + "1.AzureCluster\"@\332A\004name\202\323\344\223\0023\0221/v1/{name" - + "=projects/*/locations/*/azureClusters/*}" - + "\022\312\001\n\021ListAzureClusters\0227.google.cloud.gk" - + "emulticloud.v1.ListAzureClustersRequest\032" - + "8.google.cloud.gkemulticloud.v1.ListAzur" - + "eClustersResponse\"B\332A\006parent\202\323\344\223\0023\0221/v1/" - + "{parent=projects/*/locations/*}/azureClu" - + "sters\022\334\001\n\022DeleteAzureCluster\0228.google.cl" - + "oud.gkemulticloud.v1.DeleteAzureClusterR" - + "equest\032\035.google.longrunning.Operation\"m\312" - + "A*\n\025google.protobuf.Empty\022\021OperationMeta" - + "data\332A\004name\202\323\344\223\0023*1/v1/{name=projects/*/" - + "locations/*/azureClusters/*}\022\223\002\n\036Generat" - + "eAzureClusterAgentToken\022D.google.cloud.g" - + "kemulticloud.v1.GenerateAzureClusterAgen" - + "tTokenRequest\032E.google.cloud.gkemulticlo" - + "ud.v1.GenerateAzureClusterAgentTokenResp" - + "onse\"d\202\323\344\223\002^\"Y/v1/{azure_cluster=project" - + "s/*/locations/*/azureClusters/*}:generat" - + "eAzureClusterAgentToken:\001*\022\370\001\n\030GenerateA" - + "zureAccessToken\022>.google.cloud.gkemultic" - + "loud.v1.GenerateAzureAccessTokenRequest\032" - + "?.google.cloud.gkemulticloud.v1.Generate" - + "AzureAccessTokenResponse\"[\202\323\344\223\002U\022S/v1/{a" - + "zure_cluster=projects/*/locations/*/azur" - + "eClusters/*}:generateAzureAccessToken\022\236\002" - + "\n\023CreateAzureNodePool\0229.google.cloud.gke" - + "multicloud.v1.CreateAzureNodePoolRequest" - + "\032\035.google.longrunning.Operation\"\254\001\312A\"\n\rA" - + "zureNodePool\022\021OperationMetadata\332A)parent" - + ",azure_node_pool,azure_node_pool_id\202\323\344\223\002" - + "U\"B/v1/{parent=projects/*/locations/*/az" - + "ureClusters/*}/azureNodePools:\017azure_nod" - + "e_pool\022\240\002\n\023UpdateAzureNodePool\0229.google." - + "cloud.gkemulticloud.v1.UpdateAzureNodePo" - + "olRequest\032\035.google.longrunning.Operation" - + "\"\256\001\312A\"\n\rAzureNodePool\022\021OperationMetadata" - + "\332A\033azure_node_pool,update_mask\202\323\344\223\002e2R/v" - + "1/{azure_node_pool.name=projects/*/locat" - + "ions/*/azureClusters/*/azureNodePools/*}" - + ":\017azure_node_pool\022\313\001\n\020GetAzureNodePool\0226" - + ".google.cloud.gkemulticloud.v1.GetAzureN" - + "odePoolRequest\032,.google.cloud.gkemulticl" - + "oud.v1.AzureNodePool\"Q\332A\004name\202\323\344\223\002D\022B/v1" - + "/{name=projects/*/locations/*/azureClust" - + "ers/*/azureNodePools/*}\022\336\001\n\022ListAzureNod" - + "ePools\0228.google.cloud.gkemulticloud.v1.L" - + "istAzureNodePoolsRequest\0329.google.cloud." - + "gkemulticloud.v1.ListAzureNodePoolsRespo" - + "nse\"S\332A\006parent\202\323\344\223\002D\022B/v1/{parent=projec" - + "ts/*/locations/*/azureClusters/*}/azureN" - + "odePools\022\357\001\n\023DeleteAzureNodePool\0229.googl" - + "e.cloud.gkemulticloud.v1.DeleteAzureNode" - + "PoolRequest\032\035.google.longrunning.Operati" - + "on\"~\312A*\n\025google.protobuf.Empty\022\021Operatio" - + "nMetadata\332A\004name\202\323\344\223\002D*B/v1/{name=projec" - + "ts/*/locations/*/azureClusters/*/azureNo" - + "dePools/*}\022\371\001\n\024GetAzureOpenIdConfig\022:.go" - + "ogle.cloud.gkemulticloud.v1.GetAzureOpen" - + "IdConfigRequest\0320.google.cloud.gkemultic" - + "loud.v1.AzureOpenIdConfig\"s\332A\razure_clus" - + "ter\202\323\344\223\002]\022[/v1/{azure_cluster=projects/*" - + "/locations/*/azureClusters/*}/.well-know" - + "n/openid-configuration\022\332\001\n\023GetAzureJsonW" - + "ebKeys\0229.google.cloud.gkemulticloud.v1.G" - + "etAzureJsonWebKeysRequest\032/.google.cloud" - + ".gkemulticloud.v1.AzureJsonWebKeys\"W\332A\ra" - + "zure_cluster\202\323\344\223\002A\022?/v1/{azure_cluster=p" - + "rojects/*/locations/*/azureClusters/*}/j" - + "wks\022\310\001\n\024GetAzureServerConfig\022:.google.cl" - + "oud.gkemulticloud.v1.GetAzureServerConfi" - + "gRequest\0320.google.cloud.gkemulticloud.v1" - + ".AzureServerConfig\"B\332A\004name\202\323\344\223\0025\0223/v1/{" - + "name=projects/*/locations/*/azureServerC" - + "onfig}\032P\312A\034gkemulticloud.googleapis.com\322" - + "A.https://www.googleapis.com/auth/cloud-" - + "platformB\344\001\n!com.google.cloud.gkemulticl" - + "oud.v1B\021AzureServiceProtoP\001ZGcloud.googl" - + "e.com/go/gkemulticloud/apiv1/gkemulticlo" - + "udpb;gkemulticloudpb\252\002\035Google.Cloud.GkeM" - + "ultiCloud.V1\312\002\035Google\\Cloud\\GkeMultiClou" - + "d\\V1\352\002 Google::Cloud::GkeMultiCloud::V1b" - + "\006proto3" + + "is.com/AzureCluster\"c\n\033GetAzureServerCon" + + "figRequest\022D\n\004name\030\001 \001(\tB6\340A\002\372A0\n.gkemul" + + "ticloud.googleapis.com/AzureServerConfig" + + "\"\330\001\n\030CreateAzureClientRequest\022@\n\006parent\030" + + "\001 \001(\tB0\340A\002\372A*\022(gkemulticloud.googleapis." + + "com/AzureClient\022E\n\014azure_client\030\002 \001(\0132*." + + "google.cloud.gkemulticloud.v1.AzureClien" + + "tB\003\340A\002\022\034\n\017azure_client_id\030\004 \001(\tB\003\340A\002\022\025\n\r" + + "validate_only\030\003 \001(\010\"W\n\025GetAzureClientReq" + + "uest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(gkemulticlou" + + "d.googleapis.com/AzureClient\"\202\001\n\027ListAzu" + + "reClientsRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*" + + "\022(gkemulticloud.googleapis.com/AzureClie" + + "nt\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"v\n\030ListAzureClientsResponse\022A\n\razure_c" + + "lients\030\001 \003(\0132*.google.cloud.gkemulticlou" + + "d.v1.AzureClient\022\027\n\017next_page_token\030\002 \001(" + + "\t\"\210\001\n\030DeleteAzureClientRequest\022>\n\004name\030\001" + + " \001(\tB0\340A\002\372A*\n(gkemulticloud.googleapis.c" + + "om/AzureClient\022\025\n\rallow_missing\030\002 \001(\010\022\025\n" + + "\rvalidate_only\030\003 \001(\010\"k\n\037GenerateAzureAcc" + + "essTokenRequest\022H\n\razure_cluster\030\001 \001(\tB1" + + "\340A\002\372A+\n)gkemulticloud.googleapis.com/Azu" + + "reCluster\"w\n GenerateAzureAccessTokenRes" + + "ponse\022\031\n\014access_token\030\001 \001(\tB\003\340A\003\0228\n\017expi" + + "ration_time\030\002 \001(\0132\032.google.protobuf.Time" + + "stampB\003\340A\003\"\334\002\n%GenerateAzureClusterAgent" + + "TokenRequest\022H\n\razure_cluster\030\001 \001(\tB1\340A\002" + + "\372A+\n)gkemulticloud.googleapis.com/AzureC" + + "luster\022\032\n\rsubject_token\030\002 \001(\tB\003\340A\002\022\037\n\022su" + + "bject_token_type\030\003 \001(\tB\003\340A\002\022\024\n\007version\030\004" + + " \001(\tB\003\340A\002\022\031\n\014node_pool_id\030\005 \001(\tB\003\340A\001\022\027\n\n" + + "grant_type\030\006 \001(\tB\003\340A\001\022\025\n\010audience\030\007 \001(\tB" + + "\003\340A\001\022\022\n\005scope\030\010 \001(\tB\003\340A\001\022!\n\024requested_to" + + "ken_type\030\t \001(\tB\003\340A\001\022\024\n\007options\030\n \001(\tB\003\340A" + + "\001\"f\n&GenerateAzureClusterAgentTokenRespo" + + "nse\022\024\n\014access_token\030\001 \001(\t\022\022\n\nexpires_in\030" + + "\002 \001(\005\022\022\n\ntoken_type\030\003 \001(\t2\314#\n\rAzureClust" + + "ers\022\375\001\n\021CreateAzureClient\0227.google.cloud" + + ".gkemulticloud.v1.CreateAzureClientReque" + + "st\032\035.google.longrunning.Operation\"\217\001\312A \n" + + "\013AzureClient\022\021OperationMetadata\332A#parent" + + ",azure_client,azure_client_id\202\323\344\223\002@\"0/v1" + + "/{parent=projects/*/locations/*}/azureCl" + + "ients:\014azure_client\022\263\001\n\016GetAzureClient\0224" + + ".google.cloud.gkemulticloud.v1.GetAzureC" + + "lientRequest\032*.google.cloud.gkemulticlou" + + "d.v1.AzureClient\"?\332A\004name\202\323\344\223\0022\0220/v1/{na" + + "me=projects/*/locations/*/azureClients/*" + + "}\022\306\001\n\020ListAzureClients\0226.google.cloud.gk" + + "emulticloud.v1.ListAzureClientsRequest\0327" + + ".google.cloud.gkemulticloud.v1.ListAzure" + + "ClientsResponse\"A\332A\006parent\202\323\344\223\0022\0220/v1/{p" + + "arent=projects/*/locations/*}/azureClien" + + "ts\022\331\001\n\021DeleteAzureClient\0227.google.cloud." + + "gkemulticloud.v1.DeleteAzureClientReques" + + "t\032\035.google.longrunning.Operation\"l\312A*\n\025g" + + "oogle.protobuf.Empty\022\021OperationMetadata\332" + + "A\004name\202\323\344\223\0022*0/v1/{name=projects/*/locat" + + "ions/*/azureClients/*}\022\204\002\n\022CreateAzureCl" + + "uster\0228.google.cloud.gkemulticloud.v1.Cr" + + "eateAzureClusterRequest\032\035.google.longrun" + + "ning.Operation\"\224\001\312A!\n\014AzureCluster\022\021Oper" + + "ationMetadata\332A%parent,azure_cluster,azu" + + "re_cluster_id\202\323\344\223\002B\"1/v1/{parent=project" + + "s/*/locations/*}/azureClusters:\razure_cl" + + "uster\022\206\002\n\022UpdateAzureCluster\0228.google.cl" + + "oud.gkemulticloud.v1.UpdateAzureClusterR" + + "equest\032\035.google.longrunning.Operation\"\226\001" + + "\312A!\n\014AzureCluster\022\021OperationMetadata\332A\031a" + + "zure_cluster,update_mask\202\323\344\223\002P2?/v1/{azu" + + "re_cluster.name=projects/*/locations/*/a" + + "zureClusters/*}:\razure_cluster\022\267\001\n\017GetAz" + + "ureCluster\0225.google.cloud.gkemulticloud." + + "v1.GetAzureClusterRequest\032+.google.cloud" + + ".gkemulticloud.v1.AzureCluster\"@\332A\004name\202" + + "\323\344\223\0023\0221/v1/{name=projects/*/locations/*/" + + "azureClusters/*}\022\312\001\n\021ListAzureClusters\0227" + + ".google.cloud.gkemulticloud.v1.ListAzure" + + "ClustersRequest\0328.google.cloud.gkemultic" + + "loud.v1.ListAzureClustersResponse\"B\332A\006pa" + + "rent\202\323\344\223\0023\0221/v1/{parent=projects/*/locat" + + "ions/*}/azureClusters\022\334\001\n\022DeleteAzureClu" + + "ster\0228.google.cloud.gkemulticloud.v1.Del" + + "eteAzureClusterRequest\032\035.google.longrunn" + + "ing.Operation\"m\312A*\n\025google.protobuf.Empt" + + "y\022\021OperationMetadata\332A\004name\202\323\344\223\0023*1/v1/{" + + "name=projects/*/locations/*/azureCluster" + + "s/*}\022\223\002\n\036GenerateAzureClusterAgentToken\022" + + "D.google.cloud.gkemulticloud.v1.Generate" + + "AzureClusterAgentTokenRequest\032E.google.c" + + "loud.gkemulticloud.v1.GenerateAzureClust" + + "erAgentTokenResponse\"d\202\323\344\223\002^\"Y/v1/{azure" + + "_cluster=projects/*/locations/*/azureClu" + + "sters/*}:generateAzureClusterAgentToken:" + + "\001*\022\370\001\n\030GenerateAzureAccessToken\022>.google" + + ".cloud.gkemulticloud.v1.GenerateAzureAcc" + + "essTokenRequest\032?.google.cloud.gkemultic" + + "loud.v1.GenerateAzureAccessTokenResponse" + + "\"[\202\323\344\223\002U\022S/v1/{azure_cluster=projects/*/" + + "locations/*/azureClusters/*}:generateAzu" + + "reAccessToken\022\236\002\n\023CreateAzureNodePool\0229." + + "google.cloud.gkemulticloud.v1.CreateAzur" + + "eNodePoolRequest\032\035.google.longrunning.Op" + + "eration\"\254\001\312A\"\n\rAzureNodePool\022\021OperationM" + + "etadata\332A)parent,azure_node_pool,azure_n" + + "ode_pool_id\202\323\344\223\002U\"B/v1/{parent=projects/" + + "*/locations/*/azureClusters/*}/azureNode" + + "Pools:\017azure_node_pool\022\240\002\n\023UpdateAzureNo" + + "dePool\0229.google.cloud.gkemulticloud.v1.U" + + "pdateAzureNodePoolRequest\032\035.google.longr" + + "unning.Operation\"\256\001\312A\"\n\rAzureNodePool\022\021O" + + "perationMetadata\332A\033azure_node_pool,updat" + + "e_mask\202\323\344\223\002e2R/v1/{azure_node_pool.name=" + + "projects/*/locations/*/azureClusters/*/a" + + "zureNodePools/*}:\017azure_node_pool\022\313\001\n\020Ge" + + "tAzureNodePool\0226.google.cloud.gkemulticl" + + "oud.v1.GetAzureNodePoolRequest\032,.google." + + "cloud.gkemulticloud.v1.AzureNodePool\"Q\332A" + + "\004name\202\323\344\223\002D\022B/v1/{name=projects/*/locati" + + "ons/*/azureClusters/*/azureNodePools/*}\022" + + "\336\001\n\022ListAzureNodePools\0228.google.cloud.gk" + + "emulticloud.v1.ListAzureNodePoolsRequest" + + "\0329.google.cloud.gkemulticloud.v1.ListAzu" + + "reNodePoolsResponse\"S\332A\006parent\202\323\344\223\002D\022B/v" + + "1/{parent=projects/*/locations/*/azureCl" + + "usters/*}/azureNodePools\022\357\001\n\023DeleteAzure" + + "NodePool\0229.google.cloud.gkemulticloud.v1" + + ".DeleteAzureNodePoolRequest\032\035.google.lon" + + "grunning.Operation\"~\312A*\n\025google.protobuf" + + ".Empty\022\021OperationMetadata\332A\004name\202\323\344\223\002D*B" + + "/v1/{name=projects/*/locations/*/azureCl" + + "usters/*/azureNodePools/*}\022\371\001\n\024GetAzureO" + + "penIdConfig\022:.google.cloud.gkemulticloud" + + ".v1.GetAzureOpenIdConfigRequest\0320.google" + + ".cloud.gkemulticloud.v1.AzureOpenIdConfi" + + "g\"s\332A\razure_cluster\202\323\344\223\002]\022[/v1/{azure_cl" + + "uster=projects/*/locations/*/azureCluste" + + "rs/*}/.well-known/openid-configuration\022\332" + + "\001\n\023GetAzureJsonWebKeys\0229.google.cloud.gk" + + "emulticloud.v1.GetAzureJsonWebKeysReques" + + "t\032/.google.cloud.gkemulticloud.v1.AzureJ" + + "sonWebKeys\"W\332A\razure_cluster\202\323\344\223\002A\022?/v1/" + + "{azure_cluster=projects/*/locations/*/az" + + "ureClusters/*}/jwks\022\310\001\n\024GetAzureServerCo" + + "nfig\022:.google.cloud.gkemulticloud.v1.Get" + + "AzureServerConfigRequest\0320.google.cloud." + + "gkemulticloud.v1.AzureServerConfig\"B\332A\004n" + + "ame\202\323\344\223\0025\0223/v1/{name=projects/*/location" + + "s/*/azureServerConfig}\032P\312A\034gkemulticloud" + + ".googleapis.com\322A.https://www.googleapis" + + ".com/auth/cloud-platformB\344\001\n!com.google." + + "cloud.gkemulticloud.v1B\021AzureServiceProt" + + "oP\001ZGcloud.google.com/go/gkemulticloud/a" + + "piv1/gkemulticloudpb;gkemulticloudpb\252\002\035G" + + "oogle.Cloud.GkeMultiCloud.V1\312\002\035Google\\Cl" + + "oud\\GkeMultiCloud\\V1\352\002 Google::Cloud::Gk" + + "eMultiCloud::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -415,7 +416,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_gkemulticloud_v1_DeleteAzureClusterRequest_descriptor, new java.lang.String[] { - "Name", "AllowMissing", "ValidateOnly", "Etag", + "Name", "AllowMissing", "ValidateOnly", "Etag", "IgnoreErrors", }); internal_static_google_cloud_gkemulticloud_v1_CreateAzureNodePoolRequest_descriptor = getDescriptor().getMessageTypes().get(6); @@ -463,7 +464,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_gkemulticloud_v1_DeleteAzureNodePoolRequest_descriptor, new java.lang.String[] { - "Name", "ValidateOnly", "AllowMissing", "Etag", + "Name", "ValidateOnly", "AllowMissing", "Etag", "IgnoreErrors", }); internal_static_google_cloud_gkemulticloud_v1_GetAzureOpenIdConfigRequest_descriptor = getDescriptor().getMessageTypes().get(12); diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java index 668f79c972b4..7ddebce6d6f2 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequest.java @@ -237,6 +237,27 @@ public com.google.protobuf.ByteString getEtagBytes() { } } + public static final int IGNORE_ERRORS_FIELD_NUMBER = 5; + private boolean ignoreErrors_ = false; + /** + * + * + *
    +   * Optional. If set to true, the deletion of
    +   * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will
    +   * succeed even if errors occur during deleting in cluster resources. Using
    +   * this parameter may result in orphaned resources in the cluster.
    +   * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreErrors. + */ + @java.lang.Override + public boolean getIgnoreErrors() { + return ignoreErrors_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -263,6 +284,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); } + if (ignoreErrors_ != false) { + output.writeBool(5, ignoreErrors_); + } getUnknownFields().writeTo(output); } @@ -284,6 +308,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); } + if (ignoreErrors_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, ignoreErrors_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -304,6 +331,7 @@ public boolean equals(final java.lang.Object obj) { if (getAllowMissing() != other.getAllowMissing()) return false; if (getValidateOnly() != other.getValidateOnly()) return false; if (!getEtag().equals(other.getEtag())) return false; + if (getIgnoreErrors() != other.getIgnoreErrors()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -323,6 +351,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + IGNORE_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreErrors()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -467,6 +497,7 @@ public Builder clear() { allowMissing_ = false; validateOnly_ = false; etag_ = ""; + ignoreErrors_ = false; return this; } @@ -515,6 +546,9 @@ private void buildPartial0(com.google.cloud.gkemulticloud.v1.DeleteAzureClusterR if (((from_bitField0_ & 0x00000008) != 0)) { result.etag_ = etag_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ignoreErrors_ = ignoreErrors_; + } } @java.lang.Override @@ -579,6 +613,9 @@ public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAzureClusterReq bitField0_ |= 0x00000008; onChanged(); } + if (other.getIgnoreErrors() != false) { + setIgnoreErrors(other.getIgnoreErrors()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -629,6 +666,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 40: + { + ignoreErrors_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1056,6 +1099,68 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { return this; } + private boolean ignoreErrors_; + /** + * + * + *
    +     * Optional. If set to true, the deletion of
    +     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will
    +     * succeed even if errors occur during deleting in cluster resources. Using
    +     * this parameter may result in orphaned resources in the cluster.
    +     * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreErrors. + */ + @java.lang.Override + public boolean getIgnoreErrors() { + return ignoreErrors_; + } + /** + * + * + *
    +     * Optional. If set to true, the deletion of
    +     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will
    +     * succeed even if errors occur during deleting in cluster resources. Using
    +     * this parameter may result in orphaned resources in the cluster.
    +     * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ignoreErrors to set. + * @return This builder for chaining. + */ + public Builder setIgnoreErrors(boolean value) { + + ignoreErrors_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. If set to true, the deletion of
    +     * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will
    +     * succeed even if errors occur during deleting in cluster resources. Using
    +     * this parameter may result in orphaned resources in the cluster.
    +     * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreErrors() { + bitField0_ = (bitField0_ & ~0x00000010); + ignoreErrors_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java index b5d0a1d99816..6951ceb1f947 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureClusterRequestOrBuilder.java @@ -134,4 +134,20 @@ public interface DeleteAzureClusterRequestOrBuilder * @return The bytes for etag. */ com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
    +   * Optional. If set to true, the deletion of
    +   * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will
    +   * succeed even if errors occur during deleting in cluster resources. Using
    +   * this parameter may result in orphaned resources in the cluster.
    +   * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreErrors. + */ + boolean getIgnoreErrors(); } diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java index a545c34f8a40..08ed20a54c0a 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequest.java @@ -239,6 +239,27 @@ public com.google.protobuf.ByteString getEtagBytes() { } } + public static final int IGNORE_ERRORS_FIELD_NUMBER = 5; + private boolean ignoreErrors_ = false; + /** + * + * + *
    +   * Optional. If set to true, the deletion of
    +   * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will
    +   * succeed even if errors occur during deleting in node pool resources. Using
    +   * this parameter may result in orphaned resources in the node pool.
    +   * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreErrors. + */ + @java.lang.Override + public boolean getIgnoreErrors() { + return ignoreErrors_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -265,6 +286,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_); } + if (ignoreErrors_ != false) { + output.writeBool(5, ignoreErrors_); + } getUnknownFields().writeTo(output); } @@ -286,6 +310,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_); } + if (ignoreErrors_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, ignoreErrors_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -306,6 +333,7 @@ public boolean equals(final java.lang.Object obj) { if (getValidateOnly() != other.getValidateOnly()) return false; if (getAllowMissing() != other.getAllowMissing()) return false; if (!getEtag().equals(other.getEtag())) return false; + if (getIgnoreErrors() != other.getIgnoreErrors()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,6 +353,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + IGNORE_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreErrors()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -469,6 +499,7 @@ public Builder clear() { validateOnly_ = false; allowMissing_ = false; etag_ = ""; + ignoreErrors_ = false; return this; } @@ -519,6 +550,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.etag_ = etag_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ignoreErrors_ = ignoreErrors_; + } } @java.lang.Override @@ -584,6 +618,9 @@ public Builder mergeFrom(com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRe bitField0_ |= 0x00000008; onChanged(); } + if (other.getIgnoreErrors() != false) { + setIgnoreErrors(other.getIgnoreErrors()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -634,6 +671,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 40: + { + ignoreErrors_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1067,6 +1110,68 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { return this; } + private boolean ignoreErrors_; + /** + * + * + *
    +     * Optional. If set to true, the deletion of
    +     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will
    +     * succeed even if errors occur during deleting in node pool resources. Using
    +     * this parameter may result in orphaned resources in the node pool.
    +     * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreErrors. + */ + @java.lang.Override + public boolean getIgnoreErrors() { + return ignoreErrors_; + } + /** + * + * + *
    +     * Optional. If set to true, the deletion of
    +     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will
    +     * succeed even if errors occur during deleting in node pool resources. Using
    +     * this parameter may result in orphaned resources in the node pool.
    +     * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ignoreErrors to set. + * @return This builder for chaining. + */ + public Builder setIgnoreErrors(boolean value) { + + ignoreErrors_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
    +     * Optional. If set to true, the deletion of
    +     * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will
    +     * succeed even if errors occur during deleting in node pool resources. Using
    +     * this parameter may result in orphaned resources in the node pool.
    +     * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreErrors() { + bitField0_ = (bitField0_ & ~0x00000010); + ignoreErrors_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java index 975566ae3e2b..6baf9ae2b6d6 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/DeleteAzureNodePoolRequestOrBuilder.java @@ -136,4 +136,20 @@ public interface DeleteAzureNodePoolRequestOrBuilder * @return The bytes for etag. */ com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
    +   * Optional. If set to true, the deletion of
    +   * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will
    +   * succeed even if errors occur during deleting in node pool resources. Using
    +   * this parameter may result in orphaned resources in the node pool.
    +   * 
    + * + * bool ignore_errors = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreErrors. + */ + boolean getIgnoreErrors(); } diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequest.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequest.java index 7726eb87778a..5095c8821826 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequest.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequest.java @@ -76,7 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
        * Required. The AzureCluster, which owns the JsonWebKeys.
        * Format:
    -   * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
        * 
    * * @@ -103,7 +103,7 @@ public java.lang.String getAzureCluster() { *
        * Required. The AzureCluster, which owns the JsonWebKeys.
        * Format:
    -   * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
        * 
    * * @@ -481,7 +481,7 @@ public Builder mergeFrom( *
          * Required. The AzureCluster, which owns the JsonWebKeys.
          * Format:
    -     * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
          * 
    * * @@ -507,7 +507,7 @@ public java.lang.String getAzureCluster() { *
          * Required. The AzureCluster, which owns the JsonWebKeys.
          * Format:
    -     * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
          * 
    * * @@ -533,7 +533,7 @@ public com.google.protobuf.ByteString getAzureClusterBytes() { *
          * Required. The AzureCluster, which owns the JsonWebKeys.
          * Format:
    -     * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
          * 
    * * @@ -558,7 +558,7 @@ public Builder setAzureCluster(java.lang.String value) { *
          * Required. The AzureCluster, which owns the JsonWebKeys.
          * Format:
    -     * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
          * 
    * * @@ -579,7 +579,7 @@ public Builder clearAzureCluster() { *
          * Required. The AzureCluster, which owns the JsonWebKeys.
          * Format:
    -     * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +     * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
          * 
    * * diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequestOrBuilder.java b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequestOrBuilder.java index b99e0fd2e773..4abbac990fe6 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequestOrBuilder.java +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/java/com/google/cloud/gkemulticloud/v1/GetAzureJsonWebKeysRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface GetAzureJsonWebKeysRequestOrBuilder *
        * Required. The AzureCluster, which owns the JsonWebKeys.
        * Format:
    -   * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
        * 
    * * @@ -46,7 +46,7 @@ public interface GetAzureJsonWebKeysRequestOrBuilder *
        * Required. The AzureCluster, which owns the JsonWebKeys.
        * Format:
    -   * projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
    +   * `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`
        * 
    * * diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto index 9dfedaceccef..0c5a923aa673 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/aws_resources.proto @@ -564,8 +564,8 @@ message AwsNodeConfig { // 255 Unicode characters. map tags = 5 [(google.api.field_behavior) = OPTIONAL]; - // Required. The name or ARN of the AWS IAM role assigned to nodes in the - // pool. + // Required. The name or ARN of the AWS IAM instance profile to assign to + // nodes in the pool. string iam_instance_profile = 6 [(google.api.field_behavior) = REQUIRED]; // Optional. The OS image type to use on node pool instances. diff --git a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto index d06683b40320..a282590d6612 100644 --- a/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto +++ b/java-gke-multi-cloud/proto-google-cloud-gke-multi-cloud-v1/src/main/proto/google/cloud/gkemulticloud/v1/azure_service.proto @@ -472,6 +472,12 @@ message DeleteAzureClusterRequest { // If the provided etag does not match the current etag of the cluster, // the request will fail and an ABORTED error will be returned. string etag = 4; + + // Optional. If set to true, the deletion of + // [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource will + // succeed even if errors occur during deleting in cluster resources. Using + // this parameter may result in orphaned resources in the cluster. + bool ignore_errors = 5 [(google.api.field_behavior) = OPTIONAL]; } // Response message for `AzureClusters.CreateAzureNodePool` method. @@ -635,6 +641,12 @@ message DeleteAzureNodePoolRequest { // If the provided ETag does not match the current etag of the node pool, // the request will fail and an ABORTED error will be returned. string etag = 4; + + // Optional. If set to true, the deletion of + // [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource will + // succeed even if errors occur during deleting in node pool resources. Using + // this parameter may result in orphaned resources in the node pool. + bool ignore_errors = 5 [(google.api.field_behavior) = OPTIONAL]; } // GetAzureOpenIdConfigRequest gets the OIDC discovery document for the @@ -658,7 +670,7 @@ message GetAzureOpenIdConfigRequest { message GetAzureJsonWebKeysRequest { // Required. The AzureCluster, which owns the JsonWebKeys. // Format: - // projects//locations//azureClusters/ + // `projects//locations//azureClusters/` string azure_cluster = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureCluster.java b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureCluster.java index b7991d3c444c..ca8b1f1b0f76 100644 --- a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureCluster.java +++ b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureCluster.java @@ -42,6 +42,7 @@ public static void asyncDeleteAzureCluster() throws Exception { .setAllowMissing(true) .setValidateOnly(true) .setEtag("etag3123477") + .setIgnoreErrors(true) .build(); ApiFuture future = azureClustersClient.deleteAzureClusterCallable().futureCall(request); diff --git a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureClusterLRO.java b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureClusterLRO.java index 8a75184405de..1fa4da36bb5d 100644 --- a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureClusterLRO.java +++ b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/AsyncDeleteAzureClusterLRO.java @@ -43,6 +43,7 @@ public static void asyncDeleteAzureClusterLRO() throws Exception { .setAllowMissing(true) .setValidateOnly(true) .setEtag("etag3123477") + .setIgnoreErrors(true) .build(); OperationFuture future = azureClustersClient.deleteAzureClusterOperationCallable().futureCall(request); diff --git a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/SyncDeleteAzureCluster.java b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/SyncDeleteAzureCluster.java index 7ee098ec9314..bf2e8fac0c4e 100644 --- a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/SyncDeleteAzureCluster.java +++ b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurecluster/SyncDeleteAzureCluster.java @@ -41,6 +41,7 @@ public static void syncDeleteAzureCluster() throws Exception { .setAllowMissing(true) .setValidateOnly(true) .setEtag("etag3123477") + .setIgnoreErrors(true) .build(); azureClustersClient.deleteAzureClusterAsync(request).get(); } diff --git a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePool.java b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePool.java index 09b7d52da3cd..431a7068dd5a 100644 --- a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePool.java +++ b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePool.java @@ -45,6 +45,7 @@ public static void asyncDeleteAzureNodePool() throws Exception { .setValidateOnly(true) .setAllowMissing(true) .setEtag("etag3123477") + .setIgnoreErrors(true) .build(); ApiFuture future = azureClustersClient.deleteAzureNodePoolCallable().futureCall(request); diff --git a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePoolLRO.java b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePoolLRO.java index 1646b3d5d76f..58fe33cb5c80 100644 --- a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePoolLRO.java +++ b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/AsyncDeleteAzureNodePoolLRO.java @@ -46,6 +46,7 @@ public static void asyncDeleteAzureNodePoolLRO() throws Exception { .setValidateOnly(true) .setAllowMissing(true) .setEtag("etag3123477") + .setIgnoreErrors(true) .build(); OperationFuture future = azureClustersClient.deleteAzureNodePoolOperationCallable().futureCall(request); diff --git a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/SyncDeleteAzureNodePool.java b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/SyncDeleteAzureNodePool.java index 8a532db10dfd..52d549e48382 100644 --- a/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/SyncDeleteAzureNodePool.java +++ b/java-gke-multi-cloud/samples/snippets/generated/com/google/cloud/gkemulticloud/v1/azureclusters/deleteazurenodepool/SyncDeleteAzureNodePool.java @@ -44,6 +44,7 @@ public static void syncDeleteAzureNodePool() throws Exception { .setValidateOnly(true) .setAllowMissing(true) .setEtag("etag3123477") + .setIgnoreErrors(true) .build(); azureClustersClient.deleteAzureNodePoolAsync(request).get(); }