Class TuningJob.Builder (3.56.0)

public static final class TuningJob.Builder extends GeneratedMessageV3.Builder<TuningJob.Builder> implements TuningJobOrBuilder

Represents a TuningJob that runs with Google owned models.

Protobuf type google.cloud.aiplatform.v1.TuningJob

Implements

TuningJobOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TuningJob.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TuningJob.Builder
Overrides

build()

public TuningJob build()
Returns
Type Description
TuningJob

buildPartial()

public TuningJob buildPartial()
Returns
Type Description
TuningJob

clear()

public TuningJob.Builder clear()
Returns
Type Description
TuningJob.Builder
Overrides

clearBaseModel()

public TuningJob.Builder clearBaseModel()

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

string base_model = 4;

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearCreateTime()

public TuningJob.Builder clearCreateTime()

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

clearDescription()

public TuningJob.Builder clearDescription()

Optional. The description of the TuningJob.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearEncryptionSpec()

public TuningJob.Builder clearEncryptionSpec()

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.v1.EncryptionSpec encryption_spec = 16;

Returns
Type Description
TuningJob.Builder

clearEndTime()

public TuningJob.Builder clearEndTime()

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

clearError()

public TuningJob.Builder clearError()

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];

Returns
Type Description
TuningJob.Builder

clearExperiment()

public TuningJob.Builder clearExperiment()

Output only. The Experiment associated with this TuningJob.

string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TuningJob.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TuningJob.Builder
Overrides

clearLabels()

public TuningJob.Builder clearLabels()
Returns
Type Description
TuningJob.Builder

clearName()

public TuningJob.Builder clearName()

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];

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public TuningJob.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TuningJob.Builder
Overrides

clearServiceAccount()

public TuningJob.Builder clearServiceAccount()

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent

Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

string service_account = 22;

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearSourceModel()

public TuningJob.Builder clearSourceModel()
Returns
Type Description
TuningJob.Builder

clearStartTime()

public TuningJob.Builder clearStartTime()

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

clearState()

public TuningJob.Builder clearState()

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearSupervisedTuningSpec()

public TuningJob.Builder clearSupervisedTuningSpec()

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Returns
Type Description
TuningJob.Builder

clearTunedModel()

public TuningJob.Builder clearTunedModel()

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

clearTunedModelDisplayName()

public TuningJob.Builder clearTunedModelDisplayName()

Optional. The display name of the TunedModel. 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];

Returns
Type Description
TuningJob.Builder

This builder for chaining.

clearTuningDataStats()

public TuningJob.Builder clearTuningDataStats()

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

clearTuningSpec()

public TuningJob.Builder clearTuningSpec()
Returns
Type Description
TuningJob.Builder

clearUpdateTime()

public TuningJob.Builder clearUpdateTime()

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningJob.Builder

clone()

public TuningJob.Builder clone()
Returns
Type Description
TuningJob.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Parameter
Name Description
key String
Returns
Type Description
boolean

getBaseModel()

public String getBaseModel()

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

string base_model = 4;

Returns
Type Description
String

The baseModel.

getBaseModelBytes()

public ByteString getBaseModelBytes()

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

string base_model = 4;

Returns
Type Description
ByteString

The bytes for baseModel.

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public TuningJob getDefaultInstanceForType()
Returns
Type Description
TuningJob

getDescription()

public String getDescription()

Optional. The description of the TuningJob.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The description of the TuningJob.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEncryptionSpec()

public 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.v1.EncryptionSpec encryption_spec = 16;

Returns
Type Description
EncryptionSpec

The encryptionSpec.

getEncryptionSpecBuilder()

public EncryptionSpec.Builder getEncryptionSpecBuilder()

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.v1.EncryptionSpec encryption_spec = 16;

Returns
Type Description
EncryptionSpec.Builder

getEncryptionSpecOrBuilder()

public EncryptionSpecOrBuilder getEncryptionSpecOrBuilder()

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.v1.EncryptionSpec encryption_spec = 16;

Returns
Type Description
EncryptionSpecOrBuilder

getEndTime()

public Timestamp getEndTime()

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The endTime.

getEndTimeBuilder()

public Timestamp.Builder getEndTimeBuilder()

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getEndTimeOrBuilder()

public TimestampOrBuilder getEndTimeOrBuilder()

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getError()

