com.google.maps.routing.v2.RouteLeg Maven / Gradle / Ivy
/*
* 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/route.proto
// Protobuf Java Version: 3.25.3
package com.google.maps.routing.v2;
/**
*
*
*
* Contains a segment between non-`via` waypoints.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg}
*/
public final class RouteLeg extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routing.v2.RouteLeg)
RouteLegOrBuilder {
private static final long serialVersionUID = 0L;
// Use RouteLeg.newBuilder() to construct.
private RouteLeg(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RouteLeg() {
steps_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RouteLeg();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.class,
com.google.maps.routing.v2.RouteLeg.Builder.class);
}
public interface RouteLegLocalizedValuesOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues)
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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return Whether the duration field is set.
*/
boolean hasDuration();
/**
*
*
*
* Duration taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*
* @return The duration.
*/
com.google.type.LocalizedText getDuration();
/**
*
*
*
* Duration taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be the same value as static_duration.
*
*
* .google.type.LocalizedText duration = 2;
*/
com.google.type.LocalizedTextOrBuilder getDurationOrBuilder();
/**
*
*
*
* Duration without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
boolean hasStaticDuration();
/**
*
*
*
* Duration without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return The staticDuration.
*/
com.google.type.LocalizedText getStaticDuration();
/**
*
*
*
* Duration without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
com.google.type.LocalizedTextOrBuilder getStaticDurationOrBuilder();
}
/**
*
*
*
* Text representations of certain properties.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues}
*/
public static final class RouteLegLocalizedValues extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues)
RouteLegLocalizedValuesOrBuilder {
private static final long serialVersionUID = 0L;
// Use RouteLegLocalizedValues.newBuilder() to construct.
private RouteLegLocalizedValues(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RouteLegLocalizedValues() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RouteLegLocalizedValues();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_RouteLegLocalizedValues_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_RouteLegLocalizedValues_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.class,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
@java.lang.Override
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Duration without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
@java.lang.Override
public com.google.type.LocalizedTextOrBuilder getStaticDurationOrBuilder() {
return staticDuration_ == null
? com.google.type.LocalizedText.getDefaultInstance()
: staticDuration_;
}
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());
}
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());
}
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.RouteLeg.RouteLegLocalizedValues)) {
return super.equals(obj);
}
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues other =
(com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues) 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 (!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();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues)
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValuesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_RouteLegLocalizedValues_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_RouteLegLocalizedValues_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.class,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.Builder.class);
}
// Construct using com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.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();
}
}
@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;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_RouteLegLocalizedValues_descriptor;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues
getDefaultInstanceForType() {
return com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues build() {
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues buildPartial() {
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues result =
new com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues 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;
}
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.RouteLeg.RouteLegLocalizedValues) {
return mergeFrom((com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues other) {
if (other
== com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.getDefaultInstance())
return this;
if (other.hasDistance()) {
mergeDistance(other.getDistance());
}
if (other.hasDuration()) {
mergeDuration(other.getDuration());
}
if (other.hasStaticDuration()) {
mergeStaticDuration(other.getStaticDuration());
}
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
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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 taking traffic conditions into consideration represented in text
* form. Note: If you did not request traffic information, this value will
* be 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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Duration without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .google.type.LocalizedText static_duration = 3;
*/
public com.google.type.LocalizedText.Builder getStaticDurationBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getStaticDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* Duration without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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 without taking traffic conditions into
* consideration, represented in text form.
*
*
* .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_;
}
@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.RouteLeg.RouteLegLocalizedValues)
}
// @@protoc_insertion_point(class_scope:google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues)
private static final com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues();
}
public static com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RouteLegLocalizedValues 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.RouteLeg.RouteLegLocalizedValues getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface StepsOverviewOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.routing.v2.RouteLeg.StepsOverview)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
java.util.List
getMultiModalSegmentsList();
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment getMultiModalSegments(
int index);
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
int getMultiModalSegmentsCount();
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
java.util.List<
? extends com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder>
getMultiModalSegmentsOrBuilderList();
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder
getMultiModalSegmentsOrBuilder(int index);
}
/**
*
*
*
* Provides overview information about a list of `RouteLegStep`s.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg.StepsOverview}
*/
public static final class StepsOverview extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routing.v2.RouteLeg.StepsOverview)
StepsOverviewOrBuilder {
private static final long serialVersionUID = 0L;
// Use StepsOverview.newBuilder() to construct.
private StepsOverview(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StepsOverview() {
multiModalSegments_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new StepsOverview();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.StepsOverview.class,
com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder.class);
}
public interface MultiModalSegmentOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return Whether the stepStartIndex field is set.
*/
boolean hasStepStartIndex();
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return The stepStartIndex.
*/
int getStepStartIndex();
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return Whether the stepEndIndex field is set.
*/
boolean hasStepEndIndex();
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return The stepEndIndex.
*/
int getStepEndIndex();
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*
* @return Whether the navigationInstruction field is set.
*/
boolean hasNavigationInstruction();
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*
* @return The navigationInstruction.
*/
com.google.maps.routing.v2.NavigationInstruction getNavigationInstruction();
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
com.google.maps.routing.v2.NavigationInstructionOrBuilder getNavigationInstructionOrBuilder();
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return The enum numeric value on the wire for travelMode.
*/
int getTravelModeValue();
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return The travelMode.
*/
com.google.maps.routing.v2.RouteTravelMode getTravelMode();
}
/**
*
*
*
* Provides summarized information about different multi-modal segments of
* the `RouteLeg.steps`. A multi-modal segment is defined as one or more
* contiguous `RouteLegStep` that have the same `RouteTravelMode`.
* This field is not populated if the `RouteLeg` does not contain any
* multi-modal segments in the steps.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment}
*/
public static final class MultiModalSegment extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment)
MultiModalSegmentOrBuilder {
private static final long serialVersionUID = 0L;
// Use MultiModalSegment.newBuilder() to construct.
private MultiModalSegment(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MultiModalSegment() {
travelMode_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new MultiModalSegment();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_MultiModalSegment_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_MultiModalSegment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.class,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder.class);
}
private int bitField0_;
public static final int STEP_START_INDEX_FIELD_NUMBER = 1;
private int stepStartIndex_ = 0;
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return Whether the stepStartIndex field is set.
*/
@java.lang.Override
public boolean hasStepStartIndex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return The stepStartIndex.
*/
@java.lang.Override
public int getStepStartIndex() {
return stepStartIndex_;
}
public static final int STEP_END_INDEX_FIELD_NUMBER = 2;
private int stepEndIndex_ = 0;
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return Whether the stepEndIndex field is set.
*/
@java.lang.Override
public boolean hasStepEndIndex() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return The stepEndIndex.
*/
@java.lang.Override
public int getStepEndIndex() {
return stepEndIndex_;
}
public static final int NAVIGATION_INSTRUCTION_FIELD_NUMBER = 3;
private com.google.maps.routing.v2.NavigationInstruction navigationInstruction_;
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*
* @return Whether the navigationInstruction field is set.
*/
@java.lang.Override
public boolean hasNavigationInstruction() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*
* @return The navigationInstruction.
*/
@java.lang.Override
public com.google.maps.routing.v2.NavigationInstruction getNavigationInstruction() {
return navigationInstruction_ == null
? com.google.maps.routing.v2.NavigationInstruction.getDefaultInstance()
: navigationInstruction_;
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
@java.lang.Override
public com.google.maps.routing.v2.NavigationInstructionOrBuilder
getNavigationInstructionOrBuilder() {
return navigationInstruction_ == null
? com.google.maps.routing.v2.NavigationInstruction.getDefaultInstance()
: navigationInstruction_;
}
public static final int TRAVEL_MODE_FIELD_NUMBER = 4;
private int travelMode_ = 0;
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return The enum numeric value on the wire for travelMode.
*/
@java.lang.Override
public int getTravelModeValue() {
return travelMode_;
}
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return The travelMode.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteTravelMode getTravelMode() {
com.google.maps.routing.v2.RouteTravelMode result =
com.google.maps.routing.v2.RouteTravelMode.forNumber(travelMode_);
return result == null ? com.google.maps.routing.v2.RouteTravelMode.UNRECOGNIZED : result;
}
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, stepStartIndex_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt32(2, stepEndIndex_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getNavigationInstruction());
}
if (travelMode_
!= com.google.maps.routing.v2.RouteTravelMode.TRAVEL_MODE_UNSPECIFIED.getNumber()) {
output.writeEnum(4, travelMode_);
}
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, stepStartIndex_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, stepEndIndex_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3, getNavigationInstruction());
}
if (travelMode_
!= com.google.maps.routing.v2.RouteTravelMode.TRAVEL_MODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, travelMode_);
}
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.RouteLeg.StepsOverview.MultiModalSegment)) {
return super.equals(obj);
}
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment other =
(com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment) obj;
if (hasStepStartIndex() != other.hasStepStartIndex()) return false;
if (hasStepStartIndex()) {
if (getStepStartIndex() != other.getStepStartIndex()) return false;
}
if (hasStepEndIndex() != other.hasStepEndIndex()) return false;
if (hasStepEndIndex()) {
if (getStepEndIndex() != other.getStepEndIndex()) return false;
}
if (hasNavigationInstruction() != other.hasNavigationInstruction()) return false;
if (hasNavigationInstruction()) {
if (!getNavigationInstruction().equals(other.getNavigationInstruction())) return false;
}
if (travelMode_ != other.travelMode_) 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 (hasStepStartIndex()) {
hash = (37 * hash) + STEP_START_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getStepStartIndex();
}
if (hasStepEndIndex()) {
hash = (37 * hash) + STEP_END_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getStepEndIndex();
}
if (hasNavigationInstruction()) {
hash = (37 * hash) + NAVIGATION_INSTRUCTION_FIELD_NUMBER;
hash = (53 * hash) + getNavigationInstruction().hashCode();
}
hash = (37 * hash) + TRAVEL_MODE_FIELD_NUMBER;
hash = (53 * hash) + travelMode_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
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.RouteLeg.StepsOverview.MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment 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;
}
/**
*
*
*
* Provides summarized information about different multi-modal segments of
* the `RouteLeg.steps`. A multi-modal segment is defined as one or more
* contiguous `RouteLegStep` that have the same `RouteTravelMode`.
* This field is not populated if the `RouteLeg` does not contain any
* multi-modal segments in the steps.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment)
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_MultiModalSegment_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_MultiModalSegment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.class,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
.class);
}
// Construct using
// com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getNavigationInstructionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
stepStartIndex_ = 0;
stepEndIndex_ = 0;
navigationInstruction_ = null;
if (navigationInstructionBuilder_ != null) {
navigationInstructionBuilder_.dispose();
navigationInstructionBuilder_ = null;
}
travelMode_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_MultiModalSegment_descriptor;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
getDefaultInstanceForType() {
return com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment build() {
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment buildPartial() {
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment result =
new com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.stepStartIndex_ = stepStartIndex_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.stepEndIndex_ = stepEndIndex_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.navigationInstruction_ =
navigationInstructionBuilder_ == null
? navigationInstruction_
: navigationInstructionBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.travelMode_ = travelMode_;
}
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.RouteLeg.StepsOverview.MultiModalSegment) {
return mergeFrom(
(com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment other) {
if (other
== com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
.getDefaultInstance()) return this;
if (other.hasStepStartIndex()) {
setStepStartIndex(other.getStepStartIndex());
}
if (other.hasStepEndIndex()) {
setStepEndIndex(other.getStepEndIndex());
}
if (other.hasNavigationInstruction()) {
mergeNavigationInstruction(other.getNavigationInstruction());
}
if (other.travelMode_ != 0) {
setTravelModeValue(other.getTravelModeValue());
}
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:
{
stepStartIndex_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16:
{
stepEndIndex_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
input.readMessage(
getNavigationInstructionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32:
{
travelMode_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
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 stepStartIndex_;
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return Whether the stepStartIndex field is set.
*/
@java.lang.Override
public boolean hasStepStartIndex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return The stepStartIndex.
*/
@java.lang.Override
public int getStepStartIndex() {
return stepStartIndex_;
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @param value The stepStartIndex to set.
* @return This builder for chaining.
*/
public Builder setStepStartIndex(int value) {
stepStartIndex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the start of a
* multi-modal segment.
*
*
* optional int32 step_start_index = 1;
*
* @return This builder for chaining.
*/
public Builder clearStepStartIndex() {
bitField0_ = (bitField0_ & ~0x00000001);
stepStartIndex_ = 0;
onChanged();
return this;
}
private int stepEndIndex_;
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return Whether the stepEndIndex field is set.
*/
@java.lang.Override
public boolean hasStepEndIndex() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return The stepEndIndex.
*/
@java.lang.Override
public int getStepEndIndex() {
return stepEndIndex_;
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @param value The stepEndIndex to set.
* @return This builder for chaining.
*/
public Builder setStepEndIndex(int value) {
stepEndIndex_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The corresponding `RouteLegStep` index that is the end of a
* multi-modal segment.
*
*
* optional int32 step_end_index = 2;
*
* @return This builder for chaining.
*/
public Builder clearStepEndIndex() {
bitField0_ = (bitField0_ & ~0x00000002);
stepEndIndex_ = 0;
onChanged();
return this;
}
private com.google.maps.routing.v2.NavigationInstruction navigationInstruction_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.NavigationInstruction,
com.google.maps.routing.v2.NavigationInstruction.Builder,
com.google.maps.routing.v2.NavigationInstructionOrBuilder>
navigationInstructionBuilder_;
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*
* @return Whether the navigationInstruction field is set.
*/
public boolean hasNavigationInstruction() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*
* @return The navigationInstruction.
*/
public com.google.maps.routing.v2.NavigationInstruction getNavigationInstruction() {
if (navigationInstructionBuilder_ == null) {
return navigationInstruction_ == null
? com.google.maps.routing.v2.NavigationInstruction.getDefaultInstance()
: navigationInstruction_;
} else {
return navigationInstructionBuilder_.getMessage();
}
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
public Builder setNavigationInstruction(
com.google.maps.routing.v2.NavigationInstruction value) {
if (navigationInstructionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
navigationInstruction_ = value;
} else {
navigationInstructionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
public Builder setNavigationInstruction(
com.google.maps.routing.v2.NavigationInstruction.Builder builderForValue) {
if (navigationInstructionBuilder_ == null) {
navigationInstruction_ = builderForValue.build();
} else {
navigationInstructionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
public Builder mergeNavigationInstruction(
com.google.maps.routing.v2.NavigationInstruction value) {
if (navigationInstructionBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& navigationInstruction_ != null
&& navigationInstruction_
!= com.google.maps.routing.v2.NavigationInstruction.getDefaultInstance()) {
getNavigationInstructionBuilder().mergeFrom(value);
} else {
navigationInstruction_ = value;
}
} else {
navigationInstructionBuilder_.mergeFrom(value);
}
if (navigationInstruction_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
public Builder clearNavigationInstruction() {
bitField0_ = (bitField0_ & ~0x00000004);
navigationInstruction_ = null;
if (navigationInstructionBuilder_ != null) {
navigationInstructionBuilder_.dispose();
navigationInstructionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
public com.google.maps.routing.v2.NavigationInstruction.Builder
getNavigationInstructionBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getNavigationInstructionFieldBuilder().getBuilder();
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
public com.google.maps.routing.v2.NavigationInstructionOrBuilder
getNavigationInstructionOrBuilder() {
if (navigationInstructionBuilder_ != null) {
return navigationInstructionBuilder_.getMessageOrBuilder();
} else {
return navigationInstruction_ == null
? com.google.maps.routing.v2.NavigationInstruction.getDefaultInstance()
: navigationInstruction_;
}
}
/**
*
*
*
* NavigationInstruction for the multi-modal segment.
*
*
* .google.maps.routing.v2.NavigationInstruction navigation_instruction = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.NavigationInstruction,
com.google.maps.routing.v2.NavigationInstruction.Builder,
com.google.maps.routing.v2.NavigationInstructionOrBuilder>
getNavigationInstructionFieldBuilder() {
if (navigationInstructionBuilder_ == null) {
navigationInstructionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.NavigationInstruction,
com.google.maps.routing.v2.NavigationInstruction.Builder,
com.google.maps.routing.v2.NavigationInstructionOrBuilder>(
getNavigationInstruction(), getParentForChildren(), isClean());
navigationInstruction_ = null;
}
return navigationInstructionBuilder_;
}
private int travelMode_ = 0;
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return The enum numeric value on the wire for travelMode.
*/
@java.lang.Override
public int getTravelModeValue() {
return travelMode_;
}
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @param value The enum numeric value on the wire for travelMode to set.
* @return This builder for chaining.
*/
public Builder setTravelModeValue(int value) {
travelMode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return The travelMode.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteTravelMode getTravelMode() {
com.google.maps.routing.v2.RouteTravelMode result =
com.google.maps.routing.v2.RouteTravelMode.forNumber(travelMode_);
return result == null ? com.google.maps.routing.v2.RouteTravelMode.UNRECOGNIZED : result;
}
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @param value The travelMode to set.
* @return This builder for chaining.
*/
public Builder setTravelMode(com.google.maps.routing.v2.RouteTravelMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
travelMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The travel mode of the multi-modal segment.
*
*
* .google.maps.routing.v2.RouteTravelMode travel_mode = 4;
*
* @return This builder for chaining.
*/
public Builder clearTravelMode() {
bitField0_ = (bitField0_ & ~0x00000008);
travelMode_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment)
}
// @@protoc_insertion_point(class_scope:google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment)
private static final com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment();
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MultiModalSegment 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.RouteLeg.StepsOverview.MultiModalSegment
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int MULTI_MODAL_SEGMENTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List
multiModalSegments_;
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
@java.lang.Override
public java.util.List
getMultiModalSegmentsList() {
return multiModalSegments_;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder>
getMultiModalSegmentsOrBuilderList() {
return multiModalSegments_;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
@java.lang.Override
public int getMultiModalSegmentsCount() {
return multiModalSegments_.size();
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
getMultiModalSegments(int index) {
return multiModalSegments_.get(index);
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder
getMultiModalSegmentsOrBuilder(int index) {
return multiModalSegments_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < multiModalSegments_.size(); i++) {
output.writeMessage(1, multiModalSegments_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < multiModalSegments_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(1, multiModalSegments_.get(i));
}
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.RouteLeg.StepsOverview)) {
return super.equals(obj);
}
com.google.maps.routing.v2.RouteLeg.StepsOverview other =
(com.google.maps.routing.v2.RouteLeg.StepsOverview) obj;
if (!getMultiModalSegmentsList().equals(other.getMultiModalSegmentsList())) 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 (getMultiModalSegmentsCount() > 0) {
hash = (37 * hash) + MULTI_MODAL_SEGMENTS_FIELD_NUMBER;
hash = (53 * hash) + getMultiModalSegmentsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview 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.RouteLeg.StepsOverview 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;
}
/**
*
*
*
* Provides overview information about a list of `RouteLegStep`s.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg.StepsOverview}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routing.v2.RouteLeg.StepsOverview)
com.google.maps.routing.v2.RouteLeg.StepsOverviewOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.StepsOverview.class,
com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder.class);
}
// Construct using com.google.maps.routing.v2.RouteLeg.StepsOverview.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (multiModalSegmentsBuilder_ == null) {
multiModalSegments_ = java.util.Collections.emptyList();
} else {
multiModalSegments_ = null;
multiModalSegmentsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_StepsOverview_descriptor;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview getDefaultInstanceForType() {
return com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview build() {
com.google.maps.routing.v2.RouteLeg.StepsOverview result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview buildPartial() {
com.google.maps.routing.v2.RouteLeg.StepsOverview result =
new com.google.maps.routing.v2.RouteLeg.StepsOverview(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.maps.routing.v2.RouteLeg.StepsOverview result) {
if (multiModalSegmentsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
multiModalSegments_ = java.util.Collections.unmodifiableList(multiModalSegments_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.multiModalSegments_ = multiModalSegments_;
} else {
result.multiModalSegments_ = multiModalSegmentsBuilder_.build();
}
}
private void buildPartial0(com.google.maps.routing.v2.RouteLeg.StepsOverview result) {
int from_bitField0_ = 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.RouteLeg.StepsOverview) {
return mergeFrom((com.google.maps.routing.v2.RouteLeg.StepsOverview) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.routing.v2.RouteLeg.StepsOverview other) {
if (other == com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance())
return this;
if (multiModalSegmentsBuilder_ == null) {
if (!other.multiModalSegments_.isEmpty()) {
if (multiModalSegments_.isEmpty()) {
multiModalSegments_ = other.multiModalSegments_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.addAll(other.multiModalSegments_);
}
onChanged();
}
} else {
if (!other.multiModalSegments_.isEmpty()) {
if (multiModalSegmentsBuilder_.isEmpty()) {
multiModalSegmentsBuilder_.dispose();
multiModalSegmentsBuilder_ = null;
multiModalSegments_ = other.multiModalSegments_;
bitField0_ = (bitField0_ & ~0x00000001);
multiModalSegmentsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getMultiModalSegmentsFieldBuilder()
: null;
} else {
multiModalSegmentsBuilder_.addAllMessages(other.multiModalSegments_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment m =
input.readMessage(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
.parser(),
extensionRegistry);
if (multiModalSegmentsBuilder_ == null) {
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.add(m);
} else {
multiModalSegmentsBuilder_.addMessage(m);
}
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List
multiModalSegments_ = java.util.Collections.emptyList();
private void ensureMultiModalSegmentsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
multiModalSegments_ =
new java.util.ArrayList<
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment>(
multiModalSegments_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder>
multiModalSegmentsBuilder_;
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public java.util.List
getMultiModalSegmentsList() {
if (multiModalSegmentsBuilder_ == null) {
return java.util.Collections.unmodifiableList(multiModalSegments_);
} else {
return multiModalSegmentsBuilder_.getMessageList();
}
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public int getMultiModalSegmentsCount() {
if (multiModalSegmentsBuilder_ == null) {
return multiModalSegments_.size();
} else {
return multiModalSegmentsBuilder_.getCount();
}
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
getMultiModalSegments(int index) {
if (multiModalSegmentsBuilder_ == null) {
return multiModalSegments_.get(index);
} else {
return multiModalSegmentsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder setMultiModalSegments(
int index, com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment value) {
if (multiModalSegmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.set(index, value);
onChanged();
} else {
multiModalSegmentsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder setMultiModalSegments(
int index,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
builderForValue) {
if (multiModalSegmentsBuilder_ == null) {
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.set(index, builderForValue.build());
onChanged();
} else {
multiModalSegmentsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder addMultiModalSegments(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment value) {
if (multiModalSegmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.add(value);
onChanged();
} else {
multiModalSegmentsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder addMultiModalSegments(
int index, com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment value) {
if (multiModalSegmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.add(index, value);
onChanged();
} else {
multiModalSegmentsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder addMultiModalSegments(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
builderForValue) {
if (multiModalSegmentsBuilder_ == null) {
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.add(builderForValue.build());
onChanged();
} else {
multiModalSegmentsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder addMultiModalSegments(
int index,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
builderForValue) {
if (multiModalSegmentsBuilder_ == null) {
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.add(index, builderForValue.build());
onChanged();
} else {
multiModalSegmentsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder addAllMultiModalSegments(
java.lang.Iterable<
? extends com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment>
values) {
if (multiModalSegmentsBuilder_ == null) {
ensureMultiModalSegmentsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, multiModalSegments_);
onChanged();
} else {
multiModalSegmentsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder clearMultiModalSegments() {
if (multiModalSegmentsBuilder_ == null) {
multiModalSegments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
multiModalSegmentsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public Builder removeMultiModalSegments(int index) {
if (multiModalSegmentsBuilder_ == null) {
ensureMultiModalSegmentsIsMutable();
multiModalSegments_.remove(index);
onChanged();
} else {
multiModalSegmentsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
getMultiModalSegmentsBuilder(int index) {
return getMultiModalSegmentsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder
getMultiModalSegmentsOrBuilder(int index) {
if (multiModalSegmentsBuilder_ == null) {
return multiModalSegments_.get(index);
} else {
return multiModalSegmentsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public java.util.List<
? extends
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder>
getMultiModalSegmentsOrBuilderList() {
if (multiModalSegmentsBuilder_ != null) {
return multiModalSegmentsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(multiModalSegments_);
}
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
addMultiModalSegmentsBuilder() {
return getMultiModalSegmentsFieldBuilder()
.addBuilder(
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
.getDefaultInstance());
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder
addMultiModalSegmentsBuilder(int index) {
return getMultiModalSegmentsFieldBuilder()
.addBuilder(
index,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment
.getDefaultInstance());
}
/**
*
*
*
* Summarized information about different multi-modal segments of
* the `RouteLeg.steps`. This field is not populated if the `RouteLeg` does
* not contain any multi-modal segments in the steps.
*
*
*
* repeated .google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment multi_modal_segments = 1;
*
*/
public java.util.List<
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder>
getMultiModalSegmentsBuilderList() {
return getMultiModalSegmentsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder>
getMultiModalSegmentsFieldBuilder() {
if (multiModalSegmentsBuilder_ == null) {
multiModalSegmentsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegment.Builder,
com.google.maps.routing.v2.RouteLeg.StepsOverview.MultiModalSegmentOrBuilder>(
multiModalSegments_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
multiModalSegments_ = null;
}
return multiModalSegmentsBuilder_;
}
@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.RouteLeg.StepsOverview)
}
// @@protoc_insertion_point(class_scope:google.maps.routing.v2.RouteLeg.StepsOverview)
private static final com.google.maps.routing.v2.RouteLeg.StepsOverview DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routing.v2.RouteLeg.StepsOverview();
}
public static com.google.maps.routing.v2.RouteLeg.StepsOverview getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StepsOverview 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.RouteLeg.StepsOverview getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int DISTANCE_METERS_FIELD_NUMBER = 1;
private int distanceMeters_ = 0;
/**
*
*
*
* The travel distance of the route leg, in meters.
*
*
* int32 distance_meters = 1;
*
* @return The distanceMeters.
*/
@java.lang.Override
public int getDistanceMeters() {
return distanceMeters_;
}
public static final int DURATION_FIELD_NUMBER = 2;
private com.google.protobuf.Duration duration_;
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*
* @return Whether the duration field is set.
*/
@java.lang.Override
public boolean hasDuration() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*
* @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 leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
@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 = 3;
private com.google.protobuf.Duration staticDuration_;
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
@java.lang.Override
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*
* @return The staticDuration.
*/
@java.lang.Override
public com.google.protobuf.Duration getStaticDuration() {
return staticDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: staticDuration_;
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getStaticDurationOrBuilder() {
return staticDuration_ == null
? com.google.protobuf.Duration.getDefaultInstance()
: staticDuration_;
}
public static final int POLYLINE_FIELD_NUMBER = 4;
private com.google.maps.routing.v2.Polyline polyline_;
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*
* @return Whether the polyline field is set.
*/
@java.lang.Override
public boolean hasPolyline() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*
* @return The polyline.
*/
@java.lang.Override
public com.google.maps.routing.v2.Polyline getPolyline() {
return polyline_ == null ? com.google.maps.routing.v2.Polyline.getDefaultInstance() : polyline_;
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
@java.lang.Override
public com.google.maps.routing.v2.PolylineOrBuilder getPolylineOrBuilder() {
return polyline_ == null ? com.google.maps.routing.v2.Polyline.getDefaultInstance() : polyline_;
}
public static final int START_LOCATION_FIELD_NUMBER = 5;
private com.google.maps.routing.v2.Location startLocation_;
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*
* @return Whether the startLocation field is set.
*/
@java.lang.Override
public boolean hasStartLocation() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*
* @return The startLocation.
*/
@java.lang.Override
public com.google.maps.routing.v2.Location getStartLocation() {
return startLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: startLocation_;
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
@java.lang.Override
public com.google.maps.routing.v2.LocationOrBuilder getStartLocationOrBuilder() {
return startLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: startLocation_;
}
public static final int END_LOCATION_FIELD_NUMBER = 6;
private com.google.maps.routing.v2.Location endLocation_;
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*
* @return Whether the endLocation field is set.
*/
@java.lang.Override
public boolean hasEndLocation() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*
* @return The endLocation.
*/
@java.lang.Override
public com.google.maps.routing.v2.Location getEndLocation() {
return endLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: endLocation_;
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
@java.lang.Override
public com.google.maps.routing.v2.LocationOrBuilder getEndLocationOrBuilder() {
return endLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: endLocation_;
}
public static final int STEPS_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List steps_;
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
@java.lang.Override
public java.util.List getStepsList() {
return steps_;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
@java.lang.Override
public java.util.List extends com.google.maps.routing.v2.RouteLegStepOrBuilder>
getStepsOrBuilderList() {
return steps_;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
@java.lang.Override
public int getStepsCount() {
return steps_.size();
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLegStep getSteps(int index) {
return steps_.get(index);
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLegStepOrBuilder getStepsOrBuilder(int index) {
return steps_.get(index);
}
public static final int TRAVEL_ADVISORY_FIELD_NUMBER = 8;
private com.google.maps.routing.v2.RouteLegTravelAdvisory travelAdvisory_;
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*
* @return Whether the travelAdvisory field is set.
*/
@java.lang.Override
public boolean hasTravelAdvisory() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*
* @return The travelAdvisory.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLegTravelAdvisory getTravelAdvisory() {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteLegTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLegTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder() {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteLegTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
}
public static final int LOCALIZED_VALUES_FIELD_NUMBER = 9;
private com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localizedValues_;
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*
* @return Whether the localizedValues field is set.
*/
@java.lang.Override
public boolean hasLocalizedValues() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*
* @return The localizedValues.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues getLocalizedValues() {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.getDefaultInstance()
: localizedValues_;
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValuesOrBuilder
getLocalizedValuesOrBuilder() {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.getDefaultInstance()
: localizedValues_;
}
public static final int STEPS_OVERVIEW_FIELD_NUMBER = 10;
private com.google.maps.routing.v2.RouteLeg.StepsOverview stepsOverview_;
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*
* @return Whether the stepsOverview field is set.
*/
@java.lang.Override
public boolean hasStepsOverview() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*
* @return The stepsOverview.
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverview getStepsOverview() {
return stepsOverview_ == null
? com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance()
: stepsOverview_;
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg.StepsOverviewOrBuilder getStepsOverviewOrBuilder() {
return stepsOverview_ == null
? com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance()
: stepsOverview_;
}
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 (distanceMeters_ != 0) {
output.writeInt32(1, distanceMeters_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getDuration());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getStaticDuration());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(4, getPolyline());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(5, getStartLocation());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(6, getEndLocation());
}
for (int i = 0; i < steps_.size(); i++) {
output.writeMessage(7, steps_.get(i));
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(8, getTravelAdvisory());
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(9, getLocalizedValues());
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(10, getStepsOverview());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (distanceMeters_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, distanceMeters_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDuration());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStaticDuration());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPolyline());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStartLocation());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndLocation());
}
for (int i = 0; i < steps_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, steps_.get(i));
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTravelAdvisory());
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLocalizedValues());
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getStepsOverview());
}
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.RouteLeg)) {
return super.equals(obj);
}
com.google.maps.routing.v2.RouteLeg other = (com.google.maps.routing.v2.RouteLeg) obj;
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 (hasPolyline() != other.hasPolyline()) return false;
if (hasPolyline()) {
if (!getPolyline().equals(other.getPolyline())) return false;
}
if (hasStartLocation() != other.hasStartLocation()) return false;
if (hasStartLocation()) {
if (!getStartLocation().equals(other.getStartLocation())) return false;
}
if (hasEndLocation() != other.hasEndLocation()) return false;
if (hasEndLocation()) {
if (!getEndLocation().equals(other.getEndLocation())) return false;
}
if (!getStepsList().equals(other.getStepsList())) return false;
if (hasTravelAdvisory() != other.hasTravelAdvisory()) return false;
if (hasTravelAdvisory()) {
if (!getTravelAdvisory().equals(other.getTravelAdvisory())) return false;
}
if (hasLocalizedValues() != other.hasLocalizedValues()) return false;
if (hasLocalizedValues()) {
if (!getLocalizedValues().equals(other.getLocalizedValues())) return false;
}
if (hasStepsOverview() != other.hasStepsOverview()) return false;
if (hasStepsOverview()) {
if (!getStepsOverview().equals(other.getStepsOverview())) 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();
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 (hasPolyline()) {
hash = (37 * hash) + POLYLINE_FIELD_NUMBER;
hash = (53 * hash) + getPolyline().hashCode();
}
if (hasStartLocation()) {
hash = (37 * hash) + START_LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getStartLocation().hashCode();
}
if (hasEndLocation()) {
hash = (37 * hash) + END_LOCATION_FIELD_NUMBER;
hash = (53 * hash) + getEndLocation().hashCode();
}
if (getStepsCount() > 0) {
hash = (37 * hash) + STEPS_FIELD_NUMBER;
hash = (53 * hash) + getStepsList().hashCode();
}
if (hasTravelAdvisory()) {
hash = (37 * hash) + TRAVEL_ADVISORY_FIELD_NUMBER;
hash = (53 * hash) + getTravelAdvisory().hashCode();
}
if (hasLocalizedValues()) {
hash = (37 * hash) + LOCALIZED_VALUES_FIELD_NUMBER;
hash = (53 * hash) + getLocalizedValues().hashCode();
}
if (hasStepsOverview()) {
hash = (37 * hash) + STEPS_OVERVIEW_FIELD_NUMBER;
hash = (53 * hash) + getStepsOverview().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.maps.routing.v2.RouteLeg parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg 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.RouteLeg parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg 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.RouteLeg parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.maps.routing.v2.RouteLeg 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.RouteLeg parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg 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.RouteLeg parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.maps.routing.v2.RouteLeg 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.RouteLeg 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.RouteLeg 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.RouteLeg 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 a segment between non-`via` waypoints.
*
*
* Protobuf type {@code google.maps.routing.v2.RouteLeg}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.maps.routing.v2.RouteLeg)
com.google.maps.routing.v2.RouteLegOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.maps.routing.v2.RouteLeg.class,
com.google.maps.routing.v2.RouteLeg.Builder.class);
}
// Construct using com.google.maps.routing.v2.RouteLeg.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getDurationFieldBuilder();
getStaticDurationFieldBuilder();
getPolylineFieldBuilder();
getStartLocationFieldBuilder();
getEndLocationFieldBuilder();
getStepsFieldBuilder();
getTravelAdvisoryFieldBuilder();
getLocalizedValuesFieldBuilder();
getStepsOverviewFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
distanceMeters_ = 0;
duration_ = null;
if (durationBuilder_ != null) {
durationBuilder_.dispose();
durationBuilder_ = null;
}
staticDuration_ = null;
if (staticDurationBuilder_ != null) {
staticDurationBuilder_.dispose();
staticDurationBuilder_ = null;
}
polyline_ = null;
if (polylineBuilder_ != null) {
polylineBuilder_.dispose();
polylineBuilder_ = null;
}
startLocation_ = null;
if (startLocationBuilder_ != null) {
startLocationBuilder_.dispose();
startLocationBuilder_ = null;
}
endLocation_ = null;
if (endLocationBuilder_ != null) {
endLocationBuilder_.dispose();
endLocationBuilder_ = null;
}
if (stepsBuilder_ == null) {
steps_ = java.util.Collections.emptyList();
} else {
steps_ = null;
stepsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
travelAdvisory_ = null;
if (travelAdvisoryBuilder_ != null) {
travelAdvisoryBuilder_.dispose();
travelAdvisoryBuilder_ = null;
}
localizedValues_ = null;
if (localizedValuesBuilder_ != null) {
localizedValuesBuilder_.dispose();
localizedValuesBuilder_ = null;
}
stepsOverview_ = null;
if (stepsOverviewBuilder_ != null) {
stepsOverviewBuilder_.dispose();
stepsOverviewBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.maps.routing.v2.RouteProto
.internal_static_google_maps_routing_v2_RouteLeg_descriptor;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg getDefaultInstanceForType() {
return com.google.maps.routing.v2.RouteLeg.getDefaultInstance();
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg build() {
com.google.maps.routing.v2.RouteLeg result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.maps.routing.v2.RouteLeg buildPartial() {
com.google.maps.routing.v2.RouteLeg result = new com.google.maps.routing.v2.RouteLeg(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.maps.routing.v2.RouteLeg result) {
if (stepsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
steps_ = java.util.Collections.unmodifiableList(steps_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.steps_ = steps_;
} else {
result.steps_ = stepsBuilder_.build();
}
}
private void buildPartial0(com.google.maps.routing.v2.RouteLeg result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.distanceMeters_ = distanceMeters_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.duration_ = durationBuilder_ == null ? duration_ : durationBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.staticDuration_ =
staticDurationBuilder_ == null ? staticDuration_ : staticDurationBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.polyline_ = polylineBuilder_ == null ? polyline_ : polylineBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.startLocation_ =
startLocationBuilder_ == null ? startLocation_ : startLocationBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.endLocation_ =
endLocationBuilder_ == null ? endLocation_ : endLocationBuilder_.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.localizedValues_ =
localizedValuesBuilder_ == null ? localizedValues_ : localizedValuesBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.stepsOverview_ =
stepsOverviewBuilder_ == null ? stepsOverview_ : stepsOverviewBuilder_.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.RouteLeg) {
return mergeFrom((com.google.maps.routing.v2.RouteLeg) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.maps.routing.v2.RouteLeg other) {
if (other == com.google.maps.routing.v2.RouteLeg.getDefaultInstance()) return this;
if (other.getDistanceMeters() != 0) {
setDistanceMeters(other.getDistanceMeters());
}
if (other.hasDuration()) {
mergeDuration(other.getDuration());
}
if (other.hasStaticDuration()) {
mergeStaticDuration(other.getStaticDuration());
}
if (other.hasPolyline()) {
mergePolyline(other.getPolyline());
}
if (other.hasStartLocation()) {
mergeStartLocation(other.getStartLocation());
}
if (other.hasEndLocation()) {
mergeEndLocation(other.getEndLocation());
}
if (stepsBuilder_ == null) {
if (!other.steps_.isEmpty()) {
if (steps_.isEmpty()) {
steps_ = other.steps_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureStepsIsMutable();
steps_.addAll(other.steps_);
}
onChanged();
}
} else {
if (!other.steps_.isEmpty()) {
if (stepsBuilder_.isEmpty()) {
stepsBuilder_.dispose();
stepsBuilder_ = null;
steps_ = other.steps_;
bitField0_ = (bitField0_ & ~0x00000040);
stepsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getStepsFieldBuilder()
: null;
} else {
stepsBuilder_.addAllMessages(other.steps_);
}
}
}
if (other.hasTravelAdvisory()) {
mergeTravelAdvisory(other.getTravelAdvisory());
}
if (other.hasLocalizedValues()) {
mergeLocalizedValues(other.getLocalizedValues());
}
if (other.hasStepsOverview()) {
mergeStepsOverview(other.getStepsOverview());
}
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:
{
distanceMeters_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
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(getPolylineFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
input.readMessage(getStartLocationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
input.readMessage(getEndLocationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58:
{
com.google.maps.routing.v2.RouteLegStep m =
input.readMessage(
com.google.maps.routing.v2.RouteLegStep.parser(), extensionRegistry);
if (stepsBuilder_ == null) {
ensureStepsIsMutable();
steps_.add(m);
} else {
stepsBuilder_.addMessage(m);
}
break;
} // case 58
case 66:
{
input.readMessage(getTravelAdvisoryFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 74:
{
input.readMessage(getLocalizedValuesFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 74
case 82:
{
input.readMessage(getStepsOverviewFieldBuilder().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 distanceMeters_;
/**
*
*
*
* The travel distance of the route leg, in meters.
*
*
* int32 distance_meters = 1;
*
* @return The distanceMeters.
*/
@java.lang.Override
public int getDistanceMeters() {
return distanceMeters_;
}
/**
*
*
*
* The travel distance of the route leg, in meters.
*
*
* int32 distance_meters = 1;
*
* @param value The distanceMeters to set.
* @return This builder for chaining.
*/
public Builder setDistanceMeters(int value) {
distanceMeters_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The travel distance of the route leg, in meters.
*
*
* int32 distance_meters = 1;
*
* @return This builder for chaining.
*/
public Builder clearDistanceMeters() {
bitField0_ = (bitField0_ & ~0x00000001);
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 leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*
* @return Whether the duration field is set.
*/
public boolean hasDuration() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*
* @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 leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
public Builder setDuration(com.google.protobuf.Duration value) {
if (durationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
duration_ = value;
} else {
durationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
public Builder setDuration(com.google.protobuf.Duration.Builder builderForValue) {
if (durationBuilder_ == null) {
duration_ = builderForValue.build();
} else {
durationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
public Builder mergeDuration(com.google.protobuf.Duration value) {
if (durationBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& duration_ != null
&& duration_ != com.google.protobuf.Duration.getDefaultInstance()) {
getDurationBuilder().mergeFrom(value);
} else {
duration_ = value;
}
} else {
durationBuilder_.mergeFrom(value);
}
if (duration_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
public Builder clearDuration() {
bitField0_ = (bitField0_ & ~0x00000002);
duration_ = null;
if (durationBuilder_ != null) {
durationBuilder_.dispose();
durationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
public com.google.protobuf.Duration.Builder getDurationBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* The length of time needed to navigate the leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
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 leg. If the `route_preference`
* is set to `TRAFFIC_UNAWARE`, then this value is the same as
* `static_duration`. If the `route_preference` is either `TRAFFIC_AWARE` or
* `TRAFFIC_AWARE_OPTIMAL`, then this value is calculated taking traffic
* conditions into account.
*
*
* .google.protobuf.Duration duration = 2;
*/
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 travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*
* @return Whether the staticDuration field is set.
*/
public boolean hasStaticDuration() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*
* @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 travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
public Builder setStaticDuration(com.google.protobuf.Duration value) {
if (staticDurationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
staticDuration_ = value;
} else {
staticDurationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
public Builder setStaticDuration(com.google.protobuf.Duration.Builder builderForValue) {
if (staticDurationBuilder_ == null) {
staticDuration_ = builderForValue.build();
} else {
staticDurationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
public Builder mergeStaticDuration(com.google.protobuf.Duration value) {
if (staticDurationBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& staticDuration_ != null
&& staticDuration_ != com.google.protobuf.Duration.getDefaultInstance()) {
getStaticDurationBuilder().mergeFrom(value);
} else {
staticDuration_ = value;
}
} else {
staticDurationBuilder_.mergeFrom(value);
}
if (staticDuration_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
public Builder clearStaticDuration() {
bitField0_ = (bitField0_ & ~0x00000004);
staticDuration_ = null;
if (staticDurationBuilder_ != null) {
staticDurationBuilder_.dispose();
staticDurationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
public com.google.protobuf.Duration.Builder getStaticDurationBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getStaticDurationFieldBuilder().getBuilder();
}
/**
*
*
*
* The duration of travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
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 travel through the leg, calculated without taking
* traffic conditions into consideration.
*
*
* .google.protobuf.Duration static_duration = 3;
*/
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.Polyline polyline_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Polyline,
com.google.maps.routing.v2.Polyline.Builder,
com.google.maps.routing.v2.PolylineOrBuilder>
polylineBuilder_;
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*
* @return Whether the polyline field is set.
*/
public boolean hasPolyline() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*
* @return The polyline.
*/
public com.google.maps.routing.v2.Polyline getPolyline() {
if (polylineBuilder_ == null) {
return polyline_ == null
? com.google.maps.routing.v2.Polyline.getDefaultInstance()
: polyline_;
} else {
return polylineBuilder_.getMessage();
}
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
public Builder setPolyline(com.google.maps.routing.v2.Polyline value) {
if (polylineBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
polyline_ = value;
} else {
polylineBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
public Builder setPolyline(com.google.maps.routing.v2.Polyline.Builder builderForValue) {
if (polylineBuilder_ == null) {
polyline_ = builderForValue.build();
} else {
polylineBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
public Builder mergePolyline(com.google.maps.routing.v2.Polyline value) {
if (polylineBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& polyline_ != null
&& polyline_ != com.google.maps.routing.v2.Polyline.getDefaultInstance()) {
getPolylineBuilder().mergeFrom(value);
} else {
polyline_ = value;
}
} else {
polylineBuilder_.mergeFrom(value);
}
if (polyline_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
public Builder clearPolyline() {
bitField0_ = (bitField0_ & ~0x00000008);
polyline_ = null;
if (polylineBuilder_ != null) {
polylineBuilder_.dispose();
polylineBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
public com.google.maps.routing.v2.Polyline.Builder getPolylineBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getPolylineFieldBuilder().getBuilder();
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
public com.google.maps.routing.v2.PolylineOrBuilder getPolylineOrBuilder() {
if (polylineBuilder_ != null) {
return polylineBuilder_.getMessageOrBuilder();
} else {
return polyline_ == null
? com.google.maps.routing.v2.Polyline.getDefaultInstance()
: polyline_;
}
}
/**
*
*
*
* The overall polyline for this leg that includes each `step`'s
* polyline.
*
*
* .google.maps.routing.v2.Polyline polyline = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Polyline,
com.google.maps.routing.v2.Polyline.Builder,
com.google.maps.routing.v2.PolylineOrBuilder>
getPolylineFieldBuilder() {
if (polylineBuilder_ == null) {
polylineBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Polyline,
com.google.maps.routing.v2.Polyline.Builder,
com.google.maps.routing.v2.PolylineOrBuilder>(
getPolyline(), getParentForChildren(), isClean());
polyline_ = null;
}
return polylineBuilder_;
}
private com.google.maps.routing.v2.Location startLocation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Location,
com.google.maps.routing.v2.Location.Builder,
com.google.maps.routing.v2.LocationOrBuilder>
startLocationBuilder_;
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*
* @return Whether the startLocation field is set.
*/
public boolean hasStartLocation() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*
* @return The startLocation.
*/
public com.google.maps.routing.v2.Location getStartLocation() {
if (startLocationBuilder_ == null) {
return startLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: startLocation_;
} else {
return startLocationBuilder_.getMessage();
}
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
public Builder setStartLocation(com.google.maps.routing.v2.Location value) {
if (startLocationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
startLocation_ = value;
} else {
startLocationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
public Builder setStartLocation(com.google.maps.routing.v2.Location.Builder builderForValue) {
if (startLocationBuilder_ == null) {
startLocation_ = builderForValue.build();
} else {
startLocationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
public Builder mergeStartLocation(com.google.maps.routing.v2.Location value) {
if (startLocationBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)
&& startLocation_ != null
&& startLocation_ != com.google.maps.routing.v2.Location.getDefaultInstance()) {
getStartLocationBuilder().mergeFrom(value);
} else {
startLocation_ = value;
}
} else {
startLocationBuilder_.mergeFrom(value);
}
if (startLocation_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
public Builder clearStartLocation() {
bitField0_ = (bitField0_ & ~0x00000010);
startLocation_ = null;
if (startLocationBuilder_ != null) {
startLocationBuilder_.dispose();
startLocationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
public com.google.maps.routing.v2.Location.Builder getStartLocationBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getStartLocationFieldBuilder().getBuilder();
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
public com.google.maps.routing.v2.LocationOrBuilder getStartLocationOrBuilder() {
if (startLocationBuilder_ != null) {
return startLocationBuilder_.getMessageOrBuilder();
} else {
return startLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: startLocation_;
}
}
/**
*
*
*
* The start location of this leg. This location might be different from the
* provided `origin`. For example, when the provided `origin` is not near a
* road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location start_location = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Location,
com.google.maps.routing.v2.Location.Builder,
com.google.maps.routing.v2.LocationOrBuilder>
getStartLocationFieldBuilder() {
if (startLocationBuilder_ == null) {
startLocationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Location,
com.google.maps.routing.v2.Location.Builder,
com.google.maps.routing.v2.LocationOrBuilder>(
getStartLocation(), getParentForChildren(), isClean());
startLocation_ = null;
}
return startLocationBuilder_;
}
private com.google.maps.routing.v2.Location endLocation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Location,
com.google.maps.routing.v2.Location.Builder,
com.google.maps.routing.v2.LocationOrBuilder>
endLocationBuilder_;
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*
* @return Whether the endLocation field is set.
*/
public boolean hasEndLocation() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*
* @return The endLocation.
*/
public com.google.maps.routing.v2.Location getEndLocation() {
if (endLocationBuilder_ == null) {
return endLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: endLocation_;
} else {
return endLocationBuilder_.getMessage();
}
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
public Builder setEndLocation(com.google.maps.routing.v2.Location value) {
if (endLocationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
endLocation_ = value;
} else {
endLocationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
public Builder setEndLocation(com.google.maps.routing.v2.Location.Builder builderForValue) {
if (endLocationBuilder_ == null) {
endLocation_ = builderForValue.build();
} else {
endLocationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
public Builder mergeEndLocation(com.google.maps.routing.v2.Location value) {
if (endLocationBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& endLocation_ != null
&& endLocation_ != com.google.maps.routing.v2.Location.getDefaultInstance()) {
getEndLocationBuilder().mergeFrom(value);
} else {
endLocation_ = value;
}
} else {
endLocationBuilder_.mergeFrom(value);
}
if (endLocation_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
public Builder clearEndLocation() {
bitField0_ = (bitField0_ & ~0x00000020);
endLocation_ = null;
if (endLocationBuilder_ != null) {
endLocationBuilder_.dispose();
endLocationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
public com.google.maps.routing.v2.Location.Builder getEndLocationBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getEndLocationFieldBuilder().getBuilder();
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
public com.google.maps.routing.v2.LocationOrBuilder getEndLocationOrBuilder() {
if (endLocationBuilder_ != null) {
return endLocationBuilder_.getMessageOrBuilder();
} else {
return endLocation_ == null
? com.google.maps.routing.v2.Location.getDefaultInstance()
: endLocation_;
}
}
/**
*
*
*
* The end location of this leg. This location might be different from the
* provided `destination`. For example, when the provided `destination` is not
* near a road, this is a point on the road.
*
*
* .google.maps.routing.v2.Location end_location = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Location,
com.google.maps.routing.v2.Location.Builder,
com.google.maps.routing.v2.LocationOrBuilder>
getEndLocationFieldBuilder() {
if (endLocationBuilder_ == null) {
endLocationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.Location,
com.google.maps.routing.v2.Location.Builder,
com.google.maps.routing.v2.LocationOrBuilder>(
getEndLocation(), getParentForChildren(), isClean());
endLocation_ = null;
}
return endLocationBuilder_;
}
private java.util.List steps_ =
java.util.Collections.emptyList();
private void ensureStepsIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
steps_ = new java.util.ArrayList(steps_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routing.v2.RouteLegStep,
com.google.maps.routing.v2.RouteLegStep.Builder,
com.google.maps.routing.v2.RouteLegStepOrBuilder>
stepsBuilder_;
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public java.util.List getStepsList() {
if (stepsBuilder_ == null) {
return java.util.Collections.unmodifiableList(steps_);
} else {
return stepsBuilder_.getMessageList();
}
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public int getStepsCount() {
if (stepsBuilder_ == null) {
return steps_.size();
} else {
return stepsBuilder_.getCount();
}
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public com.google.maps.routing.v2.RouteLegStep getSteps(int index) {
if (stepsBuilder_ == null) {
return steps_.get(index);
} else {
return stepsBuilder_.getMessage(index);
}
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder setSteps(int index, com.google.maps.routing.v2.RouteLegStep value) {
if (stepsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.set(index, value);
onChanged();
} else {
stepsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder setSteps(
int index, com.google.maps.routing.v2.RouteLegStep.Builder builderForValue) {
if (stepsBuilder_ == null) {
ensureStepsIsMutable();
steps_.set(index, builderForValue.build());
onChanged();
} else {
stepsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder addSteps(com.google.maps.routing.v2.RouteLegStep value) {
if (stepsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.add(value);
onChanged();
} else {
stepsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder addSteps(int index, com.google.maps.routing.v2.RouteLegStep value) {
if (stepsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureStepsIsMutable();
steps_.add(index, value);
onChanged();
} else {
stepsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder addSteps(com.google.maps.routing.v2.RouteLegStep.Builder builderForValue) {
if (stepsBuilder_ == null) {
ensureStepsIsMutable();
steps_.add(builderForValue.build());
onChanged();
} else {
stepsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder addSteps(
int index, com.google.maps.routing.v2.RouteLegStep.Builder builderForValue) {
if (stepsBuilder_ == null) {
ensureStepsIsMutable();
steps_.add(index, builderForValue.build());
onChanged();
} else {
stepsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder addAllSteps(
java.lang.Iterable extends com.google.maps.routing.v2.RouteLegStep> values) {
if (stepsBuilder_ == null) {
ensureStepsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_);
onChanged();
} else {
stepsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder clearSteps() {
if (stepsBuilder_ == null) {
steps_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
stepsBuilder_.clear();
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public Builder removeSteps(int index) {
if (stepsBuilder_ == null) {
ensureStepsIsMutable();
steps_.remove(index);
onChanged();
} else {
stepsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public com.google.maps.routing.v2.RouteLegStep.Builder getStepsBuilder(int index) {
return getStepsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public com.google.maps.routing.v2.RouteLegStepOrBuilder getStepsOrBuilder(int index) {
if (stepsBuilder_ == null) {
return steps_.get(index);
} else {
return stepsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public java.util.List extends com.google.maps.routing.v2.RouteLegStepOrBuilder>
getStepsOrBuilderList() {
if (stepsBuilder_ != null) {
return stepsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(steps_);
}
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public com.google.maps.routing.v2.RouteLegStep.Builder addStepsBuilder() {
return getStepsFieldBuilder()
.addBuilder(com.google.maps.routing.v2.RouteLegStep.getDefaultInstance());
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public com.google.maps.routing.v2.RouteLegStep.Builder addStepsBuilder(int index) {
return getStepsFieldBuilder()
.addBuilder(index, com.google.maps.routing.v2.RouteLegStep.getDefaultInstance());
}
/**
*
*
*
* An array of steps denoting segments within this leg. Each step represents
* one navigation instruction.
*
*
* repeated .google.maps.routing.v2.RouteLegStep steps = 7;
*/
public java.util.List getStepsBuilderList() {
return getStepsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routing.v2.RouteLegStep,
com.google.maps.routing.v2.RouteLegStep.Builder,
com.google.maps.routing.v2.RouteLegStepOrBuilder>
getStepsFieldBuilder() {
if (stepsBuilder_ == null) {
stepsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.maps.routing.v2.RouteLegStep,
com.google.maps.routing.v2.RouteLegStep.Builder,
com.google.maps.routing.v2.RouteLegStepOrBuilder>(
steps_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean());
steps_ = null;
}
return stepsBuilder_;
}
private com.google.maps.routing.v2.RouteLegTravelAdvisory travelAdvisory_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLegTravelAdvisory,
com.google.maps.routing.v2.RouteLegTravelAdvisory.Builder,
com.google.maps.routing.v2.RouteLegTravelAdvisoryOrBuilder>
travelAdvisoryBuilder_;
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*
* @return Whether the travelAdvisory field is set.
*/
public boolean hasTravelAdvisory() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*
* @return The travelAdvisory.
*/
public com.google.maps.routing.v2.RouteLegTravelAdvisory getTravelAdvisory() {
if (travelAdvisoryBuilder_ == null) {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteLegTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
} else {
return travelAdvisoryBuilder_.getMessage();
}
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
public Builder setTravelAdvisory(com.google.maps.routing.v2.RouteLegTravelAdvisory value) {
if (travelAdvisoryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
travelAdvisory_ = value;
} else {
travelAdvisoryBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
public Builder setTravelAdvisory(
com.google.maps.routing.v2.RouteLegTravelAdvisory.Builder builderForValue) {
if (travelAdvisoryBuilder_ == null) {
travelAdvisory_ = builderForValue.build();
} else {
travelAdvisoryBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
public Builder mergeTravelAdvisory(com.google.maps.routing.v2.RouteLegTravelAdvisory value) {
if (travelAdvisoryBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& travelAdvisory_ != null
&& travelAdvisory_
!= com.google.maps.routing.v2.RouteLegTravelAdvisory.getDefaultInstance()) {
getTravelAdvisoryBuilder().mergeFrom(value);
} else {
travelAdvisory_ = value;
}
} else {
travelAdvisoryBuilder_.mergeFrom(value);
}
if (travelAdvisory_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
public Builder clearTravelAdvisory() {
bitField0_ = (bitField0_ & ~0x00000080);
travelAdvisory_ = null;
if (travelAdvisoryBuilder_ != null) {
travelAdvisoryBuilder_.dispose();
travelAdvisoryBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
public com.google.maps.routing.v2.RouteLegTravelAdvisory.Builder getTravelAdvisoryBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getTravelAdvisoryFieldBuilder().getBuilder();
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
public com.google.maps.routing.v2.RouteLegTravelAdvisoryOrBuilder getTravelAdvisoryOrBuilder() {
if (travelAdvisoryBuilder_ != null) {
return travelAdvisoryBuilder_.getMessageOrBuilder();
} else {
return travelAdvisory_ == null
? com.google.maps.routing.v2.RouteLegTravelAdvisory.getDefaultInstance()
: travelAdvisory_;
}
}
/**
*
*
*
* Contains the additional information that the user should be informed
* about, such as possible traffic zone restrictions, on a route leg.
*
*
* .google.maps.routing.v2.RouteLegTravelAdvisory travel_advisory = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLegTravelAdvisory,
com.google.maps.routing.v2.RouteLegTravelAdvisory.Builder,
com.google.maps.routing.v2.RouteLegTravelAdvisoryOrBuilder>
getTravelAdvisoryFieldBuilder() {
if (travelAdvisoryBuilder_ == null) {
travelAdvisoryBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLegTravelAdvisory,
com.google.maps.routing.v2.RouteLegTravelAdvisory.Builder,
com.google.maps.routing.v2.RouteLegTravelAdvisoryOrBuilder>(
getTravelAdvisory(), getParentForChildren(), isClean());
travelAdvisory_ = null;
}
return travelAdvisoryBuilder_;
}
private com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localizedValues_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.Builder,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValuesOrBuilder>
localizedValuesBuilder_;
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*
* @return Whether the localizedValues field is set.
*/
public boolean hasLocalizedValues() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*
* @return The localizedValues.
*/
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues getLocalizedValues() {
if (localizedValuesBuilder_ == null) {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.getDefaultInstance()
: localizedValues_;
} else {
return localizedValuesBuilder_.getMessage();
}
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
public Builder setLocalizedValues(
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues value) {
if (localizedValuesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
localizedValues_ = value;
} else {
localizedValuesBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
public Builder setLocalizedValues(
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.Builder builderForValue) {
if (localizedValuesBuilder_ == null) {
localizedValues_ = builderForValue.build();
} else {
localizedValuesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
public Builder mergeLocalizedValues(
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues value) {
if (localizedValuesBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)
&& localizedValues_ != null
&& localizedValues_
!= com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues
.getDefaultInstance()) {
getLocalizedValuesBuilder().mergeFrom(value);
} else {
localizedValues_ = value;
}
} else {
localizedValuesBuilder_.mergeFrom(value);
}
if (localizedValues_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
public Builder clearLocalizedValues() {
bitField0_ = (bitField0_ & ~0x00000100);
localizedValues_ = null;
if (localizedValuesBuilder_ != null) {
localizedValuesBuilder_.dispose();
localizedValuesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.Builder
getLocalizedValuesBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getLocalizedValuesFieldBuilder().getBuilder();
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
public com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValuesOrBuilder
getLocalizedValuesOrBuilder() {
if (localizedValuesBuilder_ != null) {
return localizedValuesBuilder_.getMessageOrBuilder();
} else {
return localizedValues_ == null
? com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.getDefaultInstance()
: localizedValues_;
}
}
/**
*
*
*
* Text representations of properties of the `RouteLeg`.
*
*
* .google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues localized_values = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.Builder,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValuesOrBuilder>
getLocalizedValuesFieldBuilder() {
if (localizedValuesBuilder_ == null) {
localizedValuesBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValues.Builder,
com.google.maps.routing.v2.RouteLeg.RouteLegLocalizedValuesOrBuilder>(
getLocalizedValues(), getParentForChildren(), isClean());
localizedValues_ = null;
}
return localizedValuesBuilder_;
}
private com.google.maps.routing.v2.RouteLeg.StepsOverview stepsOverview_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.StepsOverview,
com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder,
com.google.maps.routing.v2.RouteLeg.StepsOverviewOrBuilder>
stepsOverviewBuilder_;
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*
* @return Whether the stepsOverview field is set.
*/
public boolean hasStepsOverview() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*
* @return The stepsOverview.
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview getStepsOverview() {
if (stepsOverviewBuilder_ == null) {
return stepsOverview_ == null
? com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance()
: stepsOverview_;
} else {
return stepsOverviewBuilder_.getMessage();
}
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
public Builder setStepsOverview(com.google.maps.routing.v2.RouteLeg.StepsOverview value) {
if (stepsOverviewBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
stepsOverview_ = value;
} else {
stepsOverviewBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
public Builder setStepsOverview(
com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder builderForValue) {
if (stepsOverviewBuilder_ == null) {
stepsOverview_ = builderForValue.build();
} else {
stepsOverviewBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
public Builder mergeStepsOverview(com.google.maps.routing.v2.RouteLeg.StepsOverview value) {
if (stepsOverviewBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)
&& stepsOverview_ != null
&& stepsOverview_
!= com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance()) {
getStepsOverviewBuilder().mergeFrom(value);
} else {
stepsOverview_ = value;
}
} else {
stepsOverviewBuilder_.mergeFrom(value);
}
if (stepsOverview_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
public Builder clearStepsOverview() {
bitField0_ = (bitField0_ & ~0x00000200);
stepsOverview_ = null;
if (stepsOverviewBuilder_ != null) {
stepsOverviewBuilder_.dispose();
stepsOverviewBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder getStepsOverviewBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getStepsOverviewFieldBuilder().getBuilder();
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
public com.google.maps.routing.v2.RouteLeg.StepsOverviewOrBuilder getStepsOverviewOrBuilder() {
if (stepsOverviewBuilder_ != null) {
return stepsOverviewBuilder_.getMessageOrBuilder();
} else {
return stepsOverview_ == null
? com.google.maps.routing.v2.RouteLeg.StepsOverview.getDefaultInstance()
: stepsOverview_;
}
}
/**
*
*
*
* Overview information about the steps in this `RouteLeg`. This field is only
* populated for TRANSIT routes.
*
*
* .google.maps.routing.v2.RouteLeg.StepsOverview steps_overview = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.StepsOverview,
com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder,
com.google.maps.routing.v2.RouteLeg.StepsOverviewOrBuilder>
getStepsOverviewFieldBuilder() {
if (stepsOverviewBuilder_ == null) {
stepsOverviewBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.maps.routing.v2.RouteLeg.StepsOverview,
com.google.maps.routing.v2.RouteLeg.StepsOverview.Builder,
com.google.maps.routing.v2.RouteLeg.StepsOverviewOrBuilder>(
getStepsOverview(), getParentForChildren(), isClean());
stepsOverview_ = null;
}
return stepsOverviewBuilder_;
}
@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.RouteLeg)
}
// @@protoc_insertion_point(class_scope:google.maps.routing.v2.RouteLeg)
private static final com.google.maps.routing.v2.RouteLeg DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.maps.routing.v2.RouteLeg();
}
public static com.google.maps.routing.v2.RouteLeg getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RouteLeg 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.RouteLeg getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy