Cloud Optimization v1 API - Class SkippedShipment.Types.Reason (2.1.0)

Stay organized with collections Save and categorize content based on your preferences.
public sealed class Reason : IMessage<SkippedShipment.Types.Reason>, IEquatable<SkippedShipment.Types.Reason>, IDeepCloneable<SkippedShipment.Types.Reason>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Optimization v1 API class SkippedShipment.Types.Reason.

If we can explain why the shipment was skipped, reasons will be listed here. If the reason is not the same for all vehicles, reason will have more than 1 element. A skipped shipment cannot have duplicate reasons, i.e. where all fields are the same except for example_vehicle_index. Example:

reasons {
code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
example_vehicle_index: 1
example_exceeded_capacity_type: &quot;Apples&quot;
}
reasons {
code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
example_vehicle_index: 3
example_exceeded_capacity_type: &quot;Pears&quot;
}
reasons {
code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
example_vehicle_index: 1
}

The skipped shipment is incompatible with all vehicles. The reasons may be different for all vehicles but at least one vehicle's "Apples" capacity would be exceeded (including vehicle 1), at least one vehicle's "Pears" capacity would be exceeded (including vehicle 3) and at least one vehicle's distance limit would be exceeded (including vehicle 1).

Inheritance

Object > SkippedShipment.Types.Reason

Namespace

Google.Cloud.Optimization.V1

Assembly

Google.Cloud.Optimization.V1.dll

Constructors

Reason()

public Reason()

Reason(SkippedShipment.Types.Reason)

public Reason(SkippedShipment.Types.Reason other)
Parameter
NameDescription
otherSkippedShipment.Types.Reason

Properties

Code

public SkippedShipment.Types.Reason.Types.Code Code { get; set; }

Refer to the comments of Code.

Property Value
TypeDescription
SkippedShipment.Types.Reason.Types.Code

ExampleExceededCapacityType

public string ExampleExceededCapacityType { get; set; }

If the reason code is DEMAND_EXCEEDS_VEHICLE_CAPACITY, documents one capacity type that is exceeded.

Property Value
TypeDescription
String

ExampleVehicleIndex

public int ExampleVehicleIndex { get; set; }

If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.

Property Value
TypeDescription
Int32

HasExampleVehicleIndex

public bool HasExampleVehicleIndex { get; }

Gets whether the "example_vehicle_index" field is set

Property Value
TypeDescription
Boolean