public 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];

Returns
Type Description
com.google.rpc.Status

The error.

getErrorBuilder()

public Status.Builder getErrorBuilder()

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];

Returns
Type Description
com.google.rpc.Status.Builder

getErrorOrBuilder()

public StatusOrBuilder getErrorOrBuilder()

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];

Returns
Type Description
com.google.rpc.StatusOrBuilder

getExperiment()

public String getExperiment()

Output only. The Experiment associated with this TuningJob.

string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The experiment.

getExperimentBytes()

public ByteString getExperimentBytes()

Output only. The Experiment associated with this TuningJob.

string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for experiment.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public 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];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

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];

Returns
Type Description
ByteString

The bytes for name.

getServiceAccount()

public String getServiceAccount()

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent

Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

string service_account = 22;

Returns
Type Description
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent

Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

string service_account = 22;

Returns
Type Description
ByteString

The bytes for serviceAccount.

getSourceModelCase()

public TuningJob.SourceModelCase getSourceModelCase()
Returns
Type Description
TuningJob.SourceModelCase

getStartTime()

public Timestamp getStartTime()

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getState()

public JobState getState()

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
JobState

The state.

getStateValue()

public int getStateValue()

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for state.

getSupervisedTuningSpec()

public SupervisedTuningSpec getSupervisedTuningSpec()

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Returns
Type Description
SupervisedTuningSpec

The supervisedTuningSpec.

getSupervisedTuningSpecBuilder()

public SupervisedTuningSpec.Builder getSupervisedTuningSpecBuilder()

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Returns
Type Description
SupervisedTuningSpec.Builder

getSupervisedTuningSpecOrBuilder()

public SupervisedTuningSpecOrBuilder getSupervisedTuningSpecOrBuilder()

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Returns
Type Description
SupervisedTuningSpecOrBuilder

getTunedModel()

public TunedModel getTunedModel()

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TunedModel

The tunedModel.

getTunedModelBuilder()

public TunedModel.Builder getTunedModelBuilder()

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TunedModel.Builder

getTunedModelDisplayName()

public String getTunedModelDisplayName()

Optional. The display name of the TunedModel. 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];

Returns
Type Description
String

The tunedModelDisplayName.

getTunedModelDisplayNameBytes()

public ByteString getTunedModelDisplayNameBytes()

Optional. The display name of the TunedModel. 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];

Returns
Type Description
ByteString

The bytes for tunedModelDisplayName.

getTunedModelOrBuilder()

public TunedModelOrBuilder getTunedModelOrBuilder()

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TunedModelOrBuilder

getTuningDataStats()

public TuningDataStats getTuningDataStats()

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningDataStats

The tuningDataStats.

getTuningDataStatsBuilder()

public TuningDataStats.Builder getTuningDataStatsBuilder()

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningDataStats.Builder

getTuningDataStatsOrBuilder()

public TuningDataStatsOrBuilder getTuningDataStatsOrBuilder()

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TuningDataStatsOrBuilder

getTuningSpecCase()

public TuningJob.TuningSpecCase getTuningSpecCase()
Returns
Type Description
TuningJob.TuningSpecCase

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasBaseModel()

public boolean hasBaseModel()

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

string base_model = 4;

Returns
Type Description
boolean

Whether the baseModel field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasEncryptionSpec()

public 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.v1.EncryptionSpec encryption_spec = 16;

Returns
Type Description
boolean

Whether the encryptionSpec field is set.

hasEndTime()

public boolean hasEndTime()

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the endTime field is set.

hasError()

public 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];

Returns
Type Description
boolean

Whether the error field is set.

hasStartTime()

public boolean hasStartTime()

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the startTime field is set.

hasSupervisedTuningSpec()

public boolean hasSupervisedTuningSpec()

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Returns
Type Description
boolean

Whether the supervisedTuningSpec field is set.

hasTunedModel()

public boolean hasTunedModel()

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the tunedModel field is set.

hasTuningDataStats()

public boolean hasTuningDataStats()

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the tuningDataStats field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public TuningJob.Builder mergeCreateTime(Timestamp value)

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

mergeEncryptionSpec(EncryptionSpec value)

public TuningJob.Builder mergeEncryptionSpec(EncryptionSpec value)

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.v1.EncryptionSpec encryption_spec = 16;

