Class SecretManagerSecret.Builder (3.17.0)

public static final class SecretManagerSecret.Builder extends GeneratedMessageV3.Builder<SecretManagerSecret.Builder> implements SecretManagerSecretOrBuilder

Pairs a secret environment variable with a SecretVersion in Secret Manager.

Protobuf type google.devtools.cloudbuild.v1.SecretManagerSecret

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SecretManagerSecret build()
Returns
TypeDescription
SecretManagerSecret

buildPartial()

public SecretManagerSecret buildPartial()
Returns
TypeDescription
SecretManagerSecret

clear()

public SecretManagerSecret.Builder clear()
Returns
TypeDescription
SecretManagerSecret.Builder
Overrides

clearEnv()

public SecretManagerSecret.Builder clearEnv()

Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.

string env = 2;

Returns
TypeDescription
SecretManagerSecret.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public SecretManagerSecret.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
SecretManagerSecret.Builder
Overrides

clearVersionName()

public SecretManagerSecret.Builder clearVersionName()

Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*

string version_name = 1 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
SecretManagerSecret.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public SecretManagerSecret getDefaultInstanceForType()
Returns
TypeDescription
SecretManagerSecret

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnv()

public String getEnv()

Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.

string env = 2;

Returns
TypeDescription
String

The env.

getEnvBytes()

public ByteString getEnvBytes()

Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.

string env = 2;

Returns
TypeDescription
ByteString

The bytes for env.

getVersionName()

public String getVersionName()

Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*

string version_name = 1 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The versionName.

getVersionNameBytes()

public ByteString getVersionNameBytes()

Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*

string version_name = 1 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for versionName.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SecretManagerSecret other)

public SecretManagerSecret.Builder mergeFrom(SecretManagerSecret other)
Parameter
NameDescription
otherSecretManagerSecret
Returns
TypeDescription
SecretManagerSecret.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SecretManagerSecret.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SecretManagerSecret.Builder
Overrides

setEnv(String value)

public SecretManagerSecret.Builder setEnv(String value)

Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.

string env = 2;

Parameter
NameDescription
valueString

The env to set.

Returns
TypeDescription
SecretManagerSecret.Builder

This builder for chaining.

setEnvBytes(ByteString value)

public SecretManagerSecret.Builder setEnvBytes(ByteString value)

Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.

string env = 2;

Parameter
NameDescription
valueByteString

The bytes for env to set.

Returns
TypeDescription
SecretManagerSecret.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public SecretManagerSecret.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
SecretManagerSecret.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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

setVersionName(String value)

public SecretManagerSecret.Builder setVersionName(String value)

Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*

string version_name = 1 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The versionName to set.

Returns
TypeDescription
SecretManagerSecret.Builder

This builder for chaining.

setVersionNameBytes(ByteString value)

public SecretManagerSecret.Builder setVersionNameBytes(ByteString value)

Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*

string version_name = 1 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for versionName to set.

Returns
TypeDescription
SecretManagerSecret.Builder

This builder for chaining.