Class OptimizeToursResponse (1.1.10)

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
TypeDescription
int

REQUEST_LABEL_FIELD_NUMBER

public static final int REQUEST_LABEL_FIELD_NUMBER
Field Value
TypeDescription
int

ROUTES_FIELD_NUMBER

public static final int ROUTES_FIELD_NUMBER
Field Value
TypeDescription
int

SKIPPED_SHIPMENTS_FIELD_NUMBER

public static final int SKIPPED_SHIPMENTS_FIELD_NUMBER
Field Value
TypeDescription
int

TOTAL_COST_FIELD_NUMBER

public static final int TOTAL_COST_FIELD_NUMBER
Field Value
TypeDescription
int

VALIDATION_ERRORS_FIELD_NUMBER

public static final int VALIDATION_ERRORS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static OptimizeToursResponse getDefaultInstance()
Returns
TypeDescription
OptimizeToursResponse

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static OptimizeToursResponse.Builder newBuilder()
Returns
TypeDescription
OptimizeToursResponse.Builder

newBuilder(OptimizeToursResponse prototype)

public static OptimizeToursResponse.Builder newBuilder(OptimizeToursResponse prototype)
Parameter
NameDescription
prototypeOptimizeToursResponse
Returns
TypeDescription
OptimizeToursResponse.Builder

parseDelimitedFrom(InputStream input)

public static OptimizeToursResponse parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static OptimizeToursResponse parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OptimizeToursResponse parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OptimizeToursResponse parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static OptimizeToursResponse parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static OptimizeToursResponse parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
OptimizeToursResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<OptimizeToursResponse> parser()
Returns
TypeDescription
Parser<OptimizeToursResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public OptimizeToursResponse getDefaultInstanceForType()
Returns
TypeDescription
OptimizeToursResponse

getMetrics()

public OptimizeToursResponse.Metrics getMetrics()

Duration, distance and usage metrics for this solution.

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

Returns
TypeDescription
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
TypeDescription
OptimizeToursResponse.MetricsOrBuilder

getParserForType()

public Parser<OptimizeToursResponse> getParserForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SkippedShipment

getSkippedShipmentsCount()

public int getSkippedShipmentsCount()

The list of all shipments skipped.

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

Returns
TypeDescription
int

getSkippedShipmentsList()

public List<SkippedShipment> getSkippedShipmentsList()

The list of all shipments skipped.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SkippedShipmentOrBuilder

getSkippedShipmentsOrBuilderList()

public List<? extends SkippedShipmentOrBuilder> getSkippedShipmentsOrBuilderList()

The list of all shipments skipped.

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

Returns
TypeDescription
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=394

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
TypeDescription
double

The totalCost.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the metrics field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public OptimizeToursResponse.Builder newBuilderForType()
Returns
TypeDescription
OptimizeToursResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OptimizeToursResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
OptimizeToursResponse.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public OptimizeToursResponse.Builder toBuilder()
Returns
TypeDescription
OptimizeToursResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException