Google Cloud Optimization V1 Client - Class FieldReference (0.4.0)

Reference documentation and code samples for the Google Cloud Optimization V1 Client class FieldReference.

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:

name: "vehicles" index: 5 sub_field { name: "end_time_windows" index: 2 }

We however omit top-level entities such as OptimizeToursRequest or ShipmentModel to avoid crowding the message.

Generated from protobuf message google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference

Namespace

Google \ Cloud \ Optimization \ V1 \ OptimizeToursValidationError

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

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

↳ index int

Index of the field if repeated.

↳ key string

Key if the field is a map.

↳ sub_field Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference

Recursively nested sub-field, if needed.

getName

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

Returns
TypeDescription
string

setName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getIndex

Index of the field if repeated.

Returns
TypeDescription
int

hasIndex

setIndex

Index of the field if repeated.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getKey

Key if the field is a map.

Returns
TypeDescription
string

hasKey

setKey

Key if the field is a map.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSubField

Recursively nested sub-field, if needed.

Returns
TypeDescription
Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference|null

hasSubField

clearSubField

setSubField

Recursively nested sub-field, if needed.

Parameter
NameDescription
var Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference
Returns
TypeDescription
$this

getIndexOrKey

Returns
TypeDescription
string