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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Optimization V1 Client - Class FieldReference (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursValidationError.FieldReference)\n- [1.0.4](/php/docs/reference/cloud-optimization/1.0.4/V1.OptimizeToursValidationError.FieldReference)\n- [0.7.0](/php/docs/reference/cloud-optimization/0.7.0/V1.OptimizeToursValidationError.FieldReference)\n- [0.6.5](/php/docs/reference/cloud-optimization/0.6.5/V1.OptimizeToursValidationError.FieldReference)\n- [0.5.1](/php/docs/reference/cloud-optimization/0.5.1/V1.OptimizeToursValidationError.FieldReference)\n- [0.4.0](/php/docs/reference/cloud-optimization/0.4.0/V1.OptimizeToursValidationError.FieldReference)\n- [0.3.4](/php/docs/reference/cloud-optimization/0.3.4/V1.OptimizeToursValidationError.FieldReference)\n- [0.2.0](/php/docs/reference/cloud-optimization/0.2.0/V1.OptimizeToursValidationError.FieldReference)\n- [0.1.9](/php/docs/reference/cloud-optimization/0.1.9/V1.OptimizeToursValidationError.FieldReference) \nReference documentation and code samples for the Google Cloud Optimization V1 Client class FieldReference.\n\nSpecifies a context for the validation error. A `FieldReference` always\nrefers to a given field in this file and follows the same hierarchical\nstructure. For example, we may specify element #2 of `start_time_windows`\nof vehicle #5 using: \n\n name: \"vehicles\" index: 5 sub_field { name: \"end_time_windows\" index: 2 }\n\nWe however omit top-level entities such as `OptimizeToursRequest` or\n`ShipmentModel` to avoid crowding the message.\n\nGenerated from protobuf message `google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Optimization \\\\ V1 \\\\ OptimizeToursValidationError\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nName of the field, e.g., \"vehicles\".\n\n### setName\n\nName of the field, e.g., \"vehicles\".\n\n### getIndex\n\nIndex of the field if repeated.\n\n### hasIndex\n\n### setIndex\n\nIndex of the field if repeated.\n\n### getKey\n\nKey if the field is a map.\n\n### hasKey\n\n### setKey\n\nKey if the field is a map.\n\n### getSubField\n\nRecursively nested sub-field, if needed.\n\n### hasSubField\n\n### clearSubField\n\n### setSubField\n\nRecursively nested sub-field, if needed.\n\n### getIndexOrKey"]]