Class StringValue.Builder (0.3.0)

public static final class StringValue.Builder extends GeneratedMessage.Builder<StringValue.Builder> implements StringValueOrBuilder

StringValue represents a property that has a string value type.

Protobuf type google.cloud.apptopology.v1.StringValue

Static Methods

getDescriptor()

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

Methods

addAllAllowedValues(Iterable<String> values)

public StringValue.Builder addAllAllowedValues(Iterable<String> values)

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Parameter
Name Description
values Iterable<String>

The allowedValues to add.

Returns
Type Description
StringValue.Builder

This builder for chaining.

addAllowedValues(String value)

public StringValue.Builder addAllowedValues(String value)

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Parameter
Name Description
value String

The allowedValues to add.

Returns
Type Description
StringValue.Builder

This builder for chaining.

addAllowedValuesBytes(ByteString value)

public StringValue.Builder addAllowedValuesBytes(ByteString value)

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Parameter
Name Description
value ByteString

The bytes of the allowedValues to add.

Returns
Type Description
StringValue.Builder

This builder for chaining.

build()

public StringValue build()
Returns
Type Description
StringValue

buildPartial()

public StringValue buildPartial()
Returns
Type Description
StringValue

clear()

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

clearAllowedValues()

public StringValue.Builder clearAllowedValues()

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Returns
Type Description
StringValue.Builder

This builder for chaining.

clearRepeated()

public StringValue.Builder clearRepeated()

OPTIONAL Whether the property is repeated.

bool repeated = 1;

Returns
Type Description
StringValue.Builder

This builder for chaining.

getAllowedValues(int index)

public String getAllowedValues(int index)

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedValues at the given index.

getAllowedValuesBytes(int index)

public ByteString getAllowedValuesBytes(int index)

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedValues at the given index.

getAllowedValuesCount()

public int getAllowedValuesCount()

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Returns
Type Description
int

The count of allowedValues.

getAllowedValuesList()

public ProtocolStringList getAllowedValuesList()

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Returns
Type Description
ProtocolStringList

A list containing the allowedValues.

getDefaultInstanceForType()

public StringValue getDefaultInstanceForType()
Returns
Type Description
StringValue

getDescriptorForType()

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

getRepeated()

public boolean getRepeated()

OPTIONAL Whether the property is repeated.

bool repeated = 1;

Returns
Type Description
boolean

The repeated.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(StringValue other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setAllowedValues(int index, String value)

public StringValue.Builder setAllowedValues(int index, String value)

OPTIONAL Allowed values for the property. If provided, the property value must be one of the allowed values.

repeated string allowed_values = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The allowedValues to set.

Returns
Type Description
StringValue.Builder

This builder for chaining.

setRepeated(boolean value)

public StringValue.Builder setRepeated(boolean value)

OPTIONAL Whether the property is repeated.

bool repeated = 1;

Parameter
Name Description
value boolean

The repeated to set.

Returns
Type Description
StringValue.Builder

This builder for chaining.