Class ServiceAccountSpec.Builder (3.36.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ServiceAccountSpec.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides

build()

public ServiceAccountSpec build()
Returns
TypeDescription
ServiceAccountSpec

buildPartial()

public ServiceAccountSpec buildPartial()
Returns
TypeDescription
ServiceAccountSpec

clear()

public ServiceAccountSpec.Builder clear()
Returns
TypeDescription
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
TypeDescription
ServiceAccountSpec.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ServiceAccountSpec.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public ServiceAccountSpec.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
ServiceAccountSpec.Builder

This builder for chaining.

clone()

public ServiceAccountSpec.Builder clone()
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides

getDefaultInstanceForType()

public ServiceAccountSpec getDefaultInstanceForType()
Returns
TypeDescription
ServiceAccountSpec

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for serviceAccount.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ServiceAccountSpec other)

public ServiceAccountSpec.Builder mergeFrom(ServiceAccountSpec other)
Parameter
NameDescription
otherServiceAccountSpec
Returns
TypeDescription
ServiceAccountSpec.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServiceAccountSpec.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ServiceAccountSpec.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ServiceAccountSpec.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueboolean

The enableCustomServiceAccount to set.

Returns
TypeDescription
ServiceAccountSpec.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ServiceAccountSpec.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides

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

public ServiceAccountSpec.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The serviceAccount to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for serviceAccount to set.

Returns
TypeDescription
ServiceAccountSpec.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final ServiceAccountSpec.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServiceAccountSpec.Builder
Overrides