com.google.maps.routeoptimization.v1.OptimizeToursResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-maps-routeoptimization-v1 Show documentation
Show all versions of proto-google-maps-routeoptimization-v1 Show documentation
Proto library for google-maps-routeoptimization
The newest version!
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/maps/routeoptimization/v1/route_optimization_service.proto
// Protobuf Java Version: 3.25.5
package com.google.maps.routeoptimization.v1;
/**
*
*
*
* 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 {@code google.maps.routeoptimization.v1.OptimizeToursResponse}
*/
public final class OptimizeToursResponse extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routeoptimization.v1.OptimizeToursResponse)
OptimizeToursResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use OptimizeToursResponse.newBuilder() to construct.
private OptimizeToursResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OptimizeToursResponse() {
routes_ = java.util.Collections.emptyList();
requestLabel_ = "";
skippedShipments_ = java.util.Collections.emptyList();
validationErrors_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OptimizeToursResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.class,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Builder.class);
}
public interface MetricsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*
* @return Whether the aggregatedRouteMetrics field is set.
*/
boolean hasAggregatedRouteMetrics();
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*
* @return The aggregatedRouteMetrics.
*/
com.google.maps.routeoptimization.v1.AggregatedMetrics getAggregatedRouteMetrics();
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder
getAggregatedRouteMetricsOrBuilder();
/**
*
*
*
* Number of mandatory shipments skipped.
*
*
* int32 skipped_mandatory_shipment_count = 2;
*
* @return The skippedMandatoryShipmentCount.
*/
int getSkippedMandatoryShipmentCount();
/**
*
*
*
* Number of vehicles used. Note: if a vehicle route is empty and
* [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty]
* is true, the vehicle is considered used.
*
*
* int32 used_vehicle_count = 3;
*
* @return The usedVehicleCount.
*/
int getUsedVehicleCount();
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*
* @return Whether the earliestVehicleStartTime field is set.
*/
boolean hasEarliestVehicleStartTime();
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*
* @return The earliestVehicleStartTime.
*/
com.google.protobuf.Timestamp getEarliestVehicleStartTime();
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
com.google.protobuf.TimestampOrBuilder getEarliestVehicleStartTimeOrBuilder();
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*
* @return Whether the latestVehicleEndTime field is set.
*/
boolean hasLatestVehicleEndTime();
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*
* @return The latestVehicleEndTime.
*/
com.google.protobuf.Timestamp getLatestVehicleEndTime();
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
com.google.protobuf.TimestampOrBuilder getLatestVehicleEndTimeOrBuilder();
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
int getCostsCount();
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
boolean containsCosts(java.lang.String key);
/** Use {@link #getCostsMap()} instead. */
@java.lang.Deprecated
java.util.Map getCosts();
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
java.util.Map getCostsMap();
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
double getCostsOrDefault(java.lang.String key, double defaultValue);
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
double getCostsOrThrow(java.lang.String key);
/**
*
*
*
* Total cost of the solution. The sum of all values in the costs map.
*
*
* double total_cost = 6;
*
* @return The totalCost.
*/
double getTotalCost();
}
/**
*
*
*
* Overall metrics, aggregated over all routes.
*
*
* Protobuf type {@code google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics}
*/
public static final class Metrics extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics)
MetricsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Metrics.newBuilder() to construct.
private Metrics(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Metrics() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Metrics();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_Metrics_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 10:
return internalGetCosts();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_Metrics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.class,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder.class);
}
private int bitField0_;
public static final int AGGREGATED_ROUTE_METRICS_FIELD_NUMBER = 1;
private com.google.maps.routeoptimization.v1.AggregatedMetrics aggregatedRouteMetrics_;
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*
* @return Whether the aggregatedRouteMetrics field is set.
*/
@java.lang.Override
public boolean hasAggregatedRouteMetrics() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*
* @return The aggregatedRouteMetrics.
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.AggregatedMetrics getAggregatedRouteMetrics() {
return aggregatedRouteMetrics_ == null
? com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance()
: aggregatedRouteMetrics_;
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder
getAggregatedRouteMetricsOrBuilder() {
return aggregatedRouteMetrics_ == null
? com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance()
: aggregatedRouteMetrics_;
}
public static final int SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER = 2;
private int skippedMandatoryShipmentCount_ = 0;
/**
*
*
*
* Number of mandatory shipments skipped.
*
*
* int32 skipped_mandatory_shipment_count = 2;
*
* @return The skippedMandatoryShipmentCount.
*/
@java.lang.Override
public int getSkippedMandatoryShipmentCount() {
return skippedMandatoryShipmentCount_;
}
public static final int USED_VEHICLE_COUNT_FIELD_NUMBER = 3;
private int usedVehicleCount_ = 0;
/**
*
*
*
* Number of vehicles used. Note: if a vehicle route is empty and
* [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty]
* is true, the vehicle is considered used.
*
*
* int32 used_vehicle_count = 3;
*
* @return The usedVehicleCount.
*/
@java.lang.Override
public int getUsedVehicleCount() {
return usedVehicleCount_;
}
public static final int EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER = 4;
private com.google.protobuf.Timestamp earliestVehicleStartTime_;
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*
* @return Whether the earliestVehicleStartTime field is set.
*/
@java.lang.Override
public boolean hasEarliestVehicleStartTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*
* @return The earliestVehicleStartTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getEarliestVehicleStartTime() {
return earliestVehicleStartTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: earliestVehicleStartTime_;
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getEarliestVehicleStartTimeOrBuilder() {
return earliestVehicleStartTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: earliestVehicleStartTime_;
}
public static final int LATEST_VEHICLE_END_TIME_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp latestVehicleEndTime_;
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*
* @return Whether the latestVehicleEndTime field is set.
*/
@java.lang.Override
public boolean hasLatestVehicleEndTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*
* @return The latestVehicleEndTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getLatestVehicleEndTime() {
return latestVehicleEndTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: latestVehicleEndTime_;
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getLatestVehicleEndTimeOrBuilder() {
return latestVehicleEndTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: latestVehicleEndTime_;
}
public static final int COSTS_FIELD_NUMBER = 10;
private static final class CostsDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_Metrics_CostsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.DOUBLE,
0D);
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField costs_;
private com.google.protobuf.MapField internalGetCosts() {
if (costs_ == null) {
return com.google.protobuf.MapField.emptyMapField(CostsDefaultEntryHolder.defaultEntry);
}
return costs_;
}
public int getCostsCount() {
return internalGetCosts().getMap().size();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public boolean containsCosts(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetCosts().getMap().containsKey(key);
}
/** Use {@link #getCostsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCosts() {
return getCostsMap();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public java.util.Map getCostsMap() {
return internalGetCosts().getMap();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public double getCostsOrDefault(java.lang.String key, double defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetCosts().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public double getCostsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetCosts().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TOTAL_COST_FIELD_NUMBER = 6;
private double totalCost_ = 0D;
/**
*
*
*
* Total cost of the solution. The sum of all values in the costs map.
*
*
* double total_cost = 6;
*
* @return The totalCost.
*/
@java.lang.Override
public double getTotalCost() {
return totalCost_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getAggregatedRouteMetrics());
}
if (skippedMandatoryShipmentCount_ != 0) {
output.writeInt32(2, skippedMandatoryShipmentCount_);
}
if (usedVehicleCount_ != 0) {
output.writeInt32(3, usedVehicleCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getEarliestVehicleStartTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, getLatestVehicleEndTime());
}
if (java.lang.Double.doubleToRawLongBits(totalCost_) != 0) {
output.writeDouble(6, totalCost_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetCosts(), CostsDefaultEntryHolder.defaultEntry, 10);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, getAggregatedRouteMetrics());
}
if (skippedMandatoryShipmentCount_ != 0) {
size +=
com.google.protobuf.CodedOutputStream.computeInt32Size(
2, skippedMandatoryShipmentCount_);
}
if (usedVehicleCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, usedVehicleCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, getEarliestVehicleStartTime());
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLatestVehicleEndTime());
}
if (java.lang.Double.doubleToRawLongBits(totalCost_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, totalCost_);
}
for (java.util.Map.Entry entry :
internalGetCosts().getMap().entrySet()) {
com.google.protobuf.MapEntry costs__ =
CostsDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, costs__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics)) {
return super.equals(obj);
}
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics other =
(com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics) obj;
if (hasAggregatedRouteMetrics() != other.hasAggregatedRouteMetrics()) return false;
if (hasAggregatedRouteMetrics()) {
if (!getAggregatedRouteMetrics().equals(other.getAggregatedRouteMetrics())) return false;
}
if (getSkippedMandatoryShipmentCount() != other.getSkippedMandatoryShipmentCount())
return false;
if (getUsedVehicleCount() != other.getUsedVehicleCount()) return false;
if (hasEarliestVehicleStartTime() != other.hasEarliestVehicleStartTime()) return false;
if (hasEarliestVehicleStartTime()) {
if (!getEarliestVehicleStartTime().equals(other.getEarliestVehicleStartTime()))
return false;
}
if (hasLatestVehicleEndTime() != other.hasLatestVehicleEndTime()) return false;
if (hasLatestVehicleEndTime()) {
if (!getLatestVehicleEndTime().equals(other.getLatestVehicleEndTime())) return false;
}
if (!internalGetCosts().equals(other.internalGetCosts())) return false;
if (java.lang.Double.doubleToLongBits(getTotalCost())
!= java.lang.Double.doubleToLongBits(other.getTotalCost())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasAggregatedRouteMetrics()) {
hash = (37 * hash) + AGGREGATED_ROUTE_METRICS_FIELD_NUMBER;
hash = (53 * hash) + getAggregatedRouteMetrics().hashCode();
}
hash = (37 * hash) + SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getSkippedMandatoryShipmentCount();
hash = (37 * hash) + USED_VEHICLE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getUsedVehicleCount();
if (hasEarliestVehicleStartTime()) {
hash = (37 * hash) + EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER;
hash = (53 * hash) + getEarliestVehicleStartTime().hashCode();
}
if (hasLatestVehicleEndTime()) {
hash = (37 * hash) + LATEST_VEHICLE_END_TIME_FIELD_NUMBER;
hash = (53 * hash) + getLatestVehicleEndTime().hashCode();
}
if (!internalGetCosts().getMap().isEmpty()) {
hash = (37 * hash) + COSTS_FIELD_NUMBER;
hash = (53 * hash) + internalGetCosts().hashCode();
}
hash = (37 * hash) + TOTAL_COST_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTotalCost()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Overall metrics, aggregated over all routes.
*
*
* Protobuf type {@code google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics)
com.google.maps.routeoptimization.v1.OptimizeToursResponse.MetricsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_Metrics_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 10:
return internalGetCosts();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 10:
return internalGetMutableCosts();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_Metrics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.class,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder.class);
}
// Construct using
// com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getAggregatedRouteMetricsFieldBuilder();
getEarliestVehicleStartTimeFieldBuilder();
getLatestVehicleEndTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
aggregatedRouteMetrics_ = null;
if (aggregatedRouteMetricsBuilder_ != null) {
aggregatedRouteMetricsBuilder_.dispose();
aggregatedRouteMetricsBuilder_ = null;
}
skippedMandatoryShipmentCount_ = 0;
usedVehicleCount_ = 0;
earliestVehicleStartTime_ = null;
if (earliestVehicleStartTimeBuilder_ != null) {
earliestVehicleStartTimeBuilder_.dispose();
earliestVehicleStartTimeBuilder_ = null;
}
latestVehicleEndTime_ = null;
if (latestVehicleEndTimeBuilder_ != null) {
latestVehicleEndTimeBuilder_.dispose();
latestVehicleEndTimeBuilder_ = null;
}
internalGetMutableCosts().clear();
totalCost_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_Metrics_descriptor;
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
getDefaultInstanceForType() {
return com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics build() {
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics buildPartial() {
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics result =
new com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.aggregatedRouteMetrics_ =
aggregatedRouteMetricsBuilder_ == null
? aggregatedRouteMetrics_
: aggregatedRouteMetricsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.skippedMandatoryShipmentCount_ = skippedMandatoryShipmentCount_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.usedVehicleCount_ = usedVehicleCount_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.earliestVehicleStartTime_ =
earliestVehicleStartTimeBuilder_ == null
? earliestVehicleStartTime_
: earliestVehicleStartTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.latestVehicleEndTime_ =
latestVehicleEndTimeBuilder_ == null
? latestVehicleEndTime_
: latestVehicleEndTimeBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.costs_ = internalGetCosts();
result.costs_.makeImmutable();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.totalCost_ = totalCost_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics) {
return mergeFrom(
(com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics other) {
if (other
== com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
.getDefaultInstance()) return this;
if (other.hasAggregatedRouteMetrics()) {
mergeAggregatedRouteMetrics(other.getAggregatedRouteMetrics());
}
if (other.getSkippedMandatoryShipmentCount() != 0) {
setSkippedMandatoryShipmentCount(other.getSkippedMandatoryShipmentCount());
}
if (other.getUsedVehicleCount() != 0) {
setUsedVehicleCount(other.getUsedVehicleCount());
}
if (other.hasEarliestVehicleStartTime()) {
mergeEarliestVehicleStartTime(other.getEarliestVehicleStartTime());
}
if (other.hasLatestVehicleEndTime()) {
mergeLatestVehicleEndTime(other.getLatestVehicleEndTime());
}
internalGetMutableCosts().mergeFrom(other.internalGetCosts());
bitField0_ |= 0x00000020;
if (other.getTotalCost() != 0D) {
setTotalCost(other.getTotalCost());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(
getAggregatedRouteMetricsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
skippedMandatoryShipmentCount_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24:
{
usedVehicleCount_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34:
{
input.readMessage(
getEarliestVehicleStartTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
input.readMessage(
getLatestVehicleEndTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 49:
{
totalCost_ = input.readDouble();
bitField0_ |= 0x00000040;
break;
} // case 49
case 82:
{
com.google.protobuf.MapEntry costs__ =
input.readMessage(
CostsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableCosts()
.getMutableMap()
.put(costs__.getKey(), costs__.getValue());
bitField0_ |= 0x00000020;
break;
} // case 82
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.maps.routeoptimization.v1.AggregatedMetrics aggregatedRouteMetrics_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routeoptimization.v1.AggregatedMetrics,
com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder,
com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder>
aggregatedRouteMetricsBuilder_;
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*
* @return Whether the aggregatedRouteMetrics field is set.
*/
public boolean hasAggregatedRouteMetrics() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*
* @return The aggregatedRouteMetrics.
*/
public com.google.maps.routeoptimization.v1.AggregatedMetrics getAggregatedRouteMetrics() {
if (aggregatedRouteMetricsBuilder_ == null) {
return aggregatedRouteMetrics_ == null
? com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance()
: aggregatedRouteMetrics_;
} else {
return aggregatedRouteMetricsBuilder_.getMessage();
}
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
public Builder setAggregatedRouteMetrics(
com.google.maps.routeoptimization.v1.AggregatedMetrics value) {
if (aggregatedRouteMetricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aggregatedRouteMetrics_ = value;
} else {
aggregatedRouteMetricsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
public Builder setAggregatedRouteMetrics(
com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder builderForValue) {
if (aggregatedRouteMetricsBuilder_ == null) {
aggregatedRouteMetrics_ = builderForValue.build();
} else {
aggregatedRouteMetricsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
public Builder mergeAggregatedRouteMetrics(
com.google.maps.routeoptimization.v1.AggregatedMetrics value) {
if (aggregatedRouteMetricsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& aggregatedRouteMetrics_ != null
&& aggregatedRouteMetrics_
!= com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance()) {
getAggregatedRouteMetricsBuilder().mergeFrom(value);
} else {
aggregatedRouteMetrics_ = value;
}
} else {
aggregatedRouteMetricsBuilder_.mergeFrom(value);
}
if (aggregatedRouteMetrics_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
public Builder clearAggregatedRouteMetrics() {
bitField0_ = (bitField0_ & ~0x00000001);
aggregatedRouteMetrics_ = null;
if (aggregatedRouteMetricsBuilder_ != null) {
aggregatedRouteMetricsBuilder_.dispose();
aggregatedRouteMetricsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
public com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder
getAggregatedRouteMetricsBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getAggregatedRouteMetricsFieldBuilder().getBuilder();
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
public com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder
getAggregatedRouteMetricsOrBuilder() {
if (aggregatedRouteMetricsBuilder_ != null) {
return aggregatedRouteMetricsBuilder_.getMessageOrBuilder();
} else {
return aggregatedRouteMetrics_ == null
? com.google.maps.routeoptimization.v1.AggregatedMetrics.getDefaultInstance()
: aggregatedRouteMetrics_;
}
}
/**
*
*
*
* Aggregated over the routes. Each metric is the sum (or max, for loads)
* over all
* [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics]
* fields of the same name.
*
*
* .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routeoptimization.v1.AggregatedMetrics,
com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder,
com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder>
getAggregatedRouteMetricsFieldBuilder() {
if (aggregatedRouteMetricsBuilder_ == null) {
aggregatedRouteMetricsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routeoptimization.v1.AggregatedMetrics,
com.google.maps.routeoptimization.v1.AggregatedMetrics.Builder,
com.google.maps.routeoptimization.v1.AggregatedMetricsOrBuilder>(
getAggregatedRouteMetrics(), getParentForChildren(), isClean());
aggregatedRouteMetrics_ = null;
}
return aggregatedRouteMetricsBuilder_;
}
private int skippedMandatoryShipmentCount_;
/**
*
*
*
* Number of mandatory shipments skipped.
*
*
* int32 skipped_mandatory_shipment_count = 2;
*
* @return The skippedMandatoryShipmentCount.
*/
@java.lang.Override
public int getSkippedMandatoryShipmentCount() {
return skippedMandatoryShipmentCount_;
}
/**
*
*
*
* Number of mandatory shipments skipped.
*
*
* int32 skipped_mandatory_shipment_count = 2;
*
* @param value The skippedMandatoryShipmentCount to set.
* @return This builder for chaining.
*/
public Builder setSkippedMandatoryShipmentCount(int value) {
skippedMandatoryShipmentCount_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Number of mandatory shipments skipped.
*
*
* int32 skipped_mandatory_shipment_count = 2;
*
* @return This builder for chaining.
*/
public Builder clearSkippedMandatoryShipmentCount() {
bitField0_ = (bitField0_ & ~0x00000002);
skippedMandatoryShipmentCount_ = 0;
onChanged();
return this;
}
private int usedVehicleCount_;
/**
*
*
*
* Number of vehicles used. Note: if a vehicle route is empty and
* [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty]
* is true, the vehicle is considered used.
*
*
* int32 used_vehicle_count = 3;
*
* @return The usedVehicleCount.
*/
@java.lang.Override
public int getUsedVehicleCount() {
return usedVehicleCount_;
}
/**
*
*
*
* Number of vehicles used. Note: if a vehicle route is empty and
* [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty]
* is true, the vehicle is considered used.
*
*
* int32 used_vehicle_count = 3;
*
* @param value The usedVehicleCount to set.
* @return This builder for chaining.
*/
public Builder setUsedVehicleCount(int value) {
usedVehicleCount_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Number of vehicles used. Note: if a vehicle route is empty and
* [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty]
* is true, the vehicle is considered used.
*
*
* int32 used_vehicle_count = 3;
*
* @return This builder for chaining.
*/
public Builder clearUsedVehicleCount() {
bitField0_ = (bitField0_ & ~0x00000004);
usedVehicleCount_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp earliestVehicleStartTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
earliestVehicleStartTimeBuilder_;
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*
* @return Whether the earliestVehicleStartTime field is set.
*/
public boolean hasEarliestVehicleStartTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*
* @return The earliestVehicleStartTime.
*/
public com.google.protobuf.Timestamp getEarliestVehicleStartTime() {
if (earliestVehicleStartTimeBuilder_ == null) {
return earliestVehicleStartTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: earliestVehicleStartTime_;
} else {
return earliestVehicleStartTimeBuilder_.getMessage();
}
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
public Builder setEarliestVehicleStartTime(com.google.protobuf.Timestamp value) {
if (earliestVehicleStartTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
earliestVehicleStartTime_ = value;
} else {
earliestVehicleStartTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
public Builder setEarliestVehicleStartTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (earliestVehicleStartTimeBuilder_ == null) {
earliestVehicleStartTime_ = builderForValue.build();
} else {
earliestVehicleStartTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
public Builder mergeEarliestVehicleStartTime(com.google.protobuf.Timestamp value) {
if (earliestVehicleStartTimeBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& earliestVehicleStartTime_ != null
&& earliestVehicleStartTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getEarliestVehicleStartTimeBuilder().mergeFrom(value);
} else {
earliestVehicleStartTime_ = value;
}
} else {
earliestVehicleStartTimeBuilder_.mergeFrom(value);
}
if (earliestVehicleStartTime_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
public Builder clearEarliestVehicleStartTime() {
bitField0_ = (bitField0_ & ~0x00000008);
earliestVehicleStartTime_ = null;
if (earliestVehicleStartTimeBuilder_ != null) {
earliestVehicleStartTimeBuilder_.dispose();
earliestVehicleStartTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
public com.google.protobuf.Timestamp.Builder getEarliestVehicleStartTimeBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getEarliestVehicleStartTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
public com.google.protobuf.TimestampOrBuilder getEarliestVehicleStartTimeOrBuilder() {
if (earliestVehicleStartTimeBuilder_ != null) {
return earliestVehicleStartTimeBuilder_.getMessageOrBuilder();
} else {
return earliestVehicleStartTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: earliestVehicleStartTime_;
}
}
/**
*
*
*
* The earliest start time for a used vehicle, computed as the minimum over
* all used vehicles of
* [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time].
*
*
* .google.protobuf.Timestamp earliest_vehicle_start_time = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getEarliestVehicleStartTimeFieldBuilder() {
if (earliestVehicleStartTimeBuilder_ == null) {
earliestVehicleStartTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getEarliestVehicleStartTime(), getParentForChildren(), isClean());
earliestVehicleStartTime_ = null;
}
return earliestVehicleStartTimeBuilder_;
}
private com.google.protobuf.Timestamp latestVehicleEndTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
latestVehicleEndTimeBuilder_;
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*
* @return Whether the latestVehicleEndTime field is set.
*/
public boolean hasLatestVehicleEndTime() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*
* @return The latestVehicleEndTime.
*/
public com.google.protobuf.Timestamp getLatestVehicleEndTime() {
if (latestVehicleEndTimeBuilder_ == null) {
return latestVehicleEndTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: latestVehicleEndTime_;
} else {
return latestVehicleEndTimeBuilder_.getMessage();
}
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
public Builder setLatestVehicleEndTime(com.google.protobuf.Timestamp value) {
if (latestVehicleEndTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
latestVehicleEndTime_ = value;
} else {
latestVehicleEndTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
public Builder setLatestVehicleEndTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (latestVehicleEndTimeBuilder_ == null) {
latestVehicleEndTime_ = builderForValue.build();
} else {
latestVehicleEndTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
public Builder mergeLatestVehicleEndTime(com.google.protobuf.Timestamp value) {
if (latestVehicleEndTimeBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& latestVehicleEndTime_ != null
&& latestVehicleEndTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getLatestVehicleEndTimeBuilder().mergeFrom(value);
} else {
latestVehicleEndTime_ = value;
}
} else {
latestVehicleEndTimeBuilder_.mergeFrom(value);
}
if (latestVehicleEndTime_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
public Builder clearLatestVehicleEndTime() {
bitField0_ = (bitField0_ & ~0x00000010);
latestVehicleEndTime_ = null;
if (latestVehicleEndTimeBuilder_ != null) {
latestVehicleEndTimeBuilder_.dispose();
latestVehicleEndTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
public com.google.protobuf.Timestamp.Builder getLatestVehicleEndTimeBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getLatestVehicleEndTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
public com.google.protobuf.TimestampOrBuilder getLatestVehicleEndTimeOrBuilder() {
if (latestVehicleEndTimeBuilder_ != null) {
return latestVehicleEndTimeBuilder_.getMessageOrBuilder();
} else {
return latestVehicleEndTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: latestVehicleEndTime_;
}
}
/**
*
*
*
* The latest end time for a used vehicle, computed as the maximum over all
* used vehicles of
* [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time].
*
*
* .google.protobuf.Timestamp latest_vehicle_end_time = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getLatestVehicleEndTimeFieldBuilder() {
if (latestVehicleEndTimeBuilder_ == null) {
latestVehicleEndTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getLatestVehicleEndTime(), getParentForChildren(), isClean());
latestVehicleEndTime_ = null;
}
return latestVehicleEndTimeBuilder_;
}
private com.google.protobuf.MapField costs_;
private com.google.protobuf.MapField internalGetCosts() {
if (costs_ == null) {
return com.google.protobuf.MapField.emptyMapField(CostsDefaultEntryHolder.defaultEntry);
}
return costs_;
}
private com.google.protobuf.MapField
internalGetMutableCosts() {
if (costs_ == null) {
costs_ = com.google.protobuf.MapField.newMapField(CostsDefaultEntryHolder.defaultEntry);
}
if (!costs_.isMutable()) {
costs_ = costs_.copy();
}
bitField0_ |= 0x00000020;
onChanged();
return costs_;
}
public int getCostsCount() {
return internalGetCosts().getMap().size();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public boolean containsCosts(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetCosts().getMap().containsKey(key);
}
/** Use {@link #getCostsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCosts() {
return getCostsMap();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public java.util.Map getCostsMap() {
return internalGetCosts().getMap();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public double getCostsOrDefault(java.lang.String key, double defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetCosts().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
@java.lang.Override
public double getCostsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetCosts().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearCosts() {
bitField0_ = (bitField0_ & ~0x00000020);
internalGetMutableCosts().getMutableMap().clear();
return this;
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
public Builder removeCosts(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableCosts().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableCosts() {
bitField0_ |= 0x00000020;
return internalGetMutableCosts().getMutableMap();
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
public Builder putCosts(java.lang.String key, double value) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableCosts().getMutableMap().put(key, value);
bitField0_ |= 0x00000020;
return this;
}
/**
*
*
*
* Cost of the solution, broken down by cost-related request fields.
* The keys are proto paths, relative to the input OptimizeToursRequest,
* e.g. "model.shipments.pickups.cost", and the values are the total cost
* generated by the corresponding cost field, aggregated over the whole
* solution. In other words, costs["model.shipments.pickups.cost"] is the
* sum of all pickup costs over the solution. All costs defined in the model
* are reported in detail here with the exception of costs related to
* TransitionAttributes that are only reported in an aggregated way as of
* 2022/01.
*
*
* map<string, double> costs = 10;
*/
public Builder putAllCosts(java.util.Map values) {
internalGetMutableCosts().getMutableMap().putAll(values);
bitField0_ |= 0x00000020;
return this;
}
private double totalCost_;
/**
*
*
*
* Total cost of the solution. The sum of all values in the costs map.
*
*
* double total_cost = 6;
*
* @return The totalCost.
*/
@java.lang.Override
public double getTotalCost() {
return totalCost_;
}
/**
*
*
*
* Total cost of the solution. The sum of all values in the costs map.
*
*
* double total_cost = 6;
*
* @param value The totalCost to set.
* @return This builder for chaining.
*/
public Builder setTotalCost(double value) {
totalCost_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Total cost of the solution. The sum of all values in the costs map.
*
*
* double total_cost = 6;
*
* @return This builder for chaining.
*/
public Builder clearTotalCost() {
bitField0_ = (bitField0_ & ~0x00000040);
totalCost_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics)
}
// @@protoc_insertion_point(class_scope:google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics)
private static final com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics();
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Metrics parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int ROUTES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List routes_;
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
@java.lang.Override
public java.util.List getRoutesList() {
return routes_;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
@java.lang.Override
public java.util.List extends com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder>
getRoutesOrBuilderList() {
return routes_;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
@java.lang.Override
public int getRoutesCount() {
return routes_.size();
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.ShipmentRoute getRoutes(int index) {
return routes_.get(index);
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder getRoutesOrBuilder(int index) {
return routes_.get(index);
}
public static final int REQUEST_LABEL_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object requestLabel_ = "";
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @return The requestLabel.
*/
@java.lang.Override
public java.lang.String getRequestLabel() {
java.lang.Object ref = requestLabel_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestLabel_ = s;
return s;
}
}
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @return The bytes for requestLabel.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRequestLabelBytes() {
java.lang.Object ref = requestLabel_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
requestLabel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SKIPPED_SHIPMENTS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List skippedShipments_;
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*/
@java.lang.Override
public java.util.List
getSkippedShipmentsList() {
return skippedShipments_;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*/
@java.lang.Override
public java.util.List extends com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder>
getSkippedShipmentsOrBuilderList() {
return skippedShipments_;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*/
@java.lang.Override
public int getSkippedShipmentsCount() {
return skippedShipments_.size();
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.SkippedShipment getSkippedShipments(int index) {
return skippedShipments_.get(index);
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder getSkippedShipmentsOrBuilder(
int index) {
return skippedShipments_.get(index);
}
public static final int VALIDATION_ERRORS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List
validationErrors_;
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
@java.lang.Override
public java.util.List
getValidationErrorsList() {
return validationErrors_;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder>
getValidationErrorsOrBuilderList() {
return validationErrors_;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
@java.lang.Override
public int getValidationErrorsCount() {
return validationErrors_.size();
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursValidationError getValidationErrors(
int index) {
return validationErrors_.get(index);
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder
getValidationErrorsOrBuilder(int index) {
return validationErrors_.get(index);
}
public static final int METRICS_FIELD_NUMBER = 6;
private com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics_;
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*
* @return Whether the metrics field is set.
*/
@java.lang.Override
public boolean hasMetrics() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*
* @return The metrics.
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics getMetrics() {
return metrics_ == null
? com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.getDefaultInstance()
: metrics_;
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.MetricsOrBuilder
getMetricsOrBuilder() {
return metrics_ == null
? com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.getDefaultInstance()
: metrics_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < routes_.size(); i++) {
output.writeMessage(1, routes_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestLabel_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestLabel_);
}
for (int i = 0; i < skippedShipments_.size(); i++) {
output.writeMessage(4, skippedShipments_.get(i));
}
for (int i = 0; i < validationErrors_.size(); i++) {
output.writeMessage(5, validationErrors_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getMetrics());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < routes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, routes_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestLabel_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestLabel_);
}
for (int i = 0; i < skippedShipments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, skippedShipments_.get(i));
}
for (int i = 0; i < validationErrors_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, validationErrors_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetrics());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.maps.routeoptimization.v1.OptimizeToursResponse)) {
return super.equals(obj);
}
com.google.maps.routeoptimization.v1.OptimizeToursResponse other =
(com.google.maps.routeoptimization.v1.OptimizeToursResponse) obj;
if (!getRoutesList().equals(other.getRoutesList())) return false;
if (!getRequestLabel().equals(other.getRequestLabel())) return false;
if (!getSkippedShipmentsList().equals(other.getSkippedShipmentsList())) return false;
if (!getValidationErrorsList().equals(other.getValidationErrorsList())) return false;
if (hasMetrics() != other.hasMetrics()) return false;
if (hasMetrics()) {
if (!getMetrics().equals(other.getMetrics())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getRoutesCount() > 0) {
hash = (37 * hash) + ROUTES_FIELD_NUMBER;
hash = (53 * hash) + getRoutesList().hashCode();
}
hash = (37 * hash) + REQUEST_LABEL_FIELD_NUMBER;
hash = (53 * hash) + getRequestLabel().hashCode();
if (getSkippedShipmentsCount() > 0) {
hash = (37 * hash) + SKIPPED_SHIPMENTS_FIELD_NUMBER;
hash = (53 * hash) + getSkippedShipmentsList().hashCode();
}
if (getValidationErrorsCount() > 0) {
hash = (37 * hash) + VALIDATION_ERRORS_FIELD_NUMBER;
hash = (53 * hash) + getValidationErrorsList().hashCode();
}
if (hasMetrics()) {
hash = (37 * hash) + METRICS_FIELD_NUMBER;
hash = (53 * hash) + getMetrics().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.maps.routeoptimization.v1.OptimizeToursResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* 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 {@code google.maps.routeoptimization.v1.OptimizeToursResponse}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routeoptimization.v1.OptimizeToursResponse)
com.google.maps.routeoptimization.v1.OptimizeToursResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.class,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Builder.class);
}
// Construct using com.google.maps.routeoptimization.v1.OptimizeToursResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getRoutesFieldBuilder();
getSkippedShipmentsFieldBuilder();
getValidationErrorsFieldBuilder();
getMetricsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (routesBuilder_ == null) {
routes_ = java.util.Collections.emptyList();
} else {
routes_ = null;
routesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
requestLabel_ = "";
if (skippedShipmentsBuilder_ == null) {
skippedShipments_ = java.util.Collections.emptyList();
} else {
skippedShipments_ = null;
skippedShipmentsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (validationErrorsBuilder_ == null) {
validationErrors_ = java.util.Collections.emptyList();
} else {
validationErrors_ = null;
validationErrorsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
metrics_ = null;
if (metricsBuilder_ != null) {
metricsBuilder_.dispose();
metricsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routeoptimization.v1.RouteOptimizationServiceProto
.internal_static_google_maps_routeoptimization_v1_OptimizeToursResponse_descriptor;
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse getDefaultInstanceForType() {
return com.google.maps.routeoptimization.v1.OptimizeToursResponse.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse build() {
com.google.maps.routeoptimization.v1.OptimizeToursResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse buildPartial() {
com.google.maps.routeoptimization.v1.OptimizeToursResponse result =
new com.google.maps.routeoptimization.v1.OptimizeToursResponse(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.maps.routeoptimization.v1.OptimizeToursResponse result) {
if (routesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
routes_ = java.util.Collections.unmodifiableList(routes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.routes_ = routes_;
} else {
result.routes_ = routesBuilder_.build();
}
if (skippedShipmentsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
skippedShipments_ = java.util.Collections.unmodifiableList(skippedShipments_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.skippedShipments_ = skippedShipments_;
} else {
result.skippedShipments_ = skippedShipmentsBuilder_.build();
}
if (validationErrorsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
validationErrors_ = java.util.Collections.unmodifiableList(validationErrors_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.validationErrors_ = validationErrors_;
} else {
result.validationErrors_ = validationErrorsBuilder_.build();
}
}
private void buildPartial0(com.google.maps.routeoptimization.v1.OptimizeToursResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.requestLabel_ = requestLabel_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.metrics_ = metricsBuilder_ == null ? metrics_ : metricsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.maps.routeoptimization.v1.OptimizeToursResponse) {
return mergeFrom((com.google.maps.routeoptimization.v1.OptimizeToursResponse) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.routeoptimization.v1.OptimizeToursResponse other) {
if (other == com.google.maps.routeoptimization.v1.OptimizeToursResponse.getDefaultInstance())
return this;
if (routesBuilder_ == null) {
if (!other.routes_.isEmpty()) {
if (routes_.isEmpty()) {
routes_ = other.routes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRoutesIsMutable();
routes_.addAll(other.routes_);
}
onChanged();
}
} else {
if (!other.routes_.isEmpty()) {
if (routesBuilder_.isEmpty()) {
routesBuilder_.dispose();
routesBuilder_ = null;
routes_ = other.routes_;
bitField0_ = (bitField0_ & ~0x00000001);
routesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getRoutesFieldBuilder()
: null;
} else {
routesBuilder_.addAllMessages(other.routes_);
}
}
}
if (!other.getRequestLabel().isEmpty()) {
requestLabel_ = other.requestLabel_;
bitField0_ |= 0x00000002;
onChanged();
}
if (skippedShipmentsBuilder_ == null) {
if (!other.skippedShipments_.isEmpty()) {
if (skippedShipments_.isEmpty()) {
skippedShipments_ = other.skippedShipments_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureSkippedShipmentsIsMutable();
skippedShipments_.addAll(other.skippedShipments_);
}
onChanged();
}
} else {
if (!other.skippedShipments_.isEmpty()) {
if (skippedShipmentsBuilder_.isEmpty()) {
skippedShipmentsBuilder_.dispose();
skippedShipmentsBuilder_ = null;
skippedShipments_ = other.skippedShipments_;
bitField0_ = (bitField0_ & ~0x00000004);
skippedShipmentsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getSkippedShipmentsFieldBuilder()
: null;
} else {
skippedShipmentsBuilder_.addAllMessages(other.skippedShipments_);
}
}
}
if (validationErrorsBuilder_ == null) {
if (!other.validationErrors_.isEmpty()) {
if (validationErrors_.isEmpty()) {
validationErrors_ = other.validationErrors_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureValidationErrorsIsMutable();
validationErrors_.addAll(other.validationErrors_);
}
onChanged();
}
} else {
if (!other.validationErrors_.isEmpty()) {
if (validationErrorsBuilder_.isEmpty()) {
validationErrorsBuilder_.dispose();
validationErrorsBuilder_ = null;
validationErrors_ = other.validationErrors_;
bitField0_ = (bitField0_ & ~0x00000008);
validationErrorsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getValidationErrorsFieldBuilder()
: null;
} else {
validationErrorsBuilder_.addAllMessages(other.validationErrors_);
}
}
}
if (other.hasMetrics()) {
mergeMetrics(other.getMetrics());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.maps.routeoptimization.v1.ShipmentRoute m =
input.readMessage(
com.google.maps.routeoptimization.v1.ShipmentRoute.parser(),
extensionRegistry);
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.add(m);
} else {
routesBuilder_.addMessage(m);
}
break;
} // case 10
case 26:
{
requestLabel_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 26
case 34:
{
com.google.maps.routeoptimization.v1.SkippedShipment m =
input.readMessage(
com.google.maps.routeoptimization.v1.SkippedShipment.parser(),
extensionRegistry);
if (skippedShipmentsBuilder_ == null) {
ensureSkippedShipmentsIsMutable();
skippedShipments_.add(m);
} else {
skippedShipmentsBuilder_.addMessage(m);
}
break;
} // case 34
case 42:
{
com.google.maps.routeoptimization.v1.OptimizeToursValidationError m =
input.readMessage(
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.parser(),
extensionRegistry);
if (validationErrorsBuilder_ == null) {
ensureValidationErrorsIsMutable();
validationErrors_.add(m);
} else {
validationErrorsBuilder_.addMessage(m);
}
break;
} // case 42
case 50:
{
input.readMessage(getMetricsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List routes_ =
java.util.Collections.emptyList();
private void ensureRoutesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
routes_ =
new java.util.ArrayList(routes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.ShipmentRoute,
com.google.maps.routeoptimization.v1.ShipmentRoute.Builder,
com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder>
routesBuilder_;
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public java.util.List getRoutesList() {
if (routesBuilder_ == null) {
return java.util.Collections.unmodifiableList(routes_);
} else {
return routesBuilder_.getMessageList();
}
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public int getRoutesCount() {
if (routesBuilder_ == null) {
return routes_.size();
} else {
return routesBuilder_.getCount();
}
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public com.google.maps.routeoptimization.v1.ShipmentRoute getRoutes(int index) {
if (routesBuilder_ == null) {
return routes_.get(index);
} else {
return routesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder setRoutes(int index, com.google.maps.routeoptimization.v1.ShipmentRoute value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoutesIsMutable();
routes_.set(index, value);
onChanged();
} else {
routesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder setRoutes(
int index, com.google.maps.routeoptimization.v1.ShipmentRoute.Builder builderForValue) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.set(index, builderForValue.build());
onChanged();
} else {
routesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder addRoutes(com.google.maps.routeoptimization.v1.ShipmentRoute value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoutesIsMutable();
routes_.add(value);
onChanged();
} else {
routesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder addRoutes(int index, com.google.maps.routeoptimization.v1.ShipmentRoute value) {
if (routesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoutesIsMutable();
routes_.add(index, value);
onChanged();
} else {
routesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder addRoutes(
com.google.maps.routeoptimization.v1.ShipmentRoute.Builder builderForValue) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.add(builderForValue.build());
onChanged();
} else {
routesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder addRoutes(
int index, com.google.maps.routeoptimization.v1.ShipmentRoute.Builder builderForValue) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.add(index, builderForValue.build());
onChanged();
} else {
routesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder addAllRoutes(
java.lang.Iterable extends com.google.maps.routeoptimization.v1.ShipmentRoute> values) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, routes_);
onChanged();
} else {
routesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder clearRoutes() {
if (routesBuilder_ == null) {
routes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
routesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public Builder removeRoutes(int index) {
if (routesBuilder_ == null) {
ensureRoutesIsMutable();
routes_.remove(index);
onChanged();
} else {
routesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public com.google.maps.routeoptimization.v1.ShipmentRoute.Builder getRoutesBuilder(int index) {
return getRoutesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder getRoutesOrBuilder(
int index) {
if (routesBuilder_ == null) {
return routes_.get(index);
} else {
return routesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public java.util.List extends com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder>
getRoutesOrBuilderList() {
if (routesBuilder_ != null) {
return routesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(routes_);
}
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public com.google.maps.routeoptimization.v1.ShipmentRoute.Builder addRoutesBuilder() {
return getRoutesFieldBuilder()
.addBuilder(com.google.maps.routeoptimization.v1.ShipmentRoute.getDefaultInstance());
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public com.google.maps.routeoptimization.v1.ShipmentRoute.Builder addRoutesBuilder(int index) {
return getRoutesFieldBuilder()
.addBuilder(
index, com.google.maps.routeoptimization.v1.ShipmentRoute.getDefaultInstance());
}
/**
*
*
*
* Routes computed for each vehicle; the i-th route corresponds to the i-th
* vehicle in the model.
*
*
* repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1;
*/
public java.util.List
getRoutesBuilderList() {
return getRoutesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.ShipmentRoute,
com.google.maps.routeoptimization.v1.ShipmentRoute.Builder,
com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder>
getRoutesFieldBuilder() {
if (routesBuilder_ == null) {
routesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.ShipmentRoute,
com.google.maps.routeoptimization.v1.ShipmentRoute.Builder,
com.google.maps.routeoptimization.v1.ShipmentRouteOrBuilder>(
routes_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
routes_ = null;
}
return routesBuilder_;
}
private java.lang.Object requestLabel_ = "";
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @return The requestLabel.
*/
public java.lang.String getRequestLabel() {
java.lang.Object ref = requestLabel_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestLabel_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @return The bytes for requestLabel.
*/
public com.google.protobuf.ByteString getRequestLabelBytes() {
java.lang.Object ref = requestLabel_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
requestLabel_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @param value The requestLabel to set.
* @return This builder for chaining.
*/
public Builder setRequestLabel(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
requestLabel_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @return This builder for chaining.
*/
public Builder clearRequestLabel() {
requestLabel_ = getDefaultInstance().getRequestLabel();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Copy of the
* [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label],
* if a label was specified in the request.
*
*
* string request_label = 3;
*
* @param value The bytes for requestLabel to set.
* @return This builder for chaining.
*/
public Builder setRequestLabelBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
requestLabel_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List skippedShipments_ =
java.util.Collections.emptyList();
private void ensureSkippedShipmentsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
skippedShipments_ =
new java.util.ArrayList(
skippedShipments_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.SkippedShipment,
com.google.maps.routeoptimization.v1.SkippedShipment.Builder,
com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder>
skippedShipmentsBuilder_;
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public java.util.List
getSkippedShipmentsList() {
if (skippedShipmentsBuilder_ == null) {
return java.util.Collections.unmodifiableList(skippedShipments_);
} else {
return skippedShipmentsBuilder_.getMessageList();
}
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public int getSkippedShipmentsCount() {
if (skippedShipmentsBuilder_ == null) {
return skippedShipments_.size();
} else {
return skippedShipmentsBuilder_.getCount();
}
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public com.google.maps.routeoptimization.v1.SkippedShipment getSkippedShipments(int index) {
if (skippedShipmentsBuilder_ == null) {
return skippedShipments_.get(index);
} else {
return skippedShipmentsBuilder_.getMessage(index);
}
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder setSkippedShipments(
int index, com.google.maps.routeoptimization.v1.SkippedShipment value) {
if (skippedShipmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSkippedShipmentsIsMutable();
skippedShipments_.set(index, value);
onChanged();
} else {
skippedShipmentsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder setSkippedShipments(
int index, com.google.maps.routeoptimization.v1.SkippedShipment.Builder builderForValue) {
if (skippedShipmentsBuilder_ == null) {
ensureSkippedShipmentsIsMutable();
skippedShipments_.set(index, builderForValue.build());
onChanged();
} else {
skippedShipmentsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder addSkippedShipments(com.google.maps.routeoptimization.v1.SkippedShipment value) {
if (skippedShipmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSkippedShipmentsIsMutable();
skippedShipments_.add(value);
onChanged();
} else {
skippedShipmentsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder addSkippedShipments(
int index, com.google.maps.routeoptimization.v1.SkippedShipment value) {
if (skippedShipmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSkippedShipmentsIsMutable();
skippedShipments_.add(index, value);
onChanged();
} else {
skippedShipmentsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder addSkippedShipments(
com.google.maps.routeoptimization.v1.SkippedShipment.Builder builderForValue) {
if (skippedShipmentsBuilder_ == null) {
ensureSkippedShipmentsIsMutable();
skippedShipments_.add(builderForValue.build());
onChanged();
} else {
skippedShipmentsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder addSkippedShipments(
int index, com.google.maps.routeoptimization.v1.SkippedShipment.Builder builderForValue) {
if (skippedShipmentsBuilder_ == null) {
ensureSkippedShipmentsIsMutable();
skippedShipments_.add(index, builderForValue.build());
onChanged();
} else {
skippedShipmentsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder addAllSkippedShipments(
java.lang.Iterable extends com.google.maps.routeoptimization.v1.SkippedShipment> values) {
if (skippedShipmentsBuilder_ == null) {
ensureSkippedShipmentsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skippedShipments_);
onChanged();
} else {
skippedShipmentsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder clearSkippedShipments() {
if (skippedShipmentsBuilder_ == null) {
skippedShipments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
skippedShipmentsBuilder_.clear();
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public Builder removeSkippedShipments(int index) {
if (skippedShipmentsBuilder_ == null) {
ensureSkippedShipmentsIsMutable();
skippedShipments_.remove(index);
onChanged();
} else {
skippedShipmentsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public com.google.maps.routeoptimization.v1.SkippedShipment.Builder getSkippedShipmentsBuilder(
int index) {
return getSkippedShipmentsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder
getSkippedShipmentsOrBuilder(int index) {
if (skippedShipmentsBuilder_ == null) {
return skippedShipments_.get(index);
} else {
return skippedShipmentsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public java.util.List extends com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder>
getSkippedShipmentsOrBuilderList() {
if (skippedShipmentsBuilder_ != null) {
return skippedShipmentsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(skippedShipments_);
}
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public com.google.maps.routeoptimization.v1.SkippedShipment.Builder
addSkippedShipmentsBuilder() {
return getSkippedShipmentsFieldBuilder()
.addBuilder(com.google.maps.routeoptimization.v1.SkippedShipment.getDefaultInstance());
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public com.google.maps.routeoptimization.v1.SkippedShipment.Builder addSkippedShipmentsBuilder(
int index) {
return getSkippedShipmentsFieldBuilder()
.addBuilder(
index, com.google.maps.routeoptimization.v1.SkippedShipment.getDefaultInstance());
}
/**
*
*
*
* The list of all shipments skipped.
*
*
* repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4;
*
*/
public java.util.List
getSkippedShipmentsBuilderList() {
return getSkippedShipmentsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.SkippedShipment,
com.google.maps.routeoptimization.v1.SkippedShipment.Builder,
com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder>
getSkippedShipmentsFieldBuilder() {
if (skippedShipmentsBuilder_ == null) {
skippedShipmentsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.SkippedShipment,
com.google.maps.routeoptimization.v1.SkippedShipment.Builder,
com.google.maps.routeoptimization.v1.SkippedShipmentOrBuilder>(
skippedShipments_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
skippedShipments_ = null;
}
return skippedShipmentsBuilder_;
}
private java.util.List
validationErrors_ = java.util.Collections.emptyList();
private void ensureValidationErrorsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
validationErrors_ =
new java.util.ArrayList<
com.google.maps.routeoptimization.v1.OptimizeToursValidationError>(
validationErrors_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.OptimizeToursValidationError,
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder,
com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder>
validationErrorsBuilder_;
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public java.util.List
getValidationErrorsList() {
if (validationErrorsBuilder_ == null) {
return java.util.Collections.unmodifiableList(validationErrors_);
} else {
return validationErrorsBuilder_.getMessageList();
}
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public int getValidationErrorsCount() {
if (validationErrorsBuilder_ == null) {
return validationErrors_.size();
} else {
return validationErrorsBuilder_.getCount();
}
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public com.google.maps.routeoptimization.v1.OptimizeToursValidationError getValidationErrors(
int index) {
if (validationErrorsBuilder_ == null) {
return validationErrors_.get(index);
} else {
return validationErrorsBuilder_.getMessage(index);
}
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder setValidationErrors(
int index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError value) {
if (validationErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValidationErrorsIsMutable();
validationErrors_.set(index, value);
onChanged();
} else {
validationErrorsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder setValidationErrors(
int index,
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder builderForValue) {
if (validationErrorsBuilder_ == null) {
ensureValidationErrorsIsMutable();
validationErrors_.set(index, builderForValue.build());
onChanged();
} else {
validationErrorsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder addValidationErrors(
com.google.maps.routeoptimization.v1.OptimizeToursValidationError value) {
if (validationErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValidationErrorsIsMutable();
validationErrors_.add(value);
onChanged();
} else {
validationErrorsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder addValidationErrors(
int index, com.google.maps.routeoptimization.v1.OptimizeToursValidationError value) {
if (validationErrorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureValidationErrorsIsMutable();
validationErrors_.add(index, value);
onChanged();
} else {
validationErrorsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder addValidationErrors(
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder builderForValue) {
if (validationErrorsBuilder_ == null) {
ensureValidationErrorsIsMutable();
validationErrors_.add(builderForValue.build());
onChanged();
} else {
validationErrorsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder addValidationErrors(
int index,
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder builderForValue) {
if (validationErrorsBuilder_ == null) {
ensureValidationErrorsIsMutable();
validationErrors_.add(index, builderForValue.build());
onChanged();
} else {
validationErrorsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder addAllValidationErrors(
java.lang.Iterable<
? extends com.google.maps.routeoptimization.v1.OptimizeToursValidationError>
values) {
if (validationErrorsBuilder_ == null) {
ensureValidationErrorsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, validationErrors_);
onChanged();
} else {
validationErrorsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder clearValidationErrors() {
if (validationErrorsBuilder_ == null) {
validationErrors_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
validationErrorsBuilder_.clear();
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public Builder removeValidationErrors(int index) {
if (validationErrorsBuilder_ == null) {
ensureValidationErrorsIsMutable();
validationErrors_.remove(index);
onChanged();
} else {
validationErrorsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder
getValidationErrorsBuilder(int index) {
return getValidationErrorsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder
getValidationErrorsOrBuilder(int index) {
if (validationErrorsBuilder_ == null) {
return validationErrors_.get(index);
} else {
return validationErrorsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public java.util.List<
? extends com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder>
getValidationErrorsOrBuilderList() {
if (validationErrorsBuilder_ != null) {
return validationErrorsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(validationErrors_);
}
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder
addValidationErrorsBuilder() {
return getValidationErrorsFieldBuilder()
.addBuilder(
com.google.maps.routeoptimization.v1.OptimizeToursValidationError
.getDefaultInstance());
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder
addValidationErrorsBuilder(int index) {
return getValidationErrorsFieldBuilder()
.addBuilder(
index,
com.google.maps.routeoptimization.v1.OptimizeToursValidationError
.getDefaultInstance());
}
/**
*
*
*
* List of all the validation errors that we were able to detect
* independently. See the "MULTIPLE ERRORS" explanation for the
* [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
* message. Instead of errors, this will include warnings in the case
* `solving_mode` is `DEFAULT_SOLVE`.
*
*
*
* repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5;
*
*/
public java.util.List
getValidationErrorsBuilderList() {
return getValidationErrorsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.OptimizeToursValidationError,
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder,
com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder>
getValidationErrorsFieldBuilder() {
if (validationErrorsBuilder_ == null) {
validationErrorsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routeoptimization.v1.OptimizeToursValidationError,
com.google.maps.routeoptimization.v1.OptimizeToursValidationError.Builder,
com.google.maps.routeoptimization.v1.OptimizeToursValidationErrorOrBuilder>(
validationErrors_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
validationErrors_ = null;
}
return validationErrorsBuilder_;
}
private com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.MetricsOrBuilder>
metricsBuilder_;
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*
* @return Whether the metrics field is set.
*/
public boolean hasMetrics() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*
* @return The metrics.
*/
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics getMetrics() {
if (metricsBuilder_ == null) {
return metrics_ == null
? com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
.getDefaultInstance()
: metrics_;
} else {
return metricsBuilder_.getMessage();
}
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
public Builder setMetrics(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics value) {
if (metricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metrics_ = value;
} else {
metricsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
public Builder setMetrics(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder
builderForValue) {
if (metricsBuilder_ == null) {
metrics_ = builderForValue.build();
} else {
metricsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
public Builder mergeMetrics(
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics value) {
if (metricsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& metrics_ != null
&& metrics_
!= com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
.getDefaultInstance()) {
getMetricsBuilder().mergeFrom(value);
} else {
metrics_ = value;
}
} else {
metricsBuilder_.mergeFrom(value);
}
if (metrics_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
public Builder clearMetrics() {
bitField0_ = (bitField0_ & ~0x00000010);
metrics_ = null;
if (metricsBuilder_ != null) {
metricsBuilder_.dispose();
metricsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder
getMetricsBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getMetricsFieldBuilder().getBuilder();
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
public com.google.maps.routeoptimization.v1.OptimizeToursResponse.MetricsOrBuilder
getMetricsOrBuilder() {
if (metricsBuilder_ != null) {
return metricsBuilder_.getMessageOrBuilder();
} else {
return metrics_ == null
? com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics
.getDefaultInstance()
: metrics_;
}
}
/**
*
*
*
* Duration, distance and usage metrics for this solution.
*
*
* .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.MetricsOrBuilder>
getMetricsFieldBuilder() {
if (metricsBuilder_ == null) {
metricsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics.Builder,
com.google.maps.routeoptimization.v1.OptimizeToursResponse.MetricsOrBuilder>(
getMetrics(), getParentForChildren(), isClean());
metrics_ = null;
}
return metricsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.maps.routeoptimization.v1.OptimizeToursResponse)
}
// @@protoc_insertion_point(class_scope:google.maps.routeoptimization.v1.OptimizeToursResponse)
private static final com.google.maps.routeoptimization.v1.OptimizeToursResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routeoptimization.v1.OptimizeToursResponse();
}
public static com.google.maps.routeoptimization.v1.OptimizeToursResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OptimizeToursResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.maps.routeoptimization.v1.OptimizeToursResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy