Class ServiceAccountSpec.Builder (3.42.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. Default service account that this PersistentResource's workloads run as. The workloads include:

  • Any runtime specified via ResourceRuntimeSpec on creation time, for example, Ray.
  • Jobs submitted to PersistentResource, if no other service account specified in the job specs.

    Only works when custom service account is enabled and users have the iam.serviceAccounts.actAs permission on this service account.

    Required if any containers are specified in ResourceRuntimeSpec.

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. Default service account that this PersistentResource's workloads run as. The workloads include:

  • Any runtime specified via ResourceRuntimeSpec on creation time, for example, Ray.
  • Jobs submitted to PersistentResource, if no other service account specified in the job specs.

    Only works when custom service account is enabled and users have the iam.serviceAccounts.actAs permission on this service account.

    Required if any containers are specified in ResourceRuntimeSpec.

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

Returns
Type Description
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

Optional. Default service account that this PersistentResource's workloads run as. The workloads include:

  • Any runtime specified via ResourceRuntimeSpec on creation time, for example, Ray.
  • Jobs submitted to PersistentResource, if no other service account specified in the job specs.

    Only works when custom service account is enabled and users have the iam.serviceAccounts.actAs permission on this service account.

    Required if any containers are specified in ResourceRuntimeSpec.

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. Default service account that this PersistentResource's workloads run as. The workloads include:

  • Any runtime specified via ResourceRuntimeSpec on creation time, for example, Ray.
  • Jobs submitted to PersistentResource, if no other service account specified in the job specs.

    Only works when custom service account is enabled and users have the iam.serviceAccounts.actAs permission on this service account.

    Required if any containers are specified in ResourceRuntimeSpec.

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. Default service account that this PersistentResource's workloads run as. The workloads include:

  • Any runtime specified via ResourceRuntimeSpec on creation time, for example, Ray.
  • Jobs submitted to PersistentResource, if no other service account specified in the job specs.

    Only works when custom service account is enabled and users have the iam.serviceAccounts.actAs permission on this service account.

    Required if any containers are specified in ResourceRuntimeSpec.

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