Parameter
Name Description
value EncryptionSpec
Returns
Type Description
TuningJob.Builder

mergeEndTime(Timestamp value)

public TuningJob.Builder mergeEndTime(Timestamp value)

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

mergeError(Status value)

public TuningJob.Builder mergeError(Status value)

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];

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
TuningJob.Builder

mergeFrom(TuningJob other)

public TuningJob.Builder mergeFrom(TuningJob other)
Parameter
Name Description
other TuningJob
Returns
Type Description
TuningJob.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TuningJob.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TuningJob.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TuningJob.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TuningJob.Builder
Overrides

mergeStartTime(Timestamp value)

public TuningJob.Builder mergeStartTime(Timestamp value)

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

mergeSupervisedTuningSpec(SupervisedTuningSpec value)

public TuningJob.Builder mergeSupervisedTuningSpec(SupervisedTuningSpec value)

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Parameter
Name Description
value SupervisedTuningSpec
Returns
Type Description
TuningJob.Builder

mergeTunedModel(TunedModel value)

public TuningJob.Builder mergeTunedModel(TunedModel value)

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value TunedModel
Returns
Type Description
TuningJob.Builder

mergeTuningDataStats(TuningDataStats value)

public TuningJob.Builder mergeTuningDataStats(TuningDataStats value)

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value TuningDataStats
Returns
Type Description
TuningJob.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TuningJob.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TuningJob.Builder
Overrides

mergeUpdateTime(Timestamp value)

public TuningJob.Builder mergeUpdateTime(Timestamp value)

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

putAllLabels(Map<String,String> values)

public TuningJob.Builder putAllLabels(Map<String,String> values)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
TuningJob.Builder

putLabels(String key, String value)

public TuningJob.Builder putLabels(String key, String value)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Parameters
Name Description
key String
value String
Returns
Type Description
TuningJob.Builder

removeLabels(String key)

public TuningJob.Builder removeLabels(String key)

Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and 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];

Parameter
Name Description
key String
Returns
Type Description
TuningJob.Builder

setBaseModel(String value)

public TuningJob.Builder setBaseModel(String value)

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

string base_model = 4;

Parameter
Name Description
value String

The baseModel to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setBaseModelBytes(ByteString value)

public TuningJob.Builder setBaseModelBytes(ByteString value)

The base model that is being tuned, e.g., "gemini-1.0-pro-002".

string base_model = 4;

Parameter
Name Description
value ByteString

The bytes for baseModel to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public TuningJob.Builder setCreateTime(Timestamp value)

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

setCreateTime(Timestamp.Builder builderForValue)

public TuningJob.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time when the TuningJob was created.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
TuningJob.Builder

setDescription(String value)

public TuningJob.Builder setDescription(String value)

Optional. The description of the TuningJob.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public TuningJob.Builder setDescriptionBytes(ByteString value)

Optional. The description of the TuningJob.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setEncryptionSpec(EncryptionSpec value)

public TuningJob.Builder setEncryptionSpec(EncryptionSpec value)

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.v1.EncryptionSpec encryption_spec = 16;

Parameter
Name Description
value EncryptionSpec
Returns
Type Description
TuningJob.Builder

setEncryptionSpec(EncryptionSpec.Builder builderForValue)

public TuningJob.Builder setEncryptionSpec(EncryptionSpec.Builder builderForValue)

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.v1.EncryptionSpec encryption_spec = 16;

Parameter
Name Description
builderForValue EncryptionSpec.Builder
Returns
Type Description
TuningJob.Builder

setEndTime(Timestamp value)

public TuningJob.Builder setEndTime(Timestamp value)

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

setEndTime(Timestamp.Builder builderForValue)

public TuningJob.Builder setEndTime(Timestamp.Builder builderForValue)

Output only. Time when the TuningJob entered any of the following JobStates: JOB_STATE_SUCCEEDED, JOB_STATE_FAILED, JOB_STATE_CANCELLED, JOB_STATE_EXPIRED.

.google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
TuningJob.Builder

setError(Status value)

public TuningJob.Builder setError(Status value)

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];

Parameter
Name Description
value com.google.rpc.Status
Returns
Type Description
TuningJob.Builder

setError(Status.Builder builderForValue)

