Class OptimizeToursResponse (1.42.0)

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
Type Description
int

REQUEST_LABEL_FIELD_NUMBER

public static final int REQUEST_LABEL_FIELD_NUMBER
Field Value
Type Description
int

ROUTES_FIELD_NUMBER

public static final int ROUTES_FIELD_NUMBER
Field Value
Type Description
int

SKIPPED_SHIPMENTS_FIELD_NUMBER

public static final int SKIPPED_SHIPMENTS_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_COST_FIELD_NUMBER

public static final int TOTAL_COST_FIELD_NUMBER
Field Value
Type Description
int

VALIDATION_ERRORS_FIELD_NUMBER

public static final int VALIDATION_ERRORS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OptimizeToursResponse getDefaultInstance()
Returns
Type Description
OptimizeToursResponse

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static OptimizeToursResponse.Builder newBuilder()
Returns
Type Description
OptimizeToursResponse.Builder

newBuilder(OptimizeToursResponse prototype)

public static OptimizeToursResponse.Builder newBuilder(OptimizeToursResponse prototype)
Parameter
Name Description
prototype OptimizeToursResponse
Returns
Type Description
OptimizeToursResponse.Builder

parseDelimitedFrom(InputStream input)

public static OptimizeToursResponse parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static OptimizeToursResponse parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OptimizeToursResponse parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OptimizeToursResponse parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static OptimizeToursResponse parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static OptimizeToursResponse parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<OptimizeToursResponse> parser()
Returns
Type Description
Parser<OptimizeToursResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public OptimizeToursResponse getDefaultInstanceForType()
Returns
Type Description
OptimizeToursResponse

getMetrics()

public OptimizeToursResponse.Metrics getMetrics()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description
OptimizeToursResponse.Metrics

The metrics.

getMetricsOrBuilder()

public OptimizeToursResponse.MetricsOrBuilder getMetricsOrBuilder()

Duration, distance and usage metrics for this solution.

.google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6;

Returns
Type Description
OptimizeToursResponse.MetricsOrBuilder

getParserForType()

public Parser<OptimizeToursResponse> getParserForType()
Returns
Type Description
Parser<OptimizeToursResponse>
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
Name Description
index int
Returns
Type Description
ShipmentRoute

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
Type Description
int

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
Type Description
List<ShipmentRoute>

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
Name Description
index int
Returns
Type Description
ShipmentRouteOrBuilder

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
Type Description
int
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
Name Description
index int
Returns
Type Description
SkippedShipment

getSkippedShipmentsCount()

public int getSkippedShipmentsCount()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
int

getSkippedShipmentsList()

public List<SkippedShipment> getSkippedShipmentsList()

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Returns
Type Description
List<SkippedShipment>

getSkippedShipmentsOrBuilder(int index)

public SkippedShipmentOrBuilder getSkippedShipmentsOrBuilder(int index)

The list of all shipments skipped.

repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4;

Parameter
Name Description
index int
Returns
Type Description
SkippedShipmentOrBuilder

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() (deprecated)

public double getTotalCost()

Deprecated. google.cloud.optimization.v1.OptimizeToursResponse.total_cost is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=433

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.

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
Name Description
index int
Returns
Type Description
OptimizeToursValidationError

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
Type Description
int

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
Type Description
List<OptimizeToursValidationError>

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
Name Description
index int
Returns
Type Description
OptimizeToursValidationErrorOrBuilder

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()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OptimizeToursResponse.Builder newBuilderForType()
Returns
Type Description
OptimizeToursResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OptimizeToursResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
OptimizeToursResponse.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public OptimizeToursResponse.Builder toBuilder()
Returns
Type Description
OptimizeToursResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException