Class OptimizeToursValidationError.FieldReference.Builder (1.10.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public OptimizeToursValidationError.FieldReference build()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference

buildPartial()

public OptimizeToursValidationError.FieldReference buildPartial()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference

clear()

public OptimizeToursValidationError.FieldReference.Builder clear()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearIndex()

public OptimizeToursValidationError.FieldReference.Builder clearIndex()

Index of the field if repeated.

int32 index = 2;

Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

clearIndexOrKey()

public OptimizeToursValidationError.FieldReference.Builder clearIndexOrKey()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

clearKey()

public OptimizeToursValidationError.FieldReference.Builder clearKey()

Key if the field is a map.

string key = 4;

Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

clearName()

public OptimizeToursValidationError.FieldReference.Builder clearName()

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

string name = 1;

Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public OptimizeToursValidationError.FieldReference.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

clone()

public OptimizeToursValidationError.FieldReference.Builder clone()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder
Overrides

getDefaultInstanceForType()

public OptimizeToursValidationError.FieldReference getDefaultInstanceForType()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIndex()

public int getIndex()

Index of the field if repeated.

int32 index = 2;

Returns
TypeDescription
int

The index.

getIndexOrKeyCase()

public OptimizeToursValidationError.FieldReference.IndexOrKeyCase getIndexOrKeyCase()
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.IndexOrKeyCase

getKey()

public String getKey()

Key if the field is a map.

string key = 4;

Returns
TypeDescription
String

The key.

getKeyBytes()

public ByteString getKeyBytes()

Key if the field is a map.

string key = 4;

Returns
TypeDescription
ByteString

The bytes for key.

getName()

public String getName()

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

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

getSubFieldOrBuilder()

public OptimizeToursValidationError.FieldReferenceOrBuilder getSubFieldOrBuilder()

Recursively nested sub-field, if needed.

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

Returns
TypeDescription
OptimizeToursValidationError.FieldReferenceOrBuilder

hasIndex()

public boolean hasIndex()

Index of the field if repeated.

int32 index = 2;

Returns
TypeDescription
boolean

Whether the index field is set.

hasKey()

public boolean hasKey()

Key if the field is a map.

string key = 4;

Returns
TypeDescription
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
TypeDescription
boolean

Whether the subField field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(OptimizeToursValidationError.FieldReference other)

public OptimizeToursValidationError.FieldReference.Builder mergeFrom(OptimizeToursValidationError.FieldReference other)
Parameter
NameDescription
otherOptimizeToursValidationError.FieldReference
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public OptimizeToursValidationError.FieldReference.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueOptimizeToursValidationError.FieldReference
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setIndex(int value)

public OptimizeToursValidationError.FieldReference.Builder setIndex(int value)

Index of the field if repeated.

int32 index = 2;

Parameter
NameDescription
valueint

The index to set.

Returns
TypeDescription
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
NameDescription
valueString

The key to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for key to set.

Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueOptimizeToursValidationError.FieldReference
Returns
TypeDescription
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
NameDescription
builderForValueOptimizeToursValidationError.FieldReference.Builder
Returns
TypeDescription
OptimizeToursValidationError.FieldReference.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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