Class SecretVolume.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SecretVolume.Builder>
com.google.cloud.functions.v2.SecretVolume.Builder
All Implemented Interfaces:
SecretVolumeOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SecretVolume

public static final class SecretVolume.Builder extends com.google.protobuf.GeneratedMessage.Builder<SecretVolume.Builder> implements SecretVolumeOrBuilder
 Configuration for a secret volume. It has the information necessary to fetch
 the secret value from secret manager and make it available as files mounted
 at the requested paths within the application container.
 
Protobuf type google.cloud.functions.v2.SecretVolume
  • 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<SecretVolume.Builder>
    • clear

      public SecretVolume.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<SecretVolume.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<SecretVolume.Builder>
    • getDefaultInstanceForType

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

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

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

      public SecretVolume.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<SecretVolume.Builder>
    • mergeFrom

      public SecretVolume.Builder mergeFrom(SecretVolume other)
    • isInitialized

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

      public SecretVolume.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<SecretVolume.Builder>
      Throws:
      IOException
    • getMountPath

      public String getMountPath()
       The path within the container to mount the secret volume. For example,
       setting the mount_path as `/etc/secrets` would mount the secret value files
       under the `/etc/secrets` directory. This directory will also be completely
       shadowed and unavailable to mount any other secrets.
       Recommended mount path: /etc/secrets
       
      string mount_path = 1;
      Specified by:
      getMountPath in interface SecretVolumeOrBuilder
      Returns:
      The mountPath.
    • getMountPathBytes

      public com.google.protobuf.ByteString getMountPathBytes()
       The path within the container to mount the secret volume. For example,
       setting the mount_path as `/etc/secrets` would mount the secret value files
       under the `/etc/secrets` directory. This directory will also be completely
       shadowed and unavailable to mount any other secrets.
       Recommended mount path: /etc/secrets
       
      string mount_path = 1;
      Specified by:
      getMountPathBytes in interface SecretVolumeOrBuilder
      Returns:
      The bytes for mountPath.
    • setMountPath

      public SecretVolume.Builder setMountPath(String value)
       The path within the container to mount the secret volume. For example,
       setting the mount_path as `/etc/secrets` would mount the secret value files
       under the `/etc/secrets` directory. This directory will also be completely
       shadowed and unavailable to mount any other secrets.
       Recommended mount path: /etc/secrets
       
      string mount_path = 1;
      Parameters:
      value - The mountPath to set.
      Returns:
      This builder for chaining.
    • clearMountPath

      public SecretVolume.Builder clearMountPath()
       The path within the container to mount the secret volume. For example,
       setting the mount_path as `/etc/secrets` would mount the secret value files
       under the `/etc/secrets` directory. This directory will also be completely
       shadowed and unavailable to mount any other secrets.
       Recommended mount path: /etc/secrets
       
      string mount_path = 1;
      Returns:
      This builder for chaining.
    • setMountPathBytes

      public SecretVolume.Builder setMountPathBytes(com.google.protobuf.ByteString value)
       The path within the container to mount the secret volume. For example,
       setting the mount_path as `/etc/secrets` would mount the secret value files
       under the `/etc/secrets` directory. This directory will also be completely
       shadowed and unavailable to mount any other secrets.
       Recommended mount path: /etc/secrets
       
      string mount_path = 1;
      Parameters:
      value - The bytes for mountPath to set.
      Returns:
      This builder for chaining.
    • getProjectId

      public String getProjectId()
       Project identifier (preferably project number but can also be the project
       ID) of the project that contains the secret. If not set, it is
       assumed that the secret is in the same project as the function.
       
      string project_id = 2;
      Specified by:
      getProjectId in interface SecretVolumeOrBuilder
      Returns:
      The projectId.
    • getProjectIdBytes

      public com.google.protobuf.ByteString getProjectIdBytes()
       Project identifier (preferably project number but can also be the project
       ID) of the project that contains the secret. If not set, it is
       assumed that the secret is in the same project as the function.
       
      string project_id = 2;
      Specified by:
      getProjectIdBytes in interface SecretVolumeOrBuilder
      Returns:
      The bytes for projectId.
    • setProjectId

      public SecretVolume.Builder setProjectId(String value)
       Project identifier (preferably project number but can also be the project
       ID) of the project that contains the secret. If not set, it is
       assumed that the secret is in the same project as the function.
       
      string project_id = 2;
      Parameters:
      value - The projectId to set.
      Returns:
      This builder for chaining.
    • clearProjectId

      public SecretVolume.Builder clearProjectId()
       Project identifier (preferably project number but can also be the project
       ID) of the project that contains the secret. If not set, it is
       assumed that the secret is in the same project as the function.
       
      string project_id = 2;
      Returns:
      This builder for chaining.
    • setProjectIdBytes

      public SecretVolume.Builder setProjectIdBytes(com.google.protobuf.ByteString value)
       Project identifier (preferably project number but can also be the project
       ID) of the project that contains the secret. If not set, it is
       assumed that the secret is in the same project as the function.
       
      string project_id = 2;
      Parameters:
      value - The bytes for projectId to set.
      Returns:
      This builder for chaining.
    • getSecret

      public String getSecret()
       Name of the secret in secret manager (not the full resource name).
       
      string secret = 3;
      Specified by:
      getSecret in interface SecretVolumeOrBuilder
      Returns:
      The secret.
    • getSecretBytes

      public com.google.protobuf.ByteString getSecretBytes()
       Name of the secret in secret manager (not the full resource name).
       
      string secret = 3;
      Specified by:
      getSecretBytes in interface SecretVolumeOrBuilder
      Returns:
      The bytes for secret.
    • setSecret

      public SecretVolume.Builder setSecret(String value)
       Name of the secret in secret manager (not the full resource name).
       
      string secret = 3;
      Parameters:
      value - The secret to set.
      Returns:
      This builder for chaining.
    • clearSecret

      public SecretVolume.Builder clearSecret()
       Name of the secret in secret manager (not the full resource name).
       
      string secret = 3;
      Returns:
      This builder for chaining.
    • setSecretBytes

      public SecretVolume.Builder setSecretBytes(com.google.protobuf.ByteString value)
       Name of the secret in secret manager (not the full resource name).
       
      string secret = 3;
      Parameters:
      value - The bytes for secret to set.
      Returns:
      This builder for chaining.
    • getVersionsList

      public List<SecretVolume.SecretVersion> getVersionsList()
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
      Specified by:
      getVersionsList in interface SecretVolumeOrBuilder
    • getVersionsCount

      public int getVersionsCount()
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
      Specified by:
      getVersionsCount in interface SecretVolumeOrBuilder
    • getVersions

      public SecretVolume.SecretVersion getVersions(int index)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
      Specified by:
      getVersions in interface SecretVolumeOrBuilder
    • setVersions

      public SecretVolume.Builder setVersions(int index, SecretVolume.SecretVersion value)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • setVersions

      public SecretVolume.Builder setVersions(int index, SecretVolume.SecretVersion.Builder builderForValue)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • addVersions

       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • addVersions

      public SecretVolume.Builder addVersions(int index, SecretVolume.SecretVersion value)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • addVersions

      public SecretVolume.Builder addVersions(SecretVolume.SecretVersion.Builder builderForValue)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • addVersions

      public SecretVolume.Builder addVersions(int index, SecretVolume.SecretVersion.Builder builderForValue)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • addAllVersions

      public SecretVolume.Builder addAllVersions(Iterable<? extends SecretVolume.SecretVersion> values)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • clearVersions

      public SecretVolume.Builder clearVersions()
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • removeVersions

      public SecretVolume.Builder removeVersions(int index)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • getVersionsBuilder

      public SecretVolume.SecretVersion.Builder getVersionsBuilder(int index)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • getVersionsOrBuilder

      public SecretVolume.SecretVersionOrBuilder getVersionsOrBuilder(int index)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
      Specified by:
      getVersionsOrBuilder in interface SecretVolumeOrBuilder
    • getVersionsOrBuilderList

      public List<? extends SecretVolume.SecretVersionOrBuilder> getVersionsOrBuilderList()
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
      Specified by:
      getVersionsOrBuilderList in interface SecretVolumeOrBuilder
    • addVersionsBuilder

      public SecretVolume.SecretVersion.Builder addVersionsBuilder()
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • addVersionsBuilder

      public SecretVolume.SecretVersion.Builder addVersionsBuilder(int index)
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;
    • getVersionsBuilderList

      public List<SecretVolume.SecretVersion.Builder> getVersionsBuilderList()
       List of secret versions to mount for this secret. If empty, the `latest`
       version of the secret will be made available in a file named after the
       secret under the mount point.
       
      repeated .google.cloud.functions.v2.SecretVolume.SecretVersion versions = 4;