Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::OptimizeToursValidationError::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.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#index
defindex()->::Integer
Returns
(::Integer) — Index of the field if repeated.
Note: The following fields are mutually exclusive: index, key. If a field in that set is populated, all other fields in the set will automatically be cleared.
#index=
defindex=(value)->::Integer
Parameter
value (::Integer) — Index of the field if repeated.
Note: The following fields are mutually exclusive: index, key. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::Integer) — Index of the field if repeated.
Note: The following fields are mutually exclusive: index, key. If a field in that set is populated, all other fields in the set will automatically be cleared.
#key
defkey()->::String
Returns
(::String) — Key if the field is a map.
Note: The following fields are mutually exclusive: key, index. If a field in that set is populated, all other fields in the set will automatically be cleared.
#key=
defkey=(value)->::String
Parameter
value (::String) — Key if the field is a map.
Note: The following fields are mutually exclusive: key, index. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::String) — Key if the field is a map.
Note: The following fields are mutually exclusive: key, index. If a field in that set is populated, all other fields in the set will automatically be cleared.
#name
defname()->::String
Returns
(::String) — Name of the field, e.g., "vehicles".
#name=
defname=(value)->::String
Parameter
value (::String) — Name of the field, e.g., "vehicles".
[[["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,["# Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::OptimizeToursValidationError::FieldReference (v0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/ruby/docs/reference/google-cloud-optimization-v1/latest/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.11.1](/ruby/docs/reference/google-cloud-optimization-v1/0.11.1/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.10.0](/ruby/docs/reference/google-cloud-optimization-v1/0.10.0/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.9.2](/ruby/docs/reference/google-cloud-optimization-v1/0.9.2/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.8.2](/ruby/docs/reference/google-cloud-optimization-v1/0.8.2/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.7.0](/ruby/docs/reference/google-cloud-optimization-v1/0.7.0/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.6.0](/ruby/docs/reference/google-cloud-optimization-v1/0.6.0/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.5.0](/ruby/docs/reference/google-cloud-optimization-v1/0.5.0/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.4.1](/ruby/docs/reference/google-cloud-optimization-v1/0.4.1/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.3.0](/ruby/docs/reference/google-cloud-optimization-v1/0.3.0/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.2.1](/ruby/docs/reference/google-cloud-optimization-v1/0.2.1/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)\n- [0.1.1](/ruby/docs/reference/google-cloud-optimization-v1/0.1.1/Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference) \nReference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::OptimizeToursValidationError::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`\nname: \"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\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #index\n\n def index() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- Index of the field if repeated.\n\n Note: The following fields are mutually exclusive: `index`, `key`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #index=\n\n def index=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- Index of the field if repeated.\n\n\nNote: The following fields are mutually exclusive: `index`, `key`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::Integer) --- Index of the field if repeated.\n\n Note: The following fields are mutually exclusive: `index`, `key`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #key\n\n def key() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Key if the field is a map.\n\n Note: The following fields are mutually exclusive: `key`, `index`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #key=\n\n def key=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Key if the field is a map.\n\n\nNote: The following fields are mutually exclusive: `key`, `index`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::String) --- Key if the field is a map.\n\n Note: The following fields are mutually exclusive: `key`, `index`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #name\n\n def name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Name of the field, e.g., \"vehicles\".\n\n### #name=\n\n def name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Name of the field, e.g., \"vehicles\". \n**Returns**\n\n- (::String) --- Name of the field, e.g., \"vehicles\".\n\n### #sub_field\n\n def sub_field() -\u003e ::Google::Cloud::Optimization::V1::OptimizeToursValidationError::FieldReference\n\n**Returns**\n\n- ([::Google::Cloud::Optimization::V1::OptimizeToursValidationError::FieldReference](./Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)) --- Recursively nested sub-field, if needed.\n\n### #sub_field=\n\n def sub_field=(value) -\u003e ::Google::Cloud::Optimization::V1::OptimizeToursValidationError::FieldReference\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Optimization::V1::OptimizeToursValidationError::FieldReference](./Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)) --- Recursively nested sub-field, if needed. \n**Returns**\n\n- ([::Google::Cloud::Optimization::V1::OptimizeToursValidationError::FieldReference](./Google-Cloud-Optimization-V1-OptimizeToursValidationError-FieldReference)) --- Recursively nested sub-field, if needed."]]