Class ServiceAccountSpec.Builder (3.53.0)

public static final class ServiceAccountSpec.Builder extends GeneratedMessageV3.Builder<ServiceAccountSpec.Builder> implements ServiceAccountSpecOrBuilder

Configuration for the use of custom service account to run the workloads.

Protobuf type google.cloud.aiplatform.v1beta1.ServiceAccountSpec

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ServiceAccountSpec build()
Returns
Type Description
ServiceAccountSpec

buildPartial()

public ServiceAccountSpec buildPartial()
Returns
Type Description
ServiceAccountSpec

clear()

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

clearEnableCustomServiceAccount()

public ServiceAccountSpec.Builder clearEnableCustomServiceAccount()

Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the Vertex AI Custom Code Service Agent.

bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ServiceAccountSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearServiceAccount()

public ServiceAccountSpec.Builder clearServiceAccount()

Optional. Required when all below conditions are met

  • enable_custom_service_account is true;
  • any runtime is specified via ResourceRuntimeSpec on creation time, for example, Ray

    The users must have iam.serviceAccounts.actAs permission on this service account and then the specified runtime containers will run as it.

    Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the service_account inside the job.

string service_account = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceAccountSpec.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ServiceAccountSpec getDefaultInstanceForType()
Returns
Type Description
ServiceAccountSpec

getDescriptorForType()

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

getEnableCustomServiceAccount()

public boolean getEnableCustomServiceAccount()

Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the Vertex AI Custom Code Service Agent.

bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

The enableCustomServiceAccount.

getServiceAccount()

public String getServiceAccount()

Optional. Required when all below conditions are met

  • enable_custom_service_account is true;
  • any runtime is specified via ResourceRuntimeSpec on creation time, for example, Ray

    The users must have iam.serviceAccounts.actAs permission on this service account and then the specified runtime containers will run as it.

    Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the service_account inside the job.

string service_account = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

Optional. Required when all below conditions are met

  • enable_custom_service_account is true;
  • any runtime is specified via ResourceRuntimeSpec on creation time, for example, Ray

    The users must have iam.serviceAccounts.actAs permission on this service account and then the specified runtime containers will run as it.

    Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the service_account inside the job.

string service_account = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for serviceAccount.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ServiceAccountSpec other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setEnableCustomServiceAccount(boolean value)

public ServiceAccountSpec.Builder setEnableCustomServiceAccount(boolean value)

Required. If true, custom user-managed service account is enforced to run any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses the Vertex AI Custom Code Service Agent.

bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value boolean

The enableCustomServiceAccount to set.

Returns
Type Description
ServiceAccountSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setServiceAccount(String value)

public ServiceAccountSpec.Builder setServiceAccount(String value)

Optional. Required when all below conditions are met

  • enable_custom_service_account is true;
  • any runtime is specified via ResourceRuntimeSpec on creation time, for example, Ray

    The users must have iam.serviceAccounts.actAs permission on this service account and then the specified runtime containers will run as it.

    Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the service_account inside the job.

string service_account = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The serviceAccount to set.

Returns
Type Description
ServiceAccountSpec.Builder

This builder for chaining.

setServiceAccountBytes(ByteString value)

public ServiceAccountSpec.Builder setServiceAccountBytes(ByteString value)

Optional. Required when all below conditions are met

  • enable_custom_service_account is true;
  • any runtime is specified via ResourceRuntimeSpec on creation time, for example, Ray

    The users must have iam.serviceAccounts.actAs permission on this service account and then the specified runtime containers will run as it.

    Do not set this field if you want to submit jobs using custom service account to this PersistentResource after creation, but only specify the service_account inside the job.

string service_account = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for serviceAccount to set.

Returns
Type Description
ServiceAccountSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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