Class OptimizeToursValidationError.FieldReference.Builder (1.50.0)

public static final class OptimizeToursValidationError.FieldReference.Builder extends GeneratedMessageV3.Builder<OptimizeToursValidationError.FieldReference.Builder> implements OptimizeToursValidationError.FieldReferenceOrBuilder

Specifies a context for the validation error. A FieldReference always refers to a given field in this file and follows the same hierarchical structure. For example, we may specify element #2 of start_time_windows of vehicle #5 using: <code><code> name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 } </code></code><code> We however omit top-level entities such as </code>OptimizeToursRequest<code> or </code>ShipmentModel to avoid crowding the message.

Protobuf type google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OptimizeToursValidationError.FieldReference build()
Returns
Type Description
OptimizeToursValidationError.FieldReference

buildPartial()

public OptimizeToursValidationError.FieldReference buildPartial()
Returns
Type Description
OptimizeToursValidationError.FieldReference

clear()

public OptimizeToursValidationError.FieldReference.Builder clear()
Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearIndex()

public OptimizeToursValidationError.FieldReference.Builder clearIndex()

Index of the field if repeated.

int32 index = 2;

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

clearIndexOrKey()

public OptimizeToursValidationError.FieldReference.Builder clearIndexOrKey()
Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

clearKey()

public OptimizeToursValidationError.FieldReference.Builder clearKey()

Key if the field is a map.

string key = 4;

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

clearName()

public OptimizeToursValidationError.FieldReference.Builder clearName()

Name of the field, e.g., "vehicles".

string name = 1;

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSubField()

public OptimizeToursValidationError.FieldReference.Builder clearSubField()

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

clone()

public OptimizeToursValidationError.FieldReference.Builder clone()
Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder
Overrides

getDefaultInstanceForType()

public OptimizeToursValidationError.FieldReference getDefaultInstanceForType()
Returns
Type Description
OptimizeToursValidationError.FieldReference

getDescriptorForType()

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

getIndex()

public int getIndex()

Index of the field if repeated.

int32 index = 2;

Returns
Type Description
int

The index.

getIndexOrKeyCase()

public OptimizeToursValidationError.FieldReference.IndexOrKeyCase getIndexOrKeyCase()
Returns
Type Description
OptimizeToursValidationError.FieldReference.IndexOrKeyCase

getKey()

public String getKey()

Key if the field is a map.

string key = 4;

Returns
Type Description
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Key if the field is a map.

string key = 4;

Returns
Type Description
ByteString

The bytes for key.

getName()

public String getName()

Name of the field, e.g., "vehicles".

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the field, e.g., "vehicles".

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getSubField()

public OptimizeToursValidationError.FieldReference getSubField()

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Returns
Type Description
OptimizeToursValidationError.FieldReference

The subField.

getSubFieldBuilder()

public OptimizeToursValidationError.FieldReference.Builder getSubFieldBuilder()

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

getSubFieldOrBuilder()

public OptimizeToursValidationError.FieldReferenceOrBuilder getSubFieldOrBuilder()

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Returns
Type Description
OptimizeToursValidationError.FieldReferenceOrBuilder

hasIndex()

public boolean hasIndex()

Index of the field if repeated.

int32 index = 2;

Returns
Type Description
boolean

Whether the index field is set.

hasKey()

public boolean hasKey()

Key if the field is a map.

string key = 4;

Returns
Type Description
boolean

Whether the key field is set.

hasSubField()

public boolean hasSubField()

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Returns
Type Description
boolean

Whether the subField field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(OptimizeToursValidationError.FieldReference other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSubField(OptimizeToursValidationError.FieldReference value)

public OptimizeToursValidationError.FieldReference.Builder mergeSubField(OptimizeToursValidationError.FieldReference value)

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Parameter
Name Description
value OptimizeToursValidationError.FieldReference
Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setIndex(int value)

public OptimizeToursValidationError.FieldReference.Builder setIndex(int value)

Index of the field if repeated.

int32 index = 2;

Parameter
Name Description
value int

The index to set.

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

setKey(String value)

public OptimizeToursValidationError.FieldReference.Builder setKey(String value)

Key if the field is a map.

string key = 4;

Parameter
Name Description
value String

The key to set.

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

setKeyBytes(ByteString value)

public OptimizeToursValidationError.FieldReference.Builder setKeyBytes(ByteString value)

Key if the field is a map.

string key = 4;

Parameter
Name Description
value ByteString

The bytes for key to set.

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

setName(String value)

public OptimizeToursValidationError.FieldReference.Builder setName(String value)

Name of the field, e.g., "vehicles".

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

setNameBytes(ByteString value)

public OptimizeToursValidationError.FieldReference.Builder setNameBytes(ByteString value)

Name of the field, e.g., "vehicles".

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

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

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

setSubField(OptimizeToursValidationError.FieldReference value)

public OptimizeToursValidationError.FieldReference.Builder setSubField(OptimizeToursValidationError.FieldReference value)

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Parameter
Name Description
value OptimizeToursValidationError.FieldReference
Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

setSubField(OptimizeToursValidationError.FieldReference.Builder builderForValue)

public OptimizeToursValidationError.FieldReference.Builder setSubField(OptimizeToursValidationError.FieldReference.Builder builderForValue)

Recursively nested sub-field, if needed.

.google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3;

Parameter
Name Description
builderForValue OptimizeToursValidationError.FieldReference.Builder
Returns
Type Description
OptimizeToursValidationError.FieldReference.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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