Class Secret.Builder (0.15.0)

public static final class Secret.Builder extends GeneratedMessageV3.Builder<Secret.Builder> implements SecretOrBuilder

Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value.

Protobuf type google.events.cloud.cloudbuild.v1.Secret

Implements

SecretOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Secret.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Secret.Builder
Overrides

build()

public Secret build()
Returns
Type Description
Secret

buildPartial()

public Secret buildPartial()
Returns
Type Description
Secret

clear()

public Secret.Builder clear()
Returns
Type Description
Secret.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Secret.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Secret.Builder
Overrides

clearKmsKeyName()

public Secret.Builder clearKmsKeyName()

Cloud KMS key name to use to decrypt these envs.

string kms_key_name = 1;

Returns
Type Description
Secret.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Secret.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Secret.Builder
Overrides

clearSecretEnv()

public Secret.Builder clearSecretEnv()
Returns
Type Description
Secret.Builder

clone()

public Secret.Builder clone()
Returns
Type Description
Secret.Builder
Overrides

containsSecretEnv(String key)

public boolean containsSecretEnv(String key)

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public Secret getDefaultInstanceForType()
Returns
Type Description
Secret

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKmsKeyName()

public String getKmsKeyName()

Cloud KMS key name to use to decrypt these envs.

string kms_key_name = 1;

Returns
Type Description
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Cloud KMS key name to use to decrypt these envs.

string kms_key_name = 1;

Returns
Type Description
ByteString

The bytes for kmsKeyName.

getMutableSecretEnv()

public Map<String,ByteString> getMutableSecretEnv()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,ByteString>

getSecretEnv()

public Map<String,ByteString> getSecretEnv()

Use #getSecretEnvMap() instead.

Returns
Type Description
Map<String,ByteString>

getSecretEnvCount()

public int getSecretEnvCount()

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Returns
Type Description
int

getSecretEnvMap()

public Map<String,ByteString> getSecretEnvMap()

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Returns
Type Description
Map<String,ByteString>

getSecretEnvOrDefault(String key, ByteString defaultValue)

public ByteString getSecretEnvOrDefault(String key, ByteString defaultValue)

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Parameters
Name Description
key String
defaultValue ByteString
Returns
Type Description
ByteString

getSecretEnvOrThrow(String key)

public ByteString getSecretEnvOrThrow(String key)

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Parameter
Name Description
key String
Returns
Type Description
ByteString

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Secret other)

public Secret.Builder mergeFrom(Secret other)
Parameter
Name Description
other Secret
Returns
Type Description
Secret.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Secret.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Secret.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Secret.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Secret.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Secret.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Secret.Builder
Overrides

putAllSecretEnv(Map<String,ByteString> values)

public Secret.Builder putAllSecretEnv(Map<String,ByteString> values)

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Parameter
Name Description
values Map<String,ByteString>
Returns
Type Description
Secret.Builder

putSecretEnv(String key, ByteString value)

public Secret.Builder putSecretEnv(String key, ByteString value)

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Parameters
Name Description
key String
value ByteString
Returns
Type Description
Secret.Builder

removeSecretEnv(String key)

public Secret.Builder removeSecretEnv(String key)

Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.

map<string, bytes> secret_env = 3;

Parameter
Name Description
key String
Returns
Type Description
Secret.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Secret.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Secret.Builder
Overrides

setKmsKeyName(String value)

public Secret.Builder setKmsKeyName(String value)

Cloud KMS key name to use to decrypt these envs.

string kms_key_name = 1;

Parameter
Name Description
value String

The kmsKeyName to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public Secret.Builder setKmsKeyNameBytes(ByteString value)

Cloud KMS key name to use to decrypt these envs.

string kms_key_name = 1;

Parameter
Name Description
value ByteString

The bytes for kmsKeyName to set.

Returns
Type Description
Secret.Builder

This builder for chaining.

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

public Secret.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Secret.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Secret.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Secret.Builder
Overrides