Class OptimizeToursValidationError
Describes an error or warning encountered when validating an
OptimizeToursRequest
.
Implements
Namespace: Google.Maps.RouteOptimization.V1
Assembly: Google.Maps.RouteOptimization.V1.dll
Syntax
public sealed class OptimizeToursValidationError : IMessage<OptimizeToursValidationError>, IEquatable<OptimizeToursValidationError>, IDeepCloneable<OptimizeToursValidationError>, IBufferMessage, IMessage
Constructors
OptimizeToursValidationError()
Declaration
public OptimizeToursValidationError()
OptimizeToursValidationError(OptimizeToursValidationError)
Declaration
public OptimizeToursValidationError(OptimizeToursValidationError other)
Parameters
Type | Name | Description |
---|---|---|
OptimizeToursValidationError | other |
Properties
Code
A validation error is defined by the pair (code
, display_name
) which
are always present.
The fields following this section provide more context about the error.
MULTIPLE ERRORS:
When there are multiple errors, the validation process tries to output
several of them. Much like a compiler, this is an imperfect process. Some
validation errors will be "fatal", meaning that they stop the entire
validation process. This is the case for display_name="UNSPECIFIED"
errors, among others. Some errors may cause the validation process to skip
other errors.
STABILITY:
code
and display_name
should be very stable. But new codes and
display names may appear over time, which may cause a given (invalid)
request to yield a different (code
, display_name
) pair because the new
error hid the old one. For example, see "MULTIPLE ERRORS".
Declaration
public int Code { get; set; }
Property Value
Type | Description |
---|---|
int |
DisplayName
The error display name.
Declaration
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string |
ErrorMessage
Human-readable string describing the error. There is a 1:1 mapping
between code
and error_message
(when code != "UNSPECIFIED").
STABILITY: Not stable: the error message associated to a given code
may
change (hopefully to clarify it) over time. Please rely on the
display_name
and code
instead.
Declaration
public string ErrorMessage { get; set; }
Property Value
Type | Description |
---|---|
string |
Fields
An error context may involve 0, 1 (most of the time) or more fields. For example, referring to vehicle #4 and shipment #2's first pickup can be done as follows:
fields { name: "vehicles" index: 4}
fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} }
Note, however, that the cardinality of fields
should not change for a
given error code.
Declaration
public RepeatedField<OptimizeToursValidationError.Types.FieldReference> Fields { get; }
Property Value
Type | Description |
---|---|
RepeatedField<OptimizeToursValidationError.Types.FieldReference> |
OffendingValues
May contain the value(s) of the field(s). This is not always available. You should absolutely not rely on it and use it only for manual model debugging.
Declaration
public string OffendingValues { get; set; }
Property Value
Type | Description |
---|---|
string |