Class SecretEnvVar.Builder

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

public static final class SecretEnvVar.Builder extends com.google.protobuf.GeneratedMessage.Builder<SecretEnvVar.Builder> implements SecretEnvVarOrBuilder
 Configuration for a secret environment variable. It has the information
 necessary to fetch the secret value from secret manager and expose it as an
 environment variable.
 
Protobuf type google.cloud.functions.v1.SecretEnvVar
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Name of the environment variable.
    Project identifier (preferably project number but can also be the project ID) of the project that contains the secret.
    Name of the secret in secret manager (not the full resource name).
    Version of the secret (version number or the string 'latest').
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    Name of the environment variable.
    com.google.protobuf.ByteString
    Name of the environment variable.
    Project identifier (preferably project number but can also be the project ID) of the project that contains the secret.
    com.google.protobuf.ByteString
    Project identifier (preferably project number but can also be the project ID) of the project that contains the secret.
    Name of the secret in secret manager (not the full resource name).
    com.google.protobuf.ByteString
    Name of the secret in secret manager (not the full resource name).
    Version of the secret (version number or the string 'latest').
    com.google.protobuf.ByteString
    Version of the secret (version number or the string 'latest').
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setKey(String value)
    Name of the environment variable.
    setKeyBytes(com.google.protobuf.ByteString value)
    Name of the environment variable.
    Project identifier (preferably project number but can also be the project ID) of the project that contains the secret.
    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.
    Name of the secret in secret manager (not the full resource name).
    setSecretBytes(com.google.protobuf.ByteString value)
    Name of the secret in secret manager (not the full resource name).
    Version of the secret (version number or the string 'latest').
    setVersionBytes(com.google.protobuf.ByteString value)
    Version of the secret (version number or the string 'latest').

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<SecretEnvVar.Builder>
    • clear

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

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

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

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

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

      public SecretEnvVar.Builder mergeFrom(SecretEnvVar other)
    • isInitialized

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

      public SecretEnvVar.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<SecretEnvVar.Builder>
      Throws:
      IOException
    • getKey

      public String getKey()
       Name of the environment variable.
       
      string key = 1;
      Specified by:
      getKey in interface SecretEnvVarOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
       Name of the environment variable.
       
      string key = 1;
      Specified by:
      getKeyBytes in interface SecretEnvVarOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public SecretEnvVar.Builder setKey(String value)
       Name of the environment variable.
       
      string key = 1;
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public SecretEnvVar.Builder clearKey()
       Name of the environment variable.
       
      string key = 1;
      Returns:
      This builder for chaining.
    • setKeyBytes

      public SecretEnvVar.Builder setKeyBytes(com.google.protobuf.ByteString value)
       Name of the environment variable.
       
      string key = 1;
      Parameters:
      value - The bytes for key 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 will be
       populated with the function's project assuming that the secret exists in
       the same project as of the function.
       
      string project_id = 2;
      Specified by:
      getProjectId in interface SecretEnvVarOrBuilder
      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 will be
       populated with the function's project assuming that the secret exists in
       the same project as of the function.
       
      string project_id = 2;
      Specified by:
      getProjectIdBytes in interface SecretEnvVarOrBuilder
      Returns:
      The bytes for projectId.
    • setProjectId

      public SecretEnvVar.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 will be
       populated with the function's project assuming that the secret exists in
       the same project as of the function.
       
      string project_id = 2;
      Parameters:
      value - The projectId to set.
      Returns:
      This builder for chaining.
    • clearProjectId

      public SecretEnvVar.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 will be
       populated with the function's project assuming that the secret exists in
       the same project as of the function.
       
      string project_id = 2;
      Returns:
      This builder for chaining.
    • setProjectIdBytes

      public SecretEnvVar.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 will be
       populated with the function's project assuming that the secret exists in
       the same project as of 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 SecretEnvVarOrBuilder
      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 SecretEnvVarOrBuilder
      Returns:
      The bytes for secret.
    • setSecret

      public SecretEnvVar.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 SecretEnvVar.Builder clearSecret()
       Name of the secret in secret manager (not the full resource name).
       
      string secret = 3;
      Returns:
      This builder for chaining.
    • setSecretBytes

      public SecretEnvVar.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.
    • getVersion

      public String getVersion()
       Version of the secret (version number or the string 'latest'). It is
       recommended to use a numeric version for secret environment variables as
       any updates to the secret value is not reflected until new instances start.
       
      string version = 4;
      Specified by:
      getVersion in interface SecretEnvVarOrBuilder
      Returns:
      The version.
    • getVersionBytes

      public com.google.protobuf.ByteString getVersionBytes()
       Version of the secret (version number or the string 'latest'). It is
       recommended to use a numeric version for secret environment variables as
       any updates to the secret value is not reflected until new instances start.
       
      string version = 4;
      Specified by:
      getVersionBytes in interface SecretEnvVarOrBuilder
      Returns:
      The bytes for version.
    • setVersion

      public SecretEnvVar.Builder setVersion(String value)
       Version of the secret (version number or the string 'latest'). It is
       recommended to use a numeric version for secret environment variables as
       any updates to the secret value is not reflected until new instances start.
       
      string version = 4;
      Parameters:
      value - The version to set.
      Returns:
      This builder for chaining.
    • clearVersion

      public SecretEnvVar.Builder clearVersion()
       Version of the secret (version number or the string 'latest'). It is
       recommended to use a numeric version for secret environment variables as
       any updates to the secret value is not reflected until new instances start.
       
      string version = 4;
      Returns:
      This builder for chaining.
    • setVersionBytes

      public SecretEnvVar.Builder setVersionBytes(com.google.protobuf.ByteString value)
       Version of the secret (version number or the string 'latest'). It is
       recommended to use a numeric version for secret environment variables as
       any updates to the secret value is not reflected until new instances start.
       
      string version = 4;
      Parameters:
      value - The bytes for version to set.
      Returns:
      This builder for chaining.