Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ private AggregatedMetrics(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -637,7 +639,7 @@ public int getMaxLoadsCount() {
@java.lang.Override
public boolean containsMaxLoads(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetMaxLoads().getMap().containsKey(key);
}
Expand Down Expand Up @@ -688,7 +690,7 @@ public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrD
java.lang.String key,
com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
map = internalGetMaxLoads().getMap();
Expand All @@ -713,7 +715,7 @@ public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrD
public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(
java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
map = internalGetMaxLoads().getMap();
Expand Down Expand Up @@ -762,7 +764,7 @@ public int getCostsCount() {
@java.lang.Override
public boolean containsCosts(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetCosts().getMap().containsKey(key);
}
Expand Down Expand Up @@ -799,7 +801,7 @@ public java.util.Map<java.lang.String, java.lang.Double> getCostsMap() {
@java.lang.Deprecated
public double getCostsOrDefault(java.lang.String key, double defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -817,7 +819,7 @@ public double getCostsOrDefault(java.lang.String key, double defaultValue) {
@java.lang.Deprecated
public double getCostsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
if (!map.containsKey(key)) {
Expand All @@ -837,6 +839,8 @@ public double getCostsOrThrow(java.lang.String key) {
*
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2206
* @return The totalCost.
*/
@java.lang.Override
Expand Down Expand Up @@ -880,14 +884,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (totalDuration_ != null) {
output.writeMessage(7, getTotalDuration());
}
if (travelDistanceMeters_ != 0D) {
if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) {
output.writeDouble(8, travelDistanceMeters_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetMaxLoads(), MaxLoadsDefaultEntryHolder.defaultEntry, 9);
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetCosts(), CostsDefaultEntryHolder.defaultEntry, 10);
if (totalCost_ != 0D) {
if (java.lang.Double.doubleToRawLongBits(totalCost_) != 0) {
output.writeDouble(11, totalCost_);
}
unknownFields.writeTo(output);
Expand Down Expand Up @@ -920,7 +924,7 @@ public int getSerializedSize() {
if (totalDuration_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTotalDuration());
}
if (travelDistanceMeters_ != 0D) {
if (java.lang.Double.doubleToRawLongBits(travelDistanceMeters_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, travelDistanceMeters_);
}
for (java.util.Map.Entry<
Expand All @@ -946,7 +950,7 @@ public int getSerializedSize() {
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, costs__);
}
if (totalCost_ != 0D) {
if (java.lang.Double.doubleToRawLongBits(totalCost_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(11, totalCost_);
}
size += unknownFields.getSerializedSize();
Expand Down Expand Up @@ -2728,7 +2732,7 @@ public int getMaxLoadsCount() {
@java.lang.Override
public boolean containsMaxLoads(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetMaxLoads().getMap().containsKey(key);
}
Expand Down Expand Up @@ -2783,7 +2787,7 @@ public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrD
java.lang.String key,
com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
map = internalGetMaxLoads().getMap();
Expand All @@ -2809,7 +2813,7 @@ public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrD
public com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(
java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad>
map = internalGetMaxLoads().getMap();
Expand Down Expand Up @@ -2841,7 +2845,7 @@ public Builder clearMaxLoads() {
*/
public Builder removeMaxLoads(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableMaxLoads().getMutableMap().remove(key);
return this;
Expand Down Expand Up @@ -2872,11 +2876,12 @@ public Builder removeMaxLoads(java.lang.String key) {
public Builder putMaxLoads(
java.lang.String key, com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad value) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
if (value == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map value");
}

internalGetMutableMaxLoads().getMutableMap().put(key, value);
return this;
}
Expand Down Expand Up @@ -2942,7 +2947,7 @@ public int getCostsCount() {
@java.lang.Override
public boolean containsCosts(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
return internalGetCosts().getMap().containsKey(key);
}
Expand Down Expand Up @@ -2979,7 +2984,7 @@ public java.util.Map<java.lang.String, java.lang.Double> getCostsMap() {
@java.lang.Deprecated
public double getCostsOrDefault(java.lang.String key, double defaultValue) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
Expand All @@ -2997,7 +3002,7 @@ public double getCostsOrDefault(java.lang.String key, double defaultValue) {
@java.lang.Deprecated
public double getCostsOrThrow(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
java.util.Map<java.lang.String, java.lang.Double> map = internalGetCosts().getMap();
if (!map.containsKey(key)) {
Expand All @@ -3023,7 +3028,7 @@ public Builder clearCosts() {
@java.lang.Deprecated
public Builder removeCosts(java.lang.String key) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}
internalGetMutableCosts().getMutableMap().remove(key);
return this;
Expand All @@ -3045,7 +3050,7 @@ public java.util.Map<java.lang.String, java.lang.Double> getMutableCosts() {
@java.lang.Deprecated
public Builder putCosts(java.lang.String key, double value) {
if (key == null) {
throw new java.lang.NullPointerException();
throw new NullPointerException("map key");
}

internalGetMutableCosts().getMutableMap().put(key, value);
Expand Down Expand Up @@ -3076,6 +3081,8 @@ public Builder putAllCosts(java.util.Map<java.lang.String, java.lang.Double> val
*
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2206
* @return The totalCost.
*/
@java.lang.Override
Expand All @@ -3092,6 +3099,8 @@ public double getTotalCost() {
*
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2206
* @param value The totalCost to set.
* @return This builder for chaining.
*/
Expand All @@ -3111,6 +3120,8 @@ public Builder setTotalCost(double value) {
*
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2206
* @return This builder for chaining.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,11 @@ public interface AggregatedMetricsOrBuilder
* <code>map&lt;string, .google.cloud.optimization.v1.ShipmentRoute.VehicleLoad&gt; max_loads = 9;
* </code>
*/

/* nullable */
com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrDefault(
java.lang.String key,
/* nullable */
com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad defaultValue);
/**
*
Expand Down Expand Up @@ -423,6 +426,8 @@ com.google.cloud.optimization.v1.ShipmentRoute.VehicleLoad getMaxLoadsOrThrow(
*
* <code>double total_cost = 11 [deprecated = true];</code>
*
* @deprecated google.cloud.optimization.v1.AggregatedMetrics.total_cost is deprecated. See
* google/cloud/optimization/v1/fleet_routing.proto;l=2206
* @return The totalCost.
*/
@java.lang.Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ private AsyncModelMetadata(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ private BatchOptimizeToursRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -377,6 +379,8 @@ private AsyncModelConfig(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ private BatchOptimizeToursResponse(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ private BreakRule(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -383,6 +385,8 @@ private BreakRequest(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -1829,6 +1833,8 @@ private FrequencyConstraint(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ private CapacityQuantity(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ private CapacityQuantityInterval(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ private DistanceLimit(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ private GcsDestination(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ private GcsSource(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ private InjectedSolutionConstraint(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -411,6 +413,8 @@ private ConstraintRelaxation(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
Expand Down Expand Up @@ -654,6 +658,8 @@ private Relaxation(
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(this);
Expand Down
Loading