Class EnvVar.Builder (0.72.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 0.72.0keyboard_arrow_down
public static final class EnvVar . Builder extends GeneratedMessageV3 . Builder<EnvVar . Builder > implements EnvVarOrBuilder
EnvVar represents an environment variable present in a Container.
Protobuf type google.cloud.run.v2.EnvVar
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public EnvVar . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Overrides
build()
Returns
Type
Description
EnvVar
buildPartial()
public EnvVar buildPartial ()
Returns
Type
Description
EnvVar
clear()
public EnvVar . Builder clear ()
Overrides
clearField(Descriptors.FieldDescriptor field)
public EnvVar . Builder clearField ( Descriptors . FieldDescriptor field )
Overrides
clearName()
public EnvVar . Builder clearName ()
Required. Name of the environment variable. Must not exceed 32768
characters.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
clearOneof(Descriptors.OneofDescriptor oneof)
public EnvVar . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Overrides
clearValue()
public EnvVar . Builder clearValue ()
Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
string value = 2;
clearValueSource()
public EnvVar . Builder clearValueSource ()
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
clearValues()
public EnvVar . Builder clearValues ()
clone()
public EnvVar . Builder clone ()
Overrides
getDefaultInstanceForType()
public EnvVar getDefaultInstanceForType ()
Returns
Type
Description
EnvVar
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getName()
Required. Name of the environment variable. Must not exceed 32768
characters.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
String
The name.
getNameBytes()
public ByteString getNameBytes ()
Required. Name of the environment variable. Must not exceed 32768
characters.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Returns
Type
Description
ByteString
The bytes for name.
getValue()
Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
string value = 2;
Returns
Type
Description
String
The value.
getValueBytes()
public ByteString getValueBytes ()
Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
string value = 2;
Returns
Type
Description
ByteString
The bytes for value.
getValueSource()
public EnvVarSource getValueSource ()
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
getValueSourceBuilder()
public EnvVarSource . Builder getValueSourceBuilder ()
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
getValueSourceOrBuilder()
public EnvVarSourceOrBuilder getValueSourceOrBuilder ()
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
getValuesCase()
public EnvVar . ValuesCase getValuesCase ()
hasValue()
public boolean hasValue ()
Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
string value = 2;
Returns
Type
Description
boolean
Whether the value field is set.
hasValueSource()
public boolean hasValueSource ()
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
Returns
Type
Description
boolean
Whether the valueSource field is set.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
mergeFrom(EnvVar other)
public EnvVar . Builder mergeFrom ( EnvVar other )
Parameter
Name
Description
other
EnvVar
public EnvVar . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public EnvVar . Builder mergeFrom ( Message other )
Parameter
Name
Description
other
Message
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final EnvVar . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Overrides
mergeValueSource(EnvVarSource value)
public EnvVar . Builder mergeValueSource ( EnvVarSource value )
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
setField(Descriptors.FieldDescriptor field, Object value)
public EnvVar . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Overrides
setName(String value)
public EnvVar . Builder setName ( String value )
Required. Name of the environment variable. Must not exceed 32768
characters.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Parameter
Name
Description
value
String
The name to set.
setNameBytes(ByteString value)
public EnvVar . Builder setNameBytes ( ByteString value )
Required. Name of the environment variable. Must not exceed 32768
characters.
string name = 1 [(.google.api.field_behavior) = REQUIRED];
Parameter
Name
Description
value
ByteString
The bytes for name to set.
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public EnvVar . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final EnvVar . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Overrides
setValue(String value)
public EnvVar . Builder setValue ( String value )
Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
string value = 2;
Parameter
Name
Description
value
String
The value to set.
setValueBytes(ByteString value)
public EnvVar . Builder setValueBytes ( ByteString value )
Literal value of the environment variable.
Defaults to "", and the maximum length is 32768 bytes.
Variable references are not supported in Cloud Run.
string value = 2;
Parameter
Name
Description
value
ByteString
The bytes for value to set.
setValueSource(EnvVarSource value)
public EnvVar . Builder setValueSource ( EnvVarSource value )
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
setValueSource(EnvVarSource.Builder builderForValue)
public EnvVar . Builder setValueSource ( EnvVarSource . Builder builderForValue )
Source for the environment variable's value.
.google.cloud.run.v2.EnvVarSource value_source = 3;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]