com.google.maps.routing.v2.RouteMatrixElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-maps-routing-v2 Show documentation
Show all versions of proto-google-maps-routing-v2 Show documentation
Proto library for google-maps-routing
/*
* 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/routing/v2/routes_service.proto
// Protobuf Java Version: 3.25.5
package com.google.maps.routing.v2;
/**
*
*
*
* Contains route information computed for an origin/destination pair in the
* ComputeRouteMatrix API. This proto can be streamed to the client.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteMatrixElement}
*/
public final class RouteMatrixElement extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routing.v2.RouteMatrixElement)
RouteMatrixElementOrBuilder {
private static final long serialVersionUID = 0L;
// Use RouteMatrixElement.newBuilder() to construct.
private RouteMatrixElement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RouteMatrixElement() {
condition_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RouteMatrixElement();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteMatrixElement.class,
com.google.maps.routing.v2.RouteMatrixElement.Builder.class);
}
public interface LocalizedValuesOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.routing.v2.RouteMatrixElement.LocalizedValues)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*
* @return Whether the distance field is set.
*/
boolean hasDistance();
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*
* @return The distance.
*/
com.google.type.LocalizedText getDistance();
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
com.google.type.LocalizedTextOrBuilder getDistanceOrBuilder();
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return Whether the duration field is set.
*/
boolean hasDuration();
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return The duration.
*/
com.google.type.LocalizedText getDuration();
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
com.google.type.LocalizedTextOrBuilder getDurationOrBuilder();
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
boolean hasStaticDuration();
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return The staticDuration.
*/
com.google.type.LocalizedText getStaticDuration();
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
com.google.type.LocalizedTextOrBuilder getStaticDurationOrBuilder();
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*
* @return Whether the transitFare field is set.
*/
boolean hasTransitFare();
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*
* @return The transitFare.
*/
com.google.type.LocalizedText getTransitFare();
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
com.google.type.LocalizedTextOrBuilder getTransitFareOrBuilder();
}
/**
*
*
*
* Text representations of certain properties.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteMatrixElement.LocalizedValues}
*/
public static final class LocalizedValues extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routing.v2.RouteMatrixElement.LocalizedValues)
LocalizedValuesOrBuilder {
private static final long serialVersionUID = 0L;
// Use LocalizedValues.newBuilder() to construct.
private LocalizedValues(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LocalizedValues() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LocalizedValues();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_LocalizedValues_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_LocalizedValues_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.class,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder.class);
}
private int bitField0_;
public static final int DISTANCE_FIELD_NUMBER = 1;
private com.google.type.LocalizedText distance_;
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*
* @return Whether the distance field is set.
*/
@java.lang.Override
public boolean hasDistance() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*
* @return The distance.
*/
@java.lang.Override
public com.google.type.LocalizedText getDistance() {
return distance_ == null ? com.google.type.LocalizedText.getDefaultInstance() : distance_;
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getDistanceOrBuilder() {
return distance_ == null ? com.google.type.LocalizedText.getDefaultInstance() : distance_;
}
public static final int DURATION_FIELD_NUMBER = 2;
private com.google.type.LocalizedText duration_;
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return Whether the duration field is set.
*/
@java.lang.Override
public boolean hasDuration() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return The duration.
*/
@java.lang.Override
public com.google.type.LocalizedText getDuration() {
return duration_ == null ? com.google.type.LocalizedText.getDefaultInstance() : duration_;
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getDurationOrBuilder() {
return duration_ == null ? com.google.type.LocalizedText.getDefaultInstance() : duration_;
}
public static final int STATIC_DURATION_FIELD_NUMBER = 3;
private com.google.type.LocalizedText staticDuration_;
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
@java.lang.Override
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return The staticDuration.
*/
@java.lang.Override
public com.google.type.LocalizedText getStaticDuration() {
return staticDuration_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: staticDuration_;
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getStaticDurationOrBuilder() {
return staticDuration_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: staticDuration_;
}
public static final int TRANSIT_FARE_FIELD_NUMBER = 4;
private com.google.type.LocalizedText transitFare_;
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*
* @return Whether the transitFare field is set.
*/
@java.lang.Override
public boolean hasTransitFare() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*
* @return The transitFare.
*/
@java.lang.Override
public com.google.type.LocalizedText getTransitFare() {
return transitFare_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: transitFare_;
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getTransitFareOrBuilder() {
return transitFare_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: transitFare_;
}
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, getDistance());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getDuration());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getStaticDuration());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(4, getTransitFare());
}
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, getDistance());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDuration());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStaticDuration());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTransitFare());
}
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.routing.v2.RouteMatrixElement.LocalizedValues)) {
return super.equals(obj);
}
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues other =
(com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues) obj;
if (hasDistance() != other.hasDistance()) return false;
if (hasDistance()) {
if (!getDistance().equals(other.getDistance())) return false;
}
if (hasDuration() != other.hasDuration()) return false;
if (hasDuration()) {
if (!getDuration().equals(other.getDuration())) return false;
}
if (hasStaticDuration() != other.hasStaticDuration()) return false;
if (hasStaticDuration()) {
if (!getStaticDuration().equals(other.getStaticDuration())) return false;
}
if (hasTransitFare() != other.hasTransitFare()) return false;
if (hasTransitFare()) {
if (!getTransitFare().equals(other.getTransitFare())) 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 (hasDistance()) {
hash = (37 * hash) + DISTANCE_FIELD_NUMBER;
hash = (53 * hash) + getDistance().hashCode();
}
if (hasDuration()) {
hash = (37 * hash) + DURATION_FIELD_NUMBER;
hash = (53 * hash) + getDuration().hashCode();
}
if (hasStaticDuration()) {
hash = (37 * hash) + STATIC_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getStaticDuration().hashCode();
}
if (hasTransitFare()) {
hash = (37 * hash) + TRANSIT_FARE_FIELD_NUMBER;
hash = (53 * hash) + getTransitFare().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues 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.routing.v2.RouteMatrixElement.LocalizedValues parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues 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.routing.v2.RouteMatrixElement.LocalizedValues parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues 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.routing.v2.RouteMatrixElement.LocalizedValues parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues 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.routing.v2.RouteMatrixElement.LocalizedValues parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues 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.routing.v2.RouteMatrixElement.LocalizedValues 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;
}
/**
*
*
*
* Text representations of certain properties.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteMatrixElement.LocalizedValues}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routing.v2.RouteMatrixElement.LocalizedValues)
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValuesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_LocalizedValues_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_LocalizedValues_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.class,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder.class);
}
// Construct using com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getDistanceFieldBuilder();
getDurationFieldBuilder();
getStaticDurationFieldBuilder();
getTransitFareFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
distance_ = null;
if (distanceBuilder_ != null) {
distanceBuilder_.dispose();
distanceBuilder_ = null;
}
duration_ = null;
if (durationBuilder_ != null) {
durationBuilder_.dispose();
durationBuilder_ = null;
}
staticDuration_ = null;
if (staticDurationBuilder_ != null) {
staticDurationBuilder_.dispose();
staticDurationBuilder_ = null;
}
transitFare_ = null;
if (transitFareBuilder_ != null) {
transitFareBuilder_.dispose();
transitFareBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_LocalizedValues_descriptor;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues
getDefaultInstanceForType() {
return com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues build() {
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues buildPartial() {
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues result =
new com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.distance_ = distanceBuilder_ == null ? distance_ : distanceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.staticDuration_ =
staticDurationBuilder_ == null ? staticDuration_ : staticDurationBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.transitFare_ =
transitFareBuilder_ == null ? transitFare_ : transitFareBuilder_.build();
to_bitField0_ |= 0x00000008;
}
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.routing.v2.RouteMatrixElement.LocalizedValues) {
return mergeFrom((com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues other) {
if (other
== com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.getDefaultInstance())
return this;
if (other.hasDistance()) {
mergeDistance(other.getDistance());
}
if (other.hasDuration()) {
mergeDuration(other.getDuration());
}
if (other.hasStaticDuration()) {
mergeStaticDuration(other.getStaticDuration());
}
if (other.hasTransitFare()) {
mergeTransitFare(other.getTransitFare());
}
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(getDistanceFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(
getStaticDurationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getTransitFareFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
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.type.LocalizedText distance_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
distanceBuilder_;
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*
* @return Whether the distance field is set.
*/
public boolean hasDistance() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*
* @return The distance.
*/
public com.google.type.LocalizedText getDistance() {
if (distanceBuilder_ == null) {
return distance_ == null ? com.google.type.LocalizedText.getDefaultInstance() : distance_;
} else {
return distanceBuilder_.getMessage();
}
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
public Builder setDistance(com.google.type.LocalizedText value) {
if (distanceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
distance_ = value;
} else {
distanceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
public Builder setDistance(com.google.type.LocalizedText.Builder builderForValue) {
if (distanceBuilder_ == null) {
distance_ = builderForValue.build();
} else {
distanceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
public Builder mergeDistance(com.google.type.LocalizedText value) {
if (distanceBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& distance_ != null
&& distance_ != com.google.type.LocalizedText.getDefaultInstance()) {
getDistanceBuilder().mergeFrom(value);
} else {
distance_ = value;
}
} else {
distanceBuilder_.mergeFrom(value);
}
if (distance_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
public Builder clearDistance() {
bitField0_ = (bitField0_ & ~0x00000001);
distance_ = null;
if (distanceBuilder_ != null) {
distanceBuilder_.dispose();
distanceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
public com.google.type.LocalizedText.Builder getDistanceBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getDistanceFieldBuilder().getBuilder();
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
public com.google.type.LocalizedTextOrBuilder getDistanceOrBuilder() {
if (distanceBuilder_ != null) {
return distanceBuilder_.getMessageOrBuilder();
} else {
return distance_ == null ? com.google.type.LocalizedText.getDefaultInstance() : distance_;
}
}
/**
*
*
*
* Travel distance represented in text form.
*
*
* .google.type.LocalizedText distance = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
getDistanceFieldBuilder() {
if (distanceBuilder_ == null) {
distanceBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>(
getDistance(), getParentForChildren(), isClean());
distance_ = null;
}
return distanceBuilder_;
}
private com.google.type.LocalizedText duration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
durationBuilder_;
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return Whether the duration field is set.
*/
public boolean hasDuration() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return The duration.
*/
public com.google.type.LocalizedText getDuration() {
if (durationBuilder_ == null) {
return duration_ == null ? com.google.type.LocalizedText.getDefaultInstance() : duration_;
} else {
return durationBuilder_.getMessage();
}
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
public Builder setDuration(com.google.type.LocalizedText value) {
if (durationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
duration_ = value;
} else {
durationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
public Builder setDuration(com.google.type.LocalizedText.Builder builderForValue) {
if (durationBuilder_ == null) {
duration_ = builderForValue.build();
} else {
durationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
public Builder mergeDuration(com.google.type.LocalizedText value) {
if (durationBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& duration_ != null
&& duration_ != com.google.type.LocalizedText.getDefaultInstance()) {
getDurationBuilder().mergeFrom(value);
} else {
duration_ = value;
}
} else {
durationBuilder_.mergeFrom(value);
}
if (duration_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
public Builder clearDuration() {
bitField0_ = (bitField0_ & ~0x00000002);
duration_ = null;
if (durationBuilder_ != null) {
durationBuilder_.dispose();
durationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
public com.google.type.LocalizedText.Builder getDurationBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
public com.google.type.LocalizedTextOrBuilder getDurationOrBuilder() {
if (durationBuilder_ != null) {
return durationBuilder_.getMessageOrBuilder();
} else {
return duration_ == null ? com.google.type.LocalizedText.getDefaultInstance() : duration_;
}
}
/**
*
*
*
* Duration represented in text form taking traffic conditions into
* consideration. Note: If traffic information was not requested, this value
* is the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
getDurationFieldBuilder() {
if (durationBuilder_ == null) {
durationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>(
getDuration(), getParentForChildren(), isClean());
duration_ = null;
}
return durationBuilder_;
}
private com.google.type.LocalizedText staticDuration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
staticDurationBuilder_;
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return The staticDuration.
*/
public com.google.type.LocalizedText getStaticDuration() {
if (staticDurationBuilder_ == null) {
return staticDuration_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: staticDuration_;
} else {
return staticDurationBuilder_.getMessage();
}
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public Builder setStaticDuration(com.google.type.LocalizedText value) {
if (staticDurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
staticDuration_ = value;
} else {
staticDurationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public Builder setStaticDuration(com.google.type.LocalizedText.Builder builderForValue) {
if (staticDurationBuilder_ == null) {
staticDuration_ = builderForValue.build();
} else {
staticDurationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public Builder mergeStaticDuration(com.google.type.LocalizedText value) {
if (staticDurationBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& staticDuration_ != null
&& staticDuration_ != com.google.type.LocalizedText.getDefaultInstance()) {
getStaticDurationBuilder().mergeFrom(value);
} else {
staticDuration_ = value;
}
} else {
staticDurationBuilder_.mergeFrom(value);
}
if (staticDuration_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public Builder clearStaticDuration() {
bitField0_ = (bitField0_ & ~0x00000004);
staticDuration_ = null;
if (staticDurationBuilder_ != null) {
staticDurationBuilder_.dispose();
staticDurationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public com.google.type.LocalizedText.Builder getStaticDurationBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getStaticDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public com.google.type.LocalizedTextOrBuilder getStaticDurationOrBuilder() {
if (staticDurationBuilder_ != null) {
return staticDurationBuilder_.getMessageOrBuilder();
} else {
return staticDuration_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: staticDuration_;
}
}
/**
*
*
*
* Duration represented in text form without taking traffic conditions into
* consideration.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
getStaticDurationFieldBuilder() {
if (staticDurationBuilder_ == null) {
staticDurationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>(
getStaticDuration(), getParentForChildren(), isClean());
staticDuration_ = null;
}
return staticDurationBuilder_;
}
private com.google.type.LocalizedText transitFare_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
transitFareBuilder_;
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*
* @return Whether the transitFare field is set.
*/
public boolean hasTransitFare() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*
* @return The transitFare.
*/
public com.google.type.LocalizedText getTransitFare() {
if (transitFareBuilder_ == null) {
return transitFare_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: transitFare_;
} else {
return transitFareBuilder_.getMessage();
}
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
public Builder setTransitFare(com.google.type.LocalizedText value) {
if (transitFareBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
transitFare_ = value;
} else {
transitFareBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
public Builder setTransitFare(com.google.type.LocalizedText.Builder builderForValue) {
if (transitFareBuilder_ == null) {
transitFare_ = builderForValue.build();
} else {
transitFareBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
public Builder mergeTransitFare(com.google.type.LocalizedText value) {
if (transitFareBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& transitFare_ != null
&& transitFare_ != com.google.type.LocalizedText.getDefaultInstance()) {
getTransitFareBuilder().mergeFrom(value);
} else {
transitFare_ = value;
}
} else {
transitFareBuilder_.mergeFrom(value);
}
if (transitFare_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
public Builder clearTransitFare() {
bitField0_ = (bitField0_ & ~0x00000008);
transitFare_ = null;
if (transitFareBuilder_ != null) {
transitFareBuilder_.dispose();
transitFareBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
public com.google.type.LocalizedText.Builder getTransitFareBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getTransitFareFieldBuilder().getBuilder();
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
public com.google.type.LocalizedTextOrBuilder getTransitFareOrBuilder() {
if (transitFareBuilder_ != null) {
return transitFareBuilder_.getMessageOrBuilder();
} else {
return transitFare_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: transitFare_;
}
}
/**
*
*
*
* Transit fare represented in text form.
*
*
* .google.type.LocalizedText transit_fare = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>
getTransitFareFieldBuilder() {
if (transitFareBuilder_ == null) {
transitFareBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LocalizedText,
com.google.type.LocalizedText.Builder,
com.google.type.LocalizedTextOrBuilder>(
getTransitFare(), getParentForChildren(), isClean());
transitFare_ = null;
}
return transitFareBuilder_;
}
@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.routing.v2.RouteMatrixElement.LocalizedValues)
}
// @@protoc_insertion_point(class_scope:google.maps.routing.v2.RouteMatrixElement.LocalizedValues)
private static final com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues();
}
public static com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LocalizedValues 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.routing.v2.RouteMatrixElement.LocalizedValues
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int ORIGIN_INDEX_FIELD_NUMBER = 1;
private int originIndex_ = 0;
/**
*
*
*
* Zero-based index of the origin in the request.
*
*
* optional int32 origin_index = 1;
*
* @return Whether the originIndex field is set.
*/
@java.lang.Override
public boolean hasOriginIndex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Zero-based index of the origin in the request.
*
*
* optional int32 origin_index = 1;
*
* @return The originIndex.
*/
@java.lang.Override
public int getOriginIndex() {
return originIndex_;
}
public static final int DESTINATION_INDEX_FIELD_NUMBER = 2;
private int destinationIndex_ = 0;
/**
*
*
*
* Zero-based index of the destination in the request.
*
*
* optional int32 destination_index = 2;
*
* @return Whether the destinationIndex field is set.
*/
@java.lang.Override
public boolean hasDestinationIndex() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Zero-based index of the destination in the request.
*
*
* optional int32 destination_index = 2;
*
* @return The destinationIndex.
*/
@java.lang.Override
public int getDestinationIndex() {
return destinationIndex_;
}
public static final int STATUS_FIELD_NUMBER = 3;
private com.google.rpc.Status status_;
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*
* @return The status.
*/
@java.lang.Override
public com.google.rpc.Status getStatus() {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
@java.lang.Override
public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
public static final int CONDITION_FIELD_NUMBER = 9;
private int condition_ = 0;
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @return The enum numeric value on the wire for condition.
*/
@java.lang.Override
public int getConditionValue() {
return condition_;
}
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @return The condition.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElementCondition getCondition() {
com.google.maps.routing.v2.RouteMatrixElementCondition result =
com.google.maps.routing.v2.RouteMatrixElementCondition.forNumber(condition_);
return result == null
? com.google.maps.routing.v2.RouteMatrixElementCondition.UNRECOGNIZED
: result;
}
public static final int DISTANCE_METERS_FIELD_NUMBER = 4;
private int distanceMeters_ = 0;
/**
*
*
*
* The travel distance of the route, in meters.
*
*
* int32 distance_meters = 4;
*
* @return The distanceMeters.
*/
@java.lang.Override
public int getDistanceMeters() {
return distanceMeters_;
}
public static final int DURATION_FIELD_NUMBER = 5;
private com.google.protobuf.Duration duration_;
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*
* @return Whether the duration field is set.
*/
@java.lang.Override
public boolean hasDuration() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*
* @return The duration.
*/
@java.lang.Override
public com.google.protobuf.Duration getDuration() {
return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
}
public static final int STATIC_DURATION_FIELD_NUMBER = 6;
private com.google.protobuf.Duration staticDuration_;
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*
* @return Whether the staticDuration field is set.
*/
@java.lang.Override
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*
* @return The staticDuration.
*/
@java.lang.Override
public com.google.protobuf.Duration getStaticDuration() {
return staticDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: staticDuration_;
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder() {
return staticDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: staticDuration_;
}
public static final int TRAVEL_ADVISORY_FIELD_NUMBER = 7;
private com.google.maps.routing.v2.RouteTravelAdvisory travelAdvisory_;
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*
* @return Whether the travelAdvisory field is set.
*/
@java.lang.Override
public boolean hasTravelAdvisory() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*
* @return The travelAdvisory.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteTravelAdvisory getTravelAdvisory() {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder() {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
}
public static final int FALLBACK_INFO_FIELD_NUMBER = 8;
private com.google.maps.routing.v2.FallbackInfo fallbackInfo_;
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*
* @return Whether the fallbackInfo field is set.
*/
@java.lang.Override
public boolean hasFallbackInfo() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*
* @return The fallbackInfo.
*/
@java.lang.Override
public com.google.maps.routing.v2.FallbackInfo getFallbackInfo() {
return fallbackInfo_ == null
? com.google.maps.routing.v2.FallbackInfo.getDefaultInstance()
: fallbackInfo_;
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
@java.lang.Override
public com.google.maps.routing.v2.FallbackInfoOrBuilder getFallbackInfoOrBuilder() {
return fallbackInfo_ == null
? com.google.maps.routing.v2.FallbackInfo.getDefaultInstance()
: fallbackInfo_;
}
public static final int LOCALIZED_VALUES_FIELD_NUMBER = 10;
private com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues localizedValues_;
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
* @return Whether the localizedValues field is set.
*/
@java.lang.Override
public boolean hasLocalizedValues() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
* @return The localizedValues.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues getLocalizedValues() {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.getDefaultInstance()
: localizedValues_;
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValuesOrBuilder
getLocalizedValuesOrBuilder() {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.getDefaultInstance()
: localizedValues_;
}
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.writeInt32(1, originIndex_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt32(2, destinationIndex_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getStatus());
}
if (distanceMeters_ != 0) {
output.writeInt32(4, distanceMeters_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(5, getDuration());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(6, getStaticDuration());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(7, getTravelAdvisory());
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(8, getFallbackInfo());
}
if (condition_
!= com.google.maps.routing.v2.RouteMatrixElementCondition
.ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED
.getNumber()) {
output.writeEnum(9, condition_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(10, getLocalizedValues());
}
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.computeInt32Size(1, originIndex_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, destinationIndex_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus());
}
if (distanceMeters_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, distanceMeters_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDuration());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStaticDuration());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTravelAdvisory());
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getFallbackInfo());
}
if (condition_
!= com.google.maps.routing.v2.RouteMatrixElementCondition
.ROUTE_MATRIX_ELEMENT_CONDITION_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, condition_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLocalizedValues());
}
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.routing.v2.RouteMatrixElement)) {
return super.equals(obj);
}
com.google.maps.routing.v2.RouteMatrixElement other =
(com.google.maps.routing.v2.RouteMatrixElement) obj;
if (hasOriginIndex() != other.hasOriginIndex()) return false;
if (hasOriginIndex()) {
if (getOriginIndex() != other.getOriginIndex()) return false;
}
if (hasDestinationIndex() != other.hasDestinationIndex()) return false;
if (hasDestinationIndex()) {
if (getDestinationIndex() != other.getDestinationIndex()) return false;
}
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus().equals(other.getStatus())) return false;
}
if (condition_ != other.condition_) return false;
if (getDistanceMeters() != other.getDistanceMeters()) return false;
if (hasDuration() != other.hasDuration()) return false;
if (hasDuration()) {
if (!getDuration().equals(other.getDuration())) return false;
}
if (hasStaticDuration() != other.hasStaticDuration()) return false;
if (hasStaticDuration()) {
if (!getStaticDuration().equals(other.getStaticDuration())) return false;
}
if (hasTravelAdvisory() != other.hasTravelAdvisory()) return false;
if (hasTravelAdvisory()) {
if (!getTravelAdvisory().equals(other.getTravelAdvisory())) return false;
}
if (hasFallbackInfo() != other.hasFallbackInfo()) return false;
if (hasFallbackInfo()) {
if (!getFallbackInfo().equals(other.getFallbackInfo())) return false;
}
if (hasLocalizedValues() != other.hasLocalizedValues()) return false;
if (hasLocalizedValues()) {
if (!getLocalizedValues().equals(other.getLocalizedValues())) 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 (hasOriginIndex()) {
hash = (37 * hash) + ORIGIN_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getOriginIndex();
}
if (hasDestinationIndex()) {
hash = (37 * hash) + DESTINATION_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getDestinationIndex();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (37 * hash) + CONDITION_FIELD_NUMBER;
hash = (53 * hash) + condition_;
hash = (37 * hash) + DISTANCE_METERS_FIELD_NUMBER;
hash = (53 * hash) + getDistanceMeters();
if (hasDuration()) {
hash = (37 * hash) + DURATION_FIELD_NUMBER;
hash = (53 * hash) + getDuration().hashCode();
}
if (hasStaticDuration()) {
hash = (37 * hash) + STATIC_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getStaticDuration().hashCode();
}
if (hasTravelAdvisory()) {
hash = (37 * hash) + TRAVEL_ADVISORY_FIELD_NUMBER;
hash = (53 * hash) + getTravelAdvisory().hashCode();
}
if (hasFallbackInfo()) {
hash = (37 * hash) + FALLBACK_INFO_FIELD_NUMBER;
hash = (53 * hash) + getFallbackInfo().hashCode();
}
if (hasLocalizedValues()) {
hash = (37 * hash) + LOCALIZED_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getLocalizedValues().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routing.v2.RouteMatrixElement parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteMatrixElement 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.routing.v2.RouteMatrixElement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteMatrixElement 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.routing.v2.RouteMatrixElement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteMatrixElement parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.maps.routing.v2.RouteMatrixElement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteMatrixElement 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.routing.v2.RouteMatrixElement parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteMatrixElement 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.routing.v2.RouteMatrixElement parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteMatrixElement 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.routing.v2.RouteMatrixElement 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;
}
/**
*
*
*
* Contains route information computed for an origin/destination pair in the
* ComputeRouteMatrix API. This proto can be streamed to the client.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteMatrixElement}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routing.v2.RouteMatrixElement)
com.google.maps.routing.v2.RouteMatrixElementOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteMatrixElement.class,
com.google.maps.routing.v2.RouteMatrixElement.Builder.class);
}
// Construct using com.google.maps.routing.v2.RouteMatrixElement.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getStatusFieldBuilder();
getDurationFieldBuilder();
getStaticDurationFieldBuilder();
getTravelAdvisoryFieldBuilder();
getFallbackInfoFieldBuilder();
getLocalizedValuesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
originIndex_ = 0;
destinationIndex_ = 0;
status_ = null;
if (statusBuilder_ != null) {
statusBuilder_.dispose();
statusBuilder_ = null;
}
condition_ = 0;
distanceMeters_ = 0;
duration_ = null;
if (durationBuilder_ != null) {
durationBuilder_.dispose();
durationBuilder_ = null;
}
staticDuration_ = null;
if (staticDurationBuilder_ != null) {
staticDurationBuilder_.dispose();
staticDurationBuilder_ = null;
}
travelAdvisory_ = null;
if (travelAdvisoryBuilder_ != null) {
travelAdvisoryBuilder_.dispose();
travelAdvisoryBuilder_ = null;
}
fallbackInfo_ = null;
if (fallbackInfoBuilder_ != null) {
fallbackInfoBuilder_.dispose();
fallbackInfoBuilder_ = null;
}
localizedValues_ = null;
if (localizedValuesBuilder_ != null) {
localizedValuesBuilder_.dispose();
localizedValuesBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routing.v2.RoutesServiceProto
.internal_static_google_maps_routing_v2_RouteMatrixElement_descriptor;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement getDefaultInstanceForType() {
return com.google.maps.routing.v2.RouteMatrixElement.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement build() {
com.google.maps.routing.v2.RouteMatrixElement result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElement buildPartial() {
com.google.maps.routing.v2.RouteMatrixElement result =
new com.google.maps.routing.v2.RouteMatrixElement(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.maps.routing.v2.RouteMatrixElement result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.originIndex_ = originIndex_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.destinationIndex_ = destinationIndex_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.condition_ = condition_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.distanceMeters_ = distanceMeters_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.staticDuration_ =
staticDurationBuilder_ == null ? staticDuration_ : staticDurationBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.travelAdvisory_ =
travelAdvisoryBuilder_ == null ? travelAdvisory_ : travelAdvisoryBuilder_.build();
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.fallbackInfo_ =
fallbackInfoBuilder_ == null ? fallbackInfo_ : fallbackInfoBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.localizedValues_ =
localizedValuesBuilder_ == null ? localizedValues_ : localizedValuesBuilder_.build();
to_bitField0_ |= 0x00000080;
}
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.routing.v2.RouteMatrixElement) {
return mergeFrom((com.google.maps.routing.v2.RouteMatrixElement) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.routing.v2.RouteMatrixElement other) {
if (other == com.google.maps.routing.v2.RouteMatrixElement.getDefaultInstance()) return this;
if (other.hasOriginIndex()) {
setOriginIndex(other.getOriginIndex());
}
if (other.hasDestinationIndex()) {
setDestinationIndex(other.getDestinationIndex());
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (other.condition_ != 0) {
setConditionValue(other.getConditionValue());
}
if (other.getDistanceMeters() != 0) {
setDistanceMeters(other.getDistanceMeters());
}
if (other.hasDuration()) {
mergeDuration(other.getDuration());
}
if (other.hasStaticDuration()) {
mergeStaticDuration(other.getStaticDuration());
}
if (other.hasTravelAdvisory()) {
mergeTravelAdvisory(other.getTravelAdvisory());
}
if (other.hasFallbackInfo()) {
mergeFallbackInfo(other.getFallbackInfo());
}
if (other.hasLocalizedValues()) {
mergeLocalizedValues(other.getLocalizedValues());
}
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 8:
{
originIndex_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
destinationIndex_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32:
{
distanceMeters_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 32
case 42:
{
input.readMessage(getDurationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 42
case 50:
{
input.readMessage(getStaticDurationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 50
case 58:
{
input.readMessage(getTravelAdvisoryFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 58
case 66:
{
input.readMessage(getFallbackInfoFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 66
case 72:
{
condition_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 72
case 82:
{
input.readMessage(getLocalizedValuesFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
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 int originIndex_;
/**
*
*
*
* Zero-based index of the origin in the request.
*
*
* optional int32 origin_index = 1;
*
* @return Whether the originIndex field is set.
*/
@java.lang.Override
public boolean hasOriginIndex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Zero-based index of the origin in the request.
*
*
* optional int32 origin_index = 1;
*
* @return The originIndex.
*/
@java.lang.Override
public int getOriginIndex() {
return originIndex_;
}
/**
*
*
*
* Zero-based index of the origin in the request.
*
*
* optional int32 origin_index = 1;
*
* @param value The originIndex to set.
* @return This builder for chaining.
*/
public Builder setOriginIndex(int value) {
originIndex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Zero-based index of the origin in the request.
*
*
* optional int32 origin_index = 1;
*
* @return This builder for chaining.
*/
public Builder clearOriginIndex() {
bitField0_ = (bitField0_ & ~0x00000001);
originIndex_ = 0;
onChanged();
return this;
}
private int destinationIndex_;
/**
*
*
*
* Zero-based index of the destination in the request.
*
*
* optional int32 destination_index = 2;
*
* @return Whether the destinationIndex field is set.
*/
@java.lang.Override
public boolean hasDestinationIndex() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Zero-based index of the destination in the request.
*
*
* optional int32 destination_index = 2;
*
* @return The destinationIndex.
*/
@java.lang.Override
public int getDestinationIndex() {
return destinationIndex_;
}
/**
*
*
*
* Zero-based index of the destination in the request.
*
*
* optional int32 destination_index = 2;
*
* @param value The destinationIndex to set.
* @return This builder for chaining.
*/
public Builder setDestinationIndex(int value) {
destinationIndex_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Zero-based index of the destination in the request.
*
*
* optional int32 destination_index = 2;
*
* @return This builder for chaining.
*/
public Builder clearDestinationIndex() {
bitField0_ = (bitField0_ & ~0x00000002);
destinationIndex_ = 0;
onChanged();
return this;
}
private com.google.rpc.Status status_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
statusBuilder_;
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*
* @return The status.
*/
public com.google.rpc.Status getStatus() {
if (statusBuilder_ == null) {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
public Builder setStatus(com.google.rpc.Status value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
} else {
statusBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
public Builder mergeStatus(com.google.rpc.Status value) {
if (statusBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& status_ != null
&& status_ != com.google.rpc.Status.getDefaultInstance()) {
getStatusBuilder().mergeFrom(value);
} else {
status_ = value;
}
} else {
statusBuilder_.mergeFrom(value);
}
if (status_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
public Builder clearStatus() {
bitField0_ = (bitField0_ & ~0x00000004);
status_ = null;
if (statusBuilder_ != null) {
statusBuilder_.dispose();
statusBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
public com.google.rpc.Status.Builder getStatusBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
}
/**
*
*
*
* Error status code for this element.
*
*
* .google.rpc.Status status = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status,
com.google.rpc.Status.Builder,
com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
status_ = null;
}
return statusBuilder_;
}
private int condition_ = 0;
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @return The enum numeric value on the wire for condition.
*/
@java.lang.Override
public int getConditionValue() {
return condition_;
}
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @param value The enum numeric value on the wire for condition to set.
* @return This builder for chaining.
*/
public Builder setConditionValue(int value) {
condition_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @return The condition.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteMatrixElementCondition getCondition() {
com.google.maps.routing.v2.RouteMatrixElementCondition result =
com.google.maps.routing.v2.RouteMatrixElementCondition.forNumber(condition_);
return result == null
? com.google.maps.routing.v2.RouteMatrixElementCondition.UNRECOGNIZED
: result;
}
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @param value The condition to set.
* @return This builder for chaining.
*/
public Builder setCondition(com.google.maps.routing.v2.RouteMatrixElementCondition value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
condition_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Indicates whether the route was found or not. Independent of status.
*
*
* .google.maps.routing.v2.RouteMatrixElementCondition condition = 9;
*
* @return This builder for chaining.
*/
public Builder clearCondition() {
bitField0_ = (bitField0_ & ~0x00000008);
condition_ = 0;
onChanged();
return this;
}
private int distanceMeters_;
/**
*
*
*
* The travel distance of the route, in meters.
*
*
* int32 distance_meters = 4;
*
* @return The distanceMeters.
*/
@java.lang.Override
public int getDistanceMeters() {
return distanceMeters_;
}
/**
*
*
*
* The travel distance of the route, in meters.
*
*
* int32 distance_meters = 4;
*
* @param value The distanceMeters to set.
* @return This builder for chaining.
*/
public Builder setDistanceMeters(int value) {
distanceMeters_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The travel distance of the route, in meters.
*
*
* int32 distance_meters = 4;
*
* @return This builder for chaining.
*/
public Builder clearDistanceMeters() {
bitField0_ = (bitField0_ & ~0x00000010);
distanceMeters_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Duration duration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
durationBuilder_;
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*
* @return Whether the duration field is set.
*/
public boolean hasDuration() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*
* @return The duration.
*/
public com.google.protobuf.Duration getDuration() {
if (durationBuilder_ == null) {
return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
} else {
return durationBuilder_.getMessage();
}
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
public Builder setDuration(com.google.protobuf.Duration value) {
if (durationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
duration_ = value;
} else {
durationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) {
if (durationBuilder_ == null) {
duration_ = builderForValue.build();
} else {
durationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
public Builder mergeDuration(com.google.protobuf.Duration value) {
if (durationBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& duration_ != null
&& duration_ != com.google.protobuf.Duration.getDefaultInstance()) {
getDurationBuilder().mergeFrom(value);
} else {
duration_ = value;
}
} else {
durationBuilder_.mergeFrom(value);
}
if (duration_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
public Builder clearDuration() {
bitField0_ = (bitField0_ & ~0x00000020);
duration_ = null;
if (durationBuilder_ != null) {
durationBuilder_.dispose();
durationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
public com.google.protobuf.Duration.Builder getDurationBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
public com.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
if (durationBuilder_ != null) {
return durationBuilder_.getMessageOrBuilder();
} else {
return duration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : duration_;
}
}
/**
*
*
*
* The length of time needed to navigate the route. If you set the
* [routing_preference][google.maps.routing.v2.ComputeRouteMatrixRequest.routing_preference]
* to `TRAFFIC_UNAWARE`, then this value is the same as `static_duration`. If
* you set the `routing_preference` to either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getDurationFieldBuilder() {
if (durationBuilder_ == null) {
durationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getDuration(), getParentForChildren(), isClean());
duration_ = null;
}
return durationBuilder_;
}
private com.google.protobuf.Duration staticDuration_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
staticDurationBuilder_;
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*
* @return Whether the staticDuration field is set.
*/
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*
* @return The staticDuration.
*/
public com.google.protobuf.Duration getStaticDuration() {
if (staticDurationBuilder_ == null) {
return staticDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: staticDuration_;
} else {
return staticDurationBuilder_.getMessage();
}
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
public Builder setStaticDuration(com.google.protobuf.Duration value) {
if (staticDurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
staticDuration_ = value;
} else {
staticDurationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
public Builder setStaticDuration(com.google.protobuf.Duration.Builder builderForValue) {
if (staticDurationBuilder_ == null) {
staticDuration_ = builderForValue.build();
} else {
staticDurationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
public Builder mergeStaticDuration(com.google.protobuf.Duration value) {
if (staticDurationBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& staticDuration_ != null
&& staticDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
getStaticDurationBuilder().mergeFrom(value);
} else {
staticDuration_ = value;
}
} else {
staticDurationBuilder_.mergeFrom(value);
}
if (staticDuration_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
public Builder clearStaticDuration() {
bitField0_ = (bitField0_ & ~0x00000040);
staticDuration_ = null;
if (staticDurationBuilder_ != null) {
staticDurationBuilder_.dispose();
staticDurationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
public com.google.protobuf.Duration.Builder getStaticDurationBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getStaticDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder() {
if (staticDurationBuilder_ != null) {
return staticDurationBuilder_.getMessageOrBuilder();
} else {
return staticDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: staticDuration_;
}
}
/**
*
*
*
* The duration of traveling through the route without taking traffic
* conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>
getStaticDurationFieldBuilder() {
if (staticDurationBuilder_ == null) {
staticDurationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration,
com.google.protobuf.Duration.Builder,
com.google.protobuf.DurationOrBuilder>(
getStaticDuration(), getParentForChildren(), isClean());
staticDuration_ = null;
}
return staticDurationBuilder_;
}
private com.google.maps.routing.v2.RouteTravelAdvisory travelAdvisory_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteTravelAdvisory,
com.google.maps.routing.v2.RouteTravelAdvisory.Builder,
com.google.maps.routing.v2.RouteTravelAdvisoryOrBuilder>
travelAdvisoryBuilder_;
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*
* @return Whether the travelAdvisory field is set.
*/
public boolean hasTravelAdvisory() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*
* @return The travelAdvisory.
*/
public com.google.maps.routing.v2.RouteTravelAdvisory getTravelAdvisory() {
if (travelAdvisoryBuilder_ == null) {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
} else {
return travelAdvisoryBuilder_.getMessage();
}
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
public Builder setTravelAdvisory(com.google.maps.routing.v2.RouteTravelAdvisory value) {
if (travelAdvisoryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
travelAdvisory_ = value;
} else {
travelAdvisoryBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
public Builder setTravelAdvisory(
com.google.maps.routing.v2.RouteTravelAdvisory.Builder builderForValue) {
if (travelAdvisoryBuilder_ == null) {
travelAdvisory_ = builderForValue.build();
} else {
travelAdvisoryBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
public Builder mergeTravelAdvisory(com.google.maps.routing.v2.RouteTravelAdvisory value) {
if (travelAdvisoryBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& travelAdvisory_ != null
&& travelAdvisory_
!= com.google.maps.routing.v2.RouteTravelAdvisory.getDefaultInstance()) {
getTravelAdvisoryBuilder().mergeFrom(value);
} else {
travelAdvisory_ = value;
}
} else {
travelAdvisoryBuilder_.mergeFrom(value);
}
if (travelAdvisory_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
public Builder clearTravelAdvisory() {
bitField0_ = (bitField0_ & ~0x00000080);
travelAdvisory_ = null;
if (travelAdvisoryBuilder_ != null) {
travelAdvisoryBuilder_.dispose();
travelAdvisoryBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
public com.google.maps.routing.v2.RouteTravelAdvisory.Builder getTravelAdvisoryBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getTravelAdvisoryFieldBuilder().getBuilder();
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
public com.google.maps.routing.v2.RouteTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder() {
if (travelAdvisoryBuilder_ != null) {
return travelAdvisoryBuilder_.getMessageOrBuilder();
} else {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
}
}
/**
*
*
*
* Additional information about the route. For example: restriction
* information and toll information
*
*
* .google.maps.routing.v2.RouteTravelAdvisory travel_advisory = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteTravelAdvisory,
com.google.maps.routing.v2.RouteTravelAdvisory.Builder,
com.google.maps.routing.v2.RouteTravelAdvisoryOrBuilder>
getTravelAdvisoryFieldBuilder() {
if (travelAdvisoryBuilder_ == null) {
travelAdvisoryBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteTravelAdvisory,
com.google.maps.routing.v2.RouteTravelAdvisory.Builder,
com.google.maps.routing.v2.RouteTravelAdvisoryOrBuilder>(
getTravelAdvisory(), getParentForChildren(), isClean());
travelAdvisory_ = null;
}
return travelAdvisoryBuilder_;
}
private com.google.maps.routing.v2.FallbackInfo fallbackInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.FallbackInfo,
com.google.maps.routing.v2.FallbackInfo.Builder,
com.google.maps.routing.v2.FallbackInfoOrBuilder>
fallbackInfoBuilder_;
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*
* @return Whether the fallbackInfo field is set.
*/
public boolean hasFallbackInfo() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*
* @return The fallbackInfo.
*/
public com.google.maps.routing.v2.FallbackInfo getFallbackInfo() {
if (fallbackInfoBuilder_ == null) {
return fallbackInfo_ == null
? com.google.maps.routing.v2.FallbackInfo.getDefaultInstance()
: fallbackInfo_;
} else {
return fallbackInfoBuilder_.getMessage();
}
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
public Builder setFallbackInfo(com.google.maps.routing.v2.FallbackInfo value) {
if (fallbackInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fallbackInfo_ = value;
} else {
fallbackInfoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
public Builder setFallbackInfo(
com.google.maps.routing.v2.FallbackInfo.Builder builderForValue) {
if (fallbackInfoBuilder_ == null) {
fallbackInfo_ = builderForValue.build();
} else {
fallbackInfoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
public Builder mergeFallbackInfo(com.google.maps.routing.v2.FallbackInfo value) {
if (fallbackInfoBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)
&& fallbackInfo_ != null
&& fallbackInfo_ != com.google.maps.routing.v2.FallbackInfo.getDefaultInstance()) {
getFallbackInfoBuilder().mergeFrom(value);
} else {
fallbackInfo_ = value;
}
} else {
fallbackInfoBuilder_.mergeFrom(value);
}
if (fallbackInfo_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
public Builder clearFallbackInfo() {
bitField0_ = (bitField0_ & ~0x00000100);
fallbackInfo_ = null;
if (fallbackInfoBuilder_ != null) {
fallbackInfoBuilder_.dispose();
fallbackInfoBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
public com.google.maps.routing.v2.FallbackInfo.Builder getFallbackInfoBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getFallbackInfoFieldBuilder().getBuilder();
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
public com.google.maps.routing.v2.FallbackInfoOrBuilder getFallbackInfoOrBuilder() {
if (fallbackInfoBuilder_ != null) {
return fallbackInfoBuilder_.getMessageOrBuilder();
} else {
return fallbackInfo_ == null
? com.google.maps.routing.v2.FallbackInfo.getDefaultInstance()
: fallbackInfo_;
}
}
/**
*
*
*
* In some cases when the server is not able to compute the route with the
* given preferences for this particular origin/destination pair, it may
* fall back to using a different mode of computation. When fallback mode is
* used, this field contains detailed information about the fallback response.
* Otherwise this field is unset.
*
*
* .google.maps.routing.v2.FallbackInfo fallback_info = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.FallbackInfo,
com.google.maps.routing.v2.FallbackInfo.Builder,
com.google.maps.routing.v2.FallbackInfoOrBuilder>
getFallbackInfoFieldBuilder() {
if (fallbackInfoBuilder_ == null) {
fallbackInfoBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.FallbackInfo,
com.google.maps.routing.v2.FallbackInfo.Builder,
com.google.maps.routing.v2.FallbackInfoOrBuilder>(
getFallbackInfo(), getParentForChildren(), isClean());
fallbackInfo_ = null;
}
return fallbackInfoBuilder_;
}
private com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues localizedValues_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValuesOrBuilder>
localizedValuesBuilder_;
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*
* @return Whether the localizedValues field is set.
*/
public boolean hasLocalizedValues() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*
* @return The localizedValues.
*/
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues getLocalizedValues() {
if (localizedValuesBuilder_ == null) {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.getDefaultInstance()
: localizedValues_;
} else {
return localizedValuesBuilder_.getMessage();
}
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
public Builder setLocalizedValues(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues value) {
if (localizedValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localizedValues_ = value;
} else {
localizedValuesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
public Builder setLocalizedValues(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder builderForValue) {
if (localizedValuesBuilder_ == null) {
localizedValues_ = builderForValue.build();
} else {
localizedValuesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
public Builder mergeLocalizedValues(
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues value) {
if (localizedValuesBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)
&& localizedValues_ != null
&& localizedValues_
!= com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues
.getDefaultInstance()) {
getLocalizedValuesBuilder().mergeFrom(value);
} else {
localizedValues_ = value;
}
} else {
localizedValuesBuilder_.mergeFrom(value);
}
if (localizedValues_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
public Builder clearLocalizedValues() {
bitField0_ = (bitField0_ & ~0x00000200);
localizedValues_ = null;
if (localizedValuesBuilder_ != null) {
localizedValuesBuilder_.dispose();
localizedValuesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder
getLocalizedValuesBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getLocalizedValuesFieldBuilder().getBuilder();
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
public com.google.maps.routing.v2.RouteMatrixElement.LocalizedValuesOrBuilder
getLocalizedValuesOrBuilder() {
if (localizedValuesBuilder_ != null) {
return localizedValuesBuilder_.getMessageOrBuilder();
} else {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.getDefaultInstance()
: localizedValues_;
}
}
/**
*
*
*
* Text representations of properties of the `RouteMatrixElement`.
*
*
* .google.maps.routing.v2.RouteMatrixElement.LocalizedValues localized_values = 10;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValuesOrBuilder>
getLocalizedValuesFieldBuilder() {
if (localizedValuesBuilder_ == null) {
localizedValuesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValues.Builder,
com.google.maps.routing.v2.RouteMatrixElement.LocalizedValuesOrBuilder>(
getLocalizedValues(), getParentForChildren(), isClean());
localizedValues_ = null;
}
return localizedValuesBuilder_;
}
@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.routing.v2.RouteMatrixElement)
}
// @@protoc_insertion_point(class_scope:google.maps.routing.v2.RouteMatrixElement)
private static final com.google.maps.routing.v2.RouteMatrixElement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routing.v2.RouteMatrixElement();
}
public static com.google.maps.routing.v2.RouteMatrixElement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RouteMatrixElement 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.routing.v2.RouteMatrixElement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy