Class ServiceAccountSpec.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ServiceAccountSpec.Builder>
com.google.cloud.aiplatform.v1.ServiceAccountSpec.Builder
All Implemented Interfaces:
ServiceAccountSpecOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ServiceAccountSpec

public static final class ServiceAccountSpec.Builder extends com.google.protobuf.GeneratedMessage.Builder<ServiceAccountSpec.Builder> implements ServiceAccountSpecOrBuilder
 Configuration for the use of custom service account to run the workloads.
 
Protobuf type google.cloud.aiplatform.v1.ServiceAccountSpec
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ServiceAccountSpec.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ServiceAccountSpec.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ServiceAccountSpec.Builder>
    • getDefaultInstanceForType

      public ServiceAccountSpec getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ServiceAccountSpec build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ServiceAccountSpec buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ServiceAccountSpec.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ServiceAccountSpec.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ServiceAccountSpec.Builder>
    • mergeFrom

      public ServiceAccountSpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ServiceAccountSpec.Builder>
      Throws:
      IOException
    • 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](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
       
      bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEnableCustomServiceAccount in interface ServiceAccountSpecOrBuilder
      Returns:
      The enableCustomServiceAccount.
    • setEnableCustomServiceAccount

      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](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
       
      bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enableCustomServiceAccount to set.
      Returns:
      This builder for chaining.
    • 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](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).
       
      bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getServiceAccount in interface ServiceAccountSpecOrBuilder
      Returns:
      The serviceAccount.
    • getServiceAccountBytes

      public com.google.protobuf.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];
      Specified by:
      getServiceAccountBytes in interface ServiceAccountSpecOrBuilder
      Returns:
      The bytes for serviceAccount.
    • setServiceAccount

      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];
      Parameters:
      value - The serviceAccount to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setServiceAccountBytes

      public ServiceAccountSpec.Builder setServiceAccountBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for serviceAccount to set.
      Returns:
      This builder for chaining.