Class InlineSecret.Builder (3.18.0)

public static final class InlineSecret.Builder extends GeneratedMessageV3.Builder<InlineSecret.Builder> implements InlineSecretOrBuilder

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

Protobuf type google.devtools.cloudbuild.v1.InlineSecret

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public InlineSecret build()
Returns
TypeDescription
InlineSecret

buildPartial()

public InlineSecret buildPartial()
Returns
TypeDescription
InlineSecret

clear()

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

clearEnvMap()

public InlineSecret.Builder clearEnvMap()
Returns
TypeDescription
InlineSecret.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearKmsKeyName()

public InlineSecret.Builder clearKmsKeyName()

Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*

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

Returns
TypeDescription
InlineSecret.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

containsEnvMap(String key)

public boolean containsEnvMap(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> env_map = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public InlineSecret getDefaultInstanceForType()
Returns
TypeDescription
InlineSecret

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnvMap()

public Map<String,ByteString> getEnvMap()

Use #getEnvMapMap() instead.

Returns
TypeDescription
Map<String,ByteString>

getEnvMapCount()

public int getEnvMapCount()

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> env_map = 2;

Returns
TypeDescription
int

getEnvMapMap()

public Map<String,ByteString> getEnvMapMap()

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> env_map = 2;

Returns
TypeDescription
Map<String,ByteString>

getEnvMapOrDefault(String key, ByteString defaultValue)

public ByteString getEnvMapOrDefault(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> env_map = 2;

Parameters
NameDescription
keyString
defaultValueByteString
Returns
TypeDescription
ByteString

getEnvMapOrThrow(String key)

public ByteString getEnvMapOrThrow(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> env_map = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
ByteString

getKmsKeyName()

public String getKmsKeyName()

Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*

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

Returns
TypeDescription
String

The kmsKeyName.

getKmsKeyNameBytes()

public ByteString getKmsKeyNameBytes()

Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*

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

Returns
TypeDescription
ByteString

The bytes for kmsKeyName.

getMutableEnvMap()

public Map<String,ByteString> getMutableEnvMap()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,ByteString>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(InlineSecret other)

public InlineSecret.Builder mergeFrom(InlineSecret other)
Parameter
NameDescription
otherInlineSecret
Returns
TypeDescription
InlineSecret.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllEnvMap(Map<String,ByteString> values)

public InlineSecret.Builder putAllEnvMap(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> env_map = 2;

Parameter
NameDescription
valuesMap<String,ByteString>
Returns
TypeDescription
InlineSecret.Builder

putEnvMap(String key, ByteString value)

public InlineSecret.Builder putEnvMap(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> env_map = 2;

Parameters
NameDescription
keyString
valueByteString
Returns
TypeDescription
InlineSecret.Builder

removeEnvMap(String key)

public InlineSecret.Builder removeEnvMap(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> env_map = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
InlineSecret.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setKmsKeyName(String value)

public InlineSecret.Builder setKmsKeyName(String value)

Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*

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

Parameter
NameDescription
valueString

The kmsKeyName to set.

Returns
TypeDescription
InlineSecret.Builder

This builder for chaining.

setKmsKeyNameBytes(ByteString value)

public InlineSecret.Builder setKmsKeyNameBytes(ByteString value)

Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*

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

Parameter
NameDescription
valueByteString

The bytes for kmsKeyName to set.

Returns
TypeDescription
InlineSecret.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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