public TuningJob.Builder setError(Status.Builder builderForValue)

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];

Parameter
Name Description
builderForValue com.google.rpc.Status.Builder
Returns
Type Description
TuningJob.Builder

setExperiment(String value)

public TuningJob.Builder setExperiment(String value)

Output only. The Experiment associated with this TuningJob.

string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The experiment to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setExperimentBytes(ByteString value)

public TuningJob.Builder setExperimentBytes(ByteString value)

Output only. The Experiment associated with this TuningJob.

string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for experiment to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TuningJob.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TuningJob.Builder
Overrides

setName(String value)

public TuningJob.Builder setName(String value)

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];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setNameBytes(ByteString value)

public TuningJob.Builder setNameBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TuningJob.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TuningJob.Builder
Overrides

setServiceAccount(String value)

public TuningJob.Builder setServiceAccount(String value)

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent

Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

string service_account = 22;

Parameter
Name Description
value String

The serviceAccount to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setServiceAccountBytes(ByteString value)

public TuningJob.Builder setServiceAccountBytes(ByteString value)

The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent

Users starting the pipeline must have the iam.serviceAccounts.actAs permission on this service account.

string service_account = 22;

Parameter
Name Description
value ByteString

The bytes for serviceAccount to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setStartTime(Timestamp value)

public TuningJob.Builder setStartTime(Timestamp value)

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

setStartTime(Timestamp.Builder builderForValue)

public TuningJob.Builder setStartTime(Timestamp.Builder builderForValue)

Output only. Time when the TuningJob for the first time entered the JOB_STATE_RUNNING state.

.google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
TuningJob.Builder

setState(JobState value)

public TuningJob.Builder setState(JobState value)

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value JobState

The state to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setStateValue(int value)

public TuningJob.Builder setStateValue(int value)

Output only. The detailed state of the job.

.google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setSupervisedTuningSpec(SupervisedTuningSpec value)

public TuningJob.Builder setSupervisedTuningSpec(SupervisedTuningSpec value)

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Parameter
Name Description
value SupervisedTuningSpec
Returns
Type Description
TuningJob.Builder

setSupervisedTuningSpec(SupervisedTuningSpec.Builder builderForValue)

public TuningJob.Builder setSupervisedTuningSpec(SupervisedTuningSpec.Builder builderForValue)

Tuning Spec for Supervised Fine Tuning.

.google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5;

Parameter
Name Description
builderForValue SupervisedTuningSpec.Builder
Returns
Type Description
TuningJob.Builder

setTunedModel(TunedModel value)

public TuningJob.Builder setTunedModel(TunedModel value)

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value TunedModel
Returns
Type Description
TuningJob.Builder

setTunedModel(TunedModel.Builder builderForValue)

public TuningJob.Builder setTunedModel(TunedModel.Builder builderForValue)

Output only. The tuned model resources assiociated with this TuningJob.

.google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue TunedModel.Builder
Returns
Type Description
TuningJob.Builder

setTunedModelDisplayName(String value)

public TuningJob.Builder setTunedModelDisplayName(String value)

Optional. The display name of the TunedModel. 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];

Parameter
Name Description
value String

The tunedModelDisplayName to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setTunedModelDisplayNameBytes(ByteString value)

public TuningJob.Builder setTunedModelDisplayNameBytes(ByteString value)

Optional. The display name of the TunedModel. 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];

Parameter
Name Description
value ByteString

The bytes for tunedModelDisplayName to set.

Returns
Type Description
TuningJob.Builder

This builder for chaining.

setTuningDataStats(TuningDataStats value)

public TuningJob.Builder setTuningDataStats(TuningDataStats value)

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value TuningDataStats
Returns
Type Description
TuningJob.Builder

setTuningDataStats(TuningDataStats.Builder builderForValue)

public TuningJob.Builder setTuningDataStats(TuningDataStats.Builder builderForValue)

Output only. The tuning data statistics associated with this TuningJob.

.google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue TuningDataStats.Builder
Returns
Type Description
TuningJob.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TuningJob.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TuningJob.Builder
Overrides

setUpdateTime(Timestamp value)

public TuningJob.Builder setUpdateTime(Timestamp value)

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
TuningJob.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public TuningJob.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Time when the TuningJob was most recently updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
TuningJob.Builder