public final class OptimizeToursResponse extends GeneratedMessageV3 implements OptimizeToursResponseOrBuilder
Response after solving a tour optimization problem containing the routes
followed by each vehicle, the shipments which have been skipped and the
overall cost of the solution.
Protobuf type google.cloud.optimization.v1.OptimizeToursResponse
Static Fields
METRICS_FIELD_NUMBER
public static final int METRICS_FIELD_NUMBER
Field Value
REQUEST_LABEL_FIELD_NUMBER
public static final int REQUEST_LABEL_FIELD_NUMBER
Field Value
ROUTES_FIELD_NUMBER
public static final int ROUTES_FIELD_NUMBER
Field Value
SKIPPED_SHIPMENTS_FIELD_NUMBER
public static final int SKIPPED_SHIPMENTS_FIELD_NUMBER
Field Value
TOTAL_COST_FIELD_NUMBER
public static final int TOTAL_COST_FIELD_NUMBER
Field Value
VALIDATION_ERRORS_FIELD_NUMBER
public static final int VALIDATION_ERRORS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static OptimizeToursResponse getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static OptimizeToursResponse.Builder newBuilder()
Returns
newBuilder(OptimizeToursResponse prototype)
public static OptimizeToursResponse.Builder newBuilder(OptimizeToursResponse prototype)
Parameter
Returns
public static OptimizeToursResponse parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static OptimizeToursResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static OptimizeToursResponse parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static OptimizeToursResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static OptimizeToursResponse parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static OptimizeToursResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static OptimizeToursResponse parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static OptimizeToursResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static OptimizeToursResponse parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static OptimizeToursResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static OptimizeToursResponse parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static OptimizeToursResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<OptimizeToursResponse> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public OptimizeToursResponse getDefaultInstanceForType()
Returns
getMetrics()
public OptimizeToursResponse.Metrics getMetrics()
Duration, distance and usage metrics for this solution.
.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;
Returns
getMetricsOrBuilder()
public OptimizeToursResponse.MetricsOrBuilder getMetricsOrBuilder()
Duration, distance and usage metrics for this solution.
.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;
Returns
getParserForType()
public Parser<OptimizeToursResponse> getParserForType()
Returns
Overrides
getRequestLabel()
public String getRequestLabel()
Copy of the OptimizeToursRequest.label, if a label was specified in the
request.
string request_label = 3;
Returns
Type | Description |
String | The requestLabel.
|
getRequestLabelBytes()
public ByteString getRequestLabelBytes()
Copy of the OptimizeToursRequest.label, if a label was specified in the
request.
string request_label = 3;
Returns
Type | Description |
ByteString | The bytes for requestLabel.
|
getRoutes(int index)
public ShipmentRoute getRoutes(int index)
Routes computed for each vehicle; the i-th route corresponds to the i-th
vehicle in the model.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
getRoutesCount()
public int getRoutesCount()
Routes computed for each vehicle; the i-th route corresponds to the i-th
vehicle in the model.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
getRoutesList()
public List<ShipmentRoute> getRoutesList()
Routes computed for each vehicle; the i-th route corresponds to the i-th
vehicle in the model.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
getRoutesOrBuilder(int index)
public ShipmentRouteOrBuilder getRoutesOrBuilder(int index)
Routes computed for each vehicle; the i-th route corresponds to the i-th
vehicle in the model.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Parameter
Returns
getRoutesOrBuilderList()
public List<? extends ShipmentRouteOrBuilder> getRoutesOrBuilderList()
Routes computed for each vehicle; the i-th route corresponds to the i-th
vehicle in the model.
repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder> | |
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSkippedShipments(int index)
public SkippedShipment getSkippedShipments(int index)
The list of all shipments skipped.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;
Parameter
Returns
getSkippedShipmentsCount()
public int getSkippedShipmentsCount()
The list of all shipments skipped.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;
Returns
getSkippedShipmentsList()
public List<SkippedShipment> getSkippedShipmentsList()
The list of all shipments skipped.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;
Returns
getSkippedShipmentsOrBuilder(int index)
public SkippedShipmentOrBuilder getSkippedShipmentsOrBuilder(int index)
The list of all shipments skipped.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;
Parameter
Returns
getSkippedShipmentsOrBuilderList()
public List<? extends SkippedShipmentOrBuilder> getSkippedShipmentsOrBuilderList()
The list of all shipments skipped.
repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.SkippedShipmentOrBuilder> | |
getTotalCost()
public double getTotalCost()
Deprecated: Use [Metrics.total_cost][] instead.
Total cost of the solution. This takes into account all costs: costs per
per hour and travel hour, fixed vehicle costs, unperformed shipment penalty
costs, global duration cost, etc.
double total_cost = 2 [deprecated = true];
Returns
Type | Description |
double | The totalCost.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
getValidationErrors(int index)
public OptimizeToursValidationError getValidationErrors(int index)
List of all the validation errors that we were able to detect
independently. See the "MULTIPLE ERRORS" explanation for the
OptimizeToursValidationError message.
repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
Parameter
Returns
getValidationErrorsCount()
public int getValidationErrorsCount()
List of all the validation errors that we were able to detect
independently. See the "MULTIPLE ERRORS" explanation for the
OptimizeToursValidationError message.
repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
Returns
getValidationErrorsList()
public List<OptimizeToursValidationError> getValidationErrorsList()
List of all the validation errors that we were able to detect
independently. See the "MULTIPLE ERRORS" explanation for the
OptimizeToursValidationError message.
repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
Returns
getValidationErrorsOrBuilder(int index)
public OptimizeToursValidationErrorOrBuilder getValidationErrorsOrBuilder(int index)
List of all the validation errors that we were able to detect
independently. See the "MULTIPLE ERRORS" explanation for the
OptimizeToursValidationError message.
repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
Parameter
Returns
getValidationErrorsOrBuilderList()
public List<? extends OptimizeToursValidationErrorOrBuilder> getValidationErrorsOrBuilderList()
List of all the validation errors that we were able to detect
independently. See the "MULTIPLE ERRORS" explanation for the
OptimizeToursValidationError message.
repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.OptimizeToursValidationErrorOrBuilder> | |
hasMetrics()
public boolean hasMetrics()
Duration, distance and usage metrics for this solution.
.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;
Returns
Type | Description |
boolean | Whether the metrics field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public OptimizeToursResponse.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected OptimizeToursResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public OptimizeToursResponse.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions