1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/maps/routing/v2/geocoding_results.proto 18 19 package com.google.maps.routing.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * Details about the locations used as waypoints. Only populated for address 26 * waypoints. Includes details about the geocoding results for the purposes of 27 * determining what the address was geocoded to. 28 * </pre> 29 * 30 * Protobuf type {@code google.maps.routing.v2.GeocodedWaypoint} 31 */ 32 public final class GeocodedWaypoint extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:google.maps.routing.v2.GeocodedWaypoint) 35 GeocodedWaypointOrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use GeocodedWaypoint.newBuilder() to construct. GeocodedWaypoint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private GeocodedWaypoint(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 39 super(builder); 40 } 41 GeocodedWaypoint()42 private GeocodedWaypoint() { 43 type_ = com.google.protobuf.LazyStringArrayList.EMPTY; 44 placeId_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new GeocodedWaypoint(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.maps.routing.v2.GeocodingResultsProto 60 .internal_static_google_maps_routing_v2_GeocodedWaypoint_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.maps.routing.v2.GeocodingResultsProto 67 .internal_static_google_maps_routing_v2_GeocodedWaypoint_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.maps.routing.v2.GeocodedWaypoint.class, 70 com.google.maps.routing.v2.GeocodedWaypoint.Builder.class); 71 } 72 73 private int bitField0_; 74 public static final int GEOCODER_STATUS_FIELD_NUMBER = 1; 75 private com.google.rpc.Status geocoderStatus_; 76 /** 77 * 78 * 79 * <pre> 80 * Indicates the status code resulting from the geocoding operation. 81 * </pre> 82 * 83 * <code>.google.rpc.Status geocoder_status = 1;</code> 84 * 85 * @return Whether the geocoderStatus field is set. 86 */ 87 @java.lang.Override hasGeocoderStatus()88 public boolean hasGeocoderStatus() { 89 return geocoderStatus_ != null; 90 } 91 /** 92 * 93 * 94 * <pre> 95 * Indicates the status code resulting from the geocoding operation. 96 * </pre> 97 * 98 * <code>.google.rpc.Status geocoder_status = 1;</code> 99 * 100 * @return The geocoderStatus. 101 */ 102 @java.lang.Override getGeocoderStatus()103 public com.google.rpc.Status getGeocoderStatus() { 104 return geocoderStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : geocoderStatus_; 105 } 106 /** 107 * 108 * 109 * <pre> 110 * Indicates the status code resulting from the geocoding operation. 111 * </pre> 112 * 113 * <code>.google.rpc.Status geocoder_status = 1;</code> 114 */ 115 @java.lang.Override getGeocoderStatusOrBuilder()116 public com.google.rpc.StatusOrBuilder getGeocoderStatusOrBuilder() { 117 return geocoderStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : geocoderStatus_; 118 } 119 120 public static final int INTERMEDIATE_WAYPOINT_REQUEST_INDEX_FIELD_NUMBER = 2; 121 private int intermediateWaypointRequestIndex_ = 0; 122 /** 123 * 124 * 125 * <pre> 126 * The index of the corresponding intermediate waypoint in the request. 127 * Only populated if the corresponding waypoint is an intermediate 128 * waypoint. 129 * </pre> 130 * 131 * <code>optional int32 intermediate_waypoint_request_index = 2;</code> 132 * 133 * @return Whether the intermediateWaypointRequestIndex field is set. 134 */ 135 @java.lang.Override hasIntermediateWaypointRequestIndex()136 public boolean hasIntermediateWaypointRequestIndex() { 137 return ((bitField0_ & 0x00000001) != 0); 138 } 139 /** 140 * 141 * 142 * <pre> 143 * The index of the corresponding intermediate waypoint in the request. 144 * Only populated if the corresponding waypoint is an intermediate 145 * waypoint. 146 * </pre> 147 * 148 * <code>optional int32 intermediate_waypoint_request_index = 2;</code> 149 * 150 * @return The intermediateWaypointRequestIndex. 151 */ 152 @java.lang.Override getIntermediateWaypointRequestIndex()153 public int getIntermediateWaypointRequestIndex() { 154 return intermediateWaypointRequestIndex_; 155 } 156 157 public static final int TYPE_FIELD_NUMBER = 3; 158 159 @SuppressWarnings("serial") 160 private com.google.protobuf.LazyStringList type_; 161 /** 162 * 163 * 164 * <pre> 165 * The type(s) of the result, in the form of zero or more type tags. 166 * Supported types: 167 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 168 * </pre> 169 * 170 * <code>repeated string type = 3;</code> 171 * 172 * @return A list containing the type. 173 */ getTypeList()174 public com.google.protobuf.ProtocolStringList getTypeList() { 175 return type_; 176 } 177 /** 178 * 179 * 180 * <pre> 181 * The type(s) of the result, in the form of zero or more type tags. 182 * Supported types: 183 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 184 * </pre> 185 * 186 * <code>repeated string type = 3;</code> 187 * 188 * @return The count of type. 189 */ getTypeCount()190 public int getTypeCount() { 191 return type_.size(); 192 } 193 /** 194 * 195 * 196 * <pre> 197 * The type(s) of the result, in the form of zero or more type tags. 198 * Supported types: 199 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 200 * </pre> 201 * 202 * <code>repeated string type = 3;</code> 203 * 204 * @param index The index of the element to return. 205 * @return The type at the given index. 206 */ getType(int index)207 public java.lang.String getType(int index) { 208 return type_.get(index); 209 } 210 /** 211 * 212 * 213 * <pre> 214 * The type(s) of the result, in the form of zero or more type tags. 215 * Supported types: 216 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 217 * </pre> 218 * 219 * <code>repeated string type = 3;</code> 220 * 221 * @param index The index of the value to return. 222 * @return The bytes of the type at the given index. 223 */ getTypeBytes(int index)224 public com.google.protobuf.ByteString getTypeBytes(int index) { 225 return type_.getByteString(index); 226 } 227 228 public static final int PARTIAL_MATCH_FIELD_NUMBER = 4; 229 private boolean partialMatch_ = false; 230 /** 231 * 232 * 233 * <pre> 234 * Indicates that the geocoder did not return an exact match for the original 235 * request, though it was able to match part of the requested address. You may 236 * wish to examine the original request for misspellings and/or an incomplete 237 * address. 238 * </pre> 239 * 240 * <code>bool partial_match = 4;</code> 241 * 242 * @return The partialMatch. 243 */ 244 @java.lang.Override getPartialMatch()245 public boolean getPartialMatch() { 246 return partialMatch_; 247 } 248 249 public static final int PLACE_ID_FIELD_NUMBER = 5; 250 251 @SuppressWarnings("serial") 252 private volatile java.lang.Object placeId_ = ""; 253 /** 254 * 255 * 256 * <pre> 257 * The place ID for this result. 258 * </pre> 259 * 260 * <code>string place_id = 5;</code> 261 * 262 * @return The placeId. 263 */ 264 @java.lang.Override getPlaceId()265 public java.lang.String getPlaceId() { 266 java.lang.Object ref = placeId_; 267 if (ref instanceof java.lang.String) { 268 return (java.lang.String) ref; 269 } else { 270 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 271 java.lang.String s = bs.toStringUtf8(); 272 placeId_ = s; 273 return s; 274 } 275 } 276 /** 277 * 278 * 279 * <pre> 280 * The place ID for this result. 281 * </pre> 282 * 283 * <code>string place_id = 5;</code> 284 * 285 * @return The bytes for placeId. 286 */ 287 @java.lang.Override getPlaceIdBytes()288 public com.google.protobuf.ByteString getPlaceIdBytes() { 289 java.lang.Object ref = placeId_; 290 if (ref instanceof java.lang.String) { 291 com.google.protobuf.ByteString b = 292 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 293 placeId_ = b; 294 return b; 295 } else { 296 return (com.google.protobuf.ByteString) ref; 297 } 298 } 299 300 private byte memoizedIsInitialized = -1; 301 302 @java.lang.Override isInitialized()303 public final boolean isInitialized() { 304 byte isInitialized = memoizedIsInitialized; 305 if (isInitialized == 1) return true; 306 if (isInitialized == 0) return false; 307 308 memoizedIsInitialized = 1; 309 return true; 310 } 311 312 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)313 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 314 if (geocoderStatus_ != null) { 315 output.writeMessage(1, getGeocoderStatus()); 316 } 317 if (((bitField0_ & 0x00000001) != 0)) { 318 output.writeInt32(2, intermediateWaypointRequestIndex_); 319 } 320 for (int i = 0; i < type_.size(); i++) { 321 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_.getRaw(i)); 322 } 323 if (partialMatch_ != false) { 324 output.writeBool(4, partialMatch_); 325 } 326 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placeId_)) { 327 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, placeId_); 328 } 329 getUnknownFields().writeTo(output); 330 } 331 332 @java.lang.Override getSerializedSize()333 public int getSerializedSize() { 334 int size = memoizedSize; 335 if (size != -1) return size; 336 337 size = 0; 338 if (geocoderStatus_ != null) { 339 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGeocoderStatus()); 340 } 341 if (((bitField0_ & 0x00000001) != 0)) { 342 size += 343 com.google.protobuf.CodedOutputStream.computeInt32Size( 344 2, intermediateWaypointRequestIndex_); 345 } 346 { 347 int dataSize = 0; 348 for (int i = 0; i < type_.size(); i++) { 349 dataSize += computeStringSizeNoTag(type_.getRaw(i)); 350 } 351 size += dataSize; 352 size += 1 * getTypeList().size(); 353 } 354 if (partialMatch_ != false) { 355 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, partialMatch_); 356 } 357 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(placeId_)) { 358 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, placeId_); 359 } 360 size += getUnknownFields().getSerializedSize(); 361 memoizedSize = size; 362 return size; 363 } 364 365 @java.lang.Override equals(final java.lang.Object obj)366 public boolean equals(final java.lang.Object obj) { 367 if (obj == this) { 368 return true; 369 } 370 if (!(obj instanceof com.google.maps.routing.v2.GeocodedWaypoint)) { 371 return super.equals(obj); 372 } 373 com.google.maps.routing.v2.GeocodedWaypoint other = 374 (com.google.maps.routing.v2.GeocodedWaypoint) obj; 375 376 if (hasGeocoderStatus() != other.hasGeocoderStatus()) return false; 377 if (hasGeocoderStatus()) { 378 if (!getGeocoderStatus().equals(other.getGeocoderStatus())) return false; 379 } 380 if (hasIntermediateWaypointRequestIndex() != other.hasIntermediateWaypointRequestIndex()) 381 return false; 382 if (hasIntermediateWaypointRequestIndex()) { 383 if (getIntermediateWaypointRequestIndex() != other.getIntermediateWaypointRequestIndex()) 384 return false; 385 } 386 if (!getTypeList().equals(other.getTypeList())) return false; 387 if (getPartialMatch() != other.getPartialMatch()) return false; 388 if (!getPlaceId().equals(other.getPlaceId())) return false; 389 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 390 return true; 391 } 392 393 @java.lang.Override hashCode()394 public int hashCode() { 395 if (memoizedHashCode != 0) { 396 return memoizedHashCode; 397 } 398 int hash = 41; 399 hash = (19 * hash) + getDescriptor().hashCode(); 400 if (hasGeocoderStatus()) { 401 hash = (37 * hash) + GEOCODER_STATUS_FIELD_NUMBER; 402 hash = (53 * hash) + getGeocoderStatus().hashCode(); 403 } 404 if (hasIntermediateWaypointRequestIndex()) { 405 hash = (37 * hash) + INTERMEDIATE_WAYPOINT_REQUEST_INDEX_FIELD_NUMBER; 406 hash = (53 * hash) + getIntermediateWaypointRequestIndex(); 407 } 408 if (getTypeCount() > 0) { 409 hash = (37 * hash) + TYPE_FIELD_NUMBER; 410 hash = (53 * hash) + getTypeList().hashCode(); 411 } 412 hash = (37 * hash) + PARTIAL_MATCH_FIELD_NUMBER; 413 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPartialMatch()); 414 hash = (37 * hash) + PLACE_ID_FIELD_NUMBER; 415 hash = (53 * hash) + getPlaceId().hashCode(); 416 hash = (29 * hash) + getUnknownFields().hashCode(); 417 memoizedHashCode = hash; 418 return hash; 419 } 420 parseFrom(java.nio.ByteBuffer data)421 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom(java.nio.ByteBuffer data) 422 throws com.google.protobuf.InvalidProtocolBufferException { 423 return PARSER.parseFrom(data); 424 } 425 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)426 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 427 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 428 throws com.google.protobuf.InvalidProtocolBufferException { 429 return PARSER.parseFrom(data, extensionRegistry); 430 } 431 parseFrom( com.google.protobuf.ByteString data)432 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 433 com.google.protobuf.ByteString data) 434 throws com.google.protobuf.InvalidProtocolBufferException { 435 return PARSER.parseFrom(data); 436 } 437 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)438 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 439 com.google.protobuf.ByteString data, 440 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 441 throws com.google.protobuf.InvalidProtocolBufferException { 442 return PARSER.parseFrom(data, extensionRegistry); 443 } 444 parseFrom(byte[] data)445 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom(byte[] data) 446 throws com.google.protobuf.InvalidProtocolBufferException { 447 return PARSER.parseFrom(data); 448 } 449 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)450 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 451 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 452 throws com.google.protobuf.InvalidProtocolBufferException { 453 return PARSER.parseFrom(data, extensionRegistry); 454 } 455 parseFrom(java.io.InputStream input)456 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom(java.io.InputStream input) 457 throws java.io.IOException { 458 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 459 } 460 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)461 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 462 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 463 throws java.io.IOException { 464 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 465 PARSER, input, extensionRegistry); 466 } 467 parseDelimitedFrom( java.io.InputStream input)468 public static com.google.maps.routing.v2.GeocodedWaypoint parseDelimitedFrom( 469 java.io.InputStream input) throws java.io.IOException { 470 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 471 } 472 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)473 public static com.google.maps.routing.v2.GeocodedWaypoint parseDelimitedFrom( 474 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 475 throws java.io.IOException { 476 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 477 PARSER, input, extensionRegistry); 478 } 479 parseFrom( com.google.protobuf.CodedInputStream input)480 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 481 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 482 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 483 } 484 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)485 public static com.google.maps.routing.v2.GeocodedWaypoint parseFrom( 486 com.google.protobuf.CodedInputStream input, 487 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 488 throws java.io.IOException { 489 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 490 PARSER, input, extensionRegistry); 491 } 492 493 @java.lang.Override newBuilderForType()494 public Builder newBuilderForType() { 495 return newBuilder(); 496 } 497 newBuilder()498 public static Builder newBuilder() { 499 return DEFAULT_INSTANCE.toBuilder(); 500 } 501 newBuilder(com.google.maps.routing.v2.GeocodedWaypoint prototype)502 public static Builder newBuilder(com.google.maps.routing.v2.GeocodedWaypoint prototype) { 503 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 504 } 505 506 @java.lang.Override toBuilder()507 public Builder toBuilder() { 508 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 509 } 510 511 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)512 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 513 Builder builder = new Builder(parent); 514 return builder; 515 } 516 /** 517 * 518 * 519 * <pre> 520 * Details about the locations used as waypoints. Only populated for address 521 * waypoints. Includes details about the geocoding results for the purposes of 522 * determining what the address was geocoded to. 523 * </pre> 524 * 525 * Protobuf type {@code google.maps.routing.v2.GeocodedWaypoint} 526 */ 527 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 528 implements 529 // @@protoc_insertion_point(builder_implements:google.maps.routing.v2.GeocodedWaypoint) 530 com.google.maps.routing.v2.GeocodedWaypointOrBuilder { getDescriptor()531 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 532 return com.google.maps.routing.v2.GeocodingResultsProto 533 .internal_static_google_maps_routing_v2_GeocodedWaypoint_descriptor; 534 } 535 536 @java.lang.Override 537 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()538 internalGetFieldAccessorTable() { 539 return com.google.maps.routing.v2.GeocodingResultsProto 540 .internal_static_google_maps_routing_v2_GeocodedWaypoint_fieldAccessorTable 541 .ensureFieldAccessorsInitialized( 542 com.google.maps.routing.v2.GeocodedWaypoint.class, 543 com.google.maps.routing.v2.GeocodedWaypoint.Builder.class); 544 } 545 546 // Construct using com.google.maps.routing.v2.GeocodedWaypoint.newBuilder() Builder()547 private Builder() {} 548 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)549 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 550 super(parent); 551 } 552 553 @java.lang.Override clear()554 public Builder clear() { 555 super.clear(); 556 bitField0_ = 0; 557 geocoderStatus_ = null; 558 if (geocoderStatusBuilder_ != null) { 559 geocoderStatusBuilder_.dispose(); 560 geocoderStatusBuilder_ = null; 561 } 562 intermediateWaypointRequestIndex_ = 0; 563 type_ = com.google.protobuf.LazyStringArrayList.EMPTY; 564 bitField0_ = (bitField0_ & ~0x00000004); 565 partialMatch_ = false; 566 placeId_ = ""; 567 return this; 568 } 569 570 @java.lang.Override getDescriptorForType()571 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 572 return com.google.maps.routing.v2.GeocodingResultsProto 573 .internal_static_google_maps_routing_v2_GeocodedWaypoint_descriptor; 574 } 575 576 @java.lang.Override getDefaultInstanceForType()577 public com.google.maps.routing.v2.GeocodedWaypoint getDefaultInstanceForType() { 578 return com.google.maps.routing.v2.GeocodedWaypoint.getDefaultInstance(); 579 } 580 581 @java.lang.Override build()582 public com.google.maps.routing.v2.GeocodedWaypoint build() { 583 com.google.maps.routing.v2.GeocodedWaypoint result = buildPartial(); 584 if (!result.isInitialized()) { 585 throw newUninitializedMessageException(result); 586 } 587 return result; 588 } 589 590 @java.lang.Override buildPartial()591 public com.google.maps.routing.v2.GeocodedWaypoint buildPartial() { 592 com.google.maps.routing.v2.GeocodedWaypoint result = 593 new com.google.maps.routing.v2.GeocodedWaypoint(this); 594 buildPartialRepeatedFields(result); 595 if (bitField0_ != 0) { 596 buildPartial0(result); 597 } 598 onBuilt(); 599 return result; 600 } 601 buildPartialRepeatedFields(com.google.maps.routing.v2.GeocodedWaypoint result)602 private void buildPartialRepeatedFields(com.google.maps.routing.v2.GeocodedWaypoint result) { 603 if (((bitField0_ & 0x00000004) != 0)) { 604 type_ = type_.getUnmodifiableView(); 605 bitField0_ = (bitField0_ & ~0x00000004); 606 } 607 result.type_ = type_; 608 } 609 buildPartial0(com.google.maps.routing.v2.GeocodedWaypoint result)610 private void buildPartial0(com.google.maps.routing.v2.GeocodedWaypoint result) { 611 int from_bitField0_ = bitField0_; 612 if (((from_bitField0_ & 0x00000001) != 0)) { 613 result.geocoderStatus_ = 614 geocoderStatusBuilder_ == null ? geocoderStatus_ : geocoderStatusBuilder_.build(); 615 } 616 int to_bitField0_ = 0; 617 if (((from_bitField0_ & 0x00000002) != 0)) { 618 result.intermediateWaypointRequestIndex_ = intermediateWaypointRequestIndex_; 619 to_bitField0_ |= 0x00000001; 620 } 621 if (((from_bitField0_ & 0x00000008) != 0)) { 622 result.partialMatch_ = partialMatch_; 623 } 624 if (((from_bitField0_ & 0x00000010) != 0)) { 625 result.placeId_ = placeId_; 626 } 627 result.bitField0_ |= to_bitField0_; 628 } 629 630 @java.lang.Override clone()631 public Builder clone() { 632 return super.clone(); 633 } 634 635 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)636 public Builder setField( 637 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 638 return super.setField(field, value); 639 } 640 641 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)642 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 643 return super.clearField(field); 644 } 645 646 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)647 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 648 return super.clearOneof(oneof); 649 } 650 651 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)652 public Builder setRepeatedField( 653 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 654 return super.setRepeatedField(field, index, value); 655 } 656 657 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)658 public Builder addRepeatedField( 659 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 660 return super.addRepeatedField(field, value); 661 } 662 663 @java.lang.Override mergeFrom(com.google.protobuf.Message other)664 public Builder mergeFrom(com.google.protobuf.Message other) { 665 if (other instanceof com.google.maps.routing.v2.GeocodedWaypoint) { 666 return mergeFrom((com.google.maps.routing.v2.GeocodedWaypoint) other); 667 } else { 668 super.mergeFrom(other); 669 return this; 670 } 671 } 672 mergeFrom(com.google.maps.routing.v2.GeocodedWaypoint other)673 public Builder mergeFrom(com.google.maps.routing.v2.GeocodedWaypoint other) { 674 if (other == com.google.maps.routing.v2.GeocodedWaypoint.getDefaultInstance()) return this; 675 if (other.hasGeocoderStatus()) { 676 mergeGeocoderStatus(other.getGeocoderStatus()); 677 } 678 if (other.hasIntermediateWaypointRequestIndex()) { 679 setIntermediateWaypointRequestIndex(other.getIntermediateWaypointRequestIndex()); 680 } 681 if (!other.type_.isEmpty()) { 682 if (type_.isEmpty()) { 683 type_ = other.type_; 684 bitField0_ = (bitField0_ & ~0x00000004); 685 } else { 686 ensureTypeIsMutable(); 687 type_.addAll(other.type_); 688 } 689 onChanged(); 690 } 691 if (other.getPartialMatch() != false) { 692 setPartialMatch(other.getPartialMatch()); 693 } 694 if (!other.getPlaceId().isEmpty()) { 695 placeId_ = other.placeId_; 696 bitField0_ |= 0x00000010; 697 onChanged(); 698 } 699 this.mergeUnknownFields(other.getUnknownFields()); 700 onChanged(); 701 return this; 702 } 703 704 @java.lang.Override isInitialized()705 public final boolean isInitialized() { 706 return true; 707 } 708 709 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)710 public Builder mergeFrom( 711 com.google.protobuf.CodedInputStream input, 712 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 713 throws java.io.IOException { 714 if (extensionRegistry == null) { 715 throw new java.lang.NullPointerException(); 716 } 717 try { 718 boolean done = false; 719 while (!done) { 720 int tag = input.readTag(); 721 switch (tag) { 722 case 0: 723 done = true; 724 break; 725 case 10: 726 { 727 input.readMessage(getGeocoderStatusFieldBuilder().getBuilder(), extensionRegistry); 728 bitField0_ |= 0x00000001; 729 break; 730 } // case 10 731 case 16: 732 { 733 intermediateWaypointRequestIndex_ = input.readInt32(); 734 bitField0_ |= 0x00000002; 735 break; 736 } // case 16 737 case 26: 738 { 739 java.lang.String s = input.readStringRequireUtf8(); 740 ensureTypeIsMutable(); 741 type_.add(s); 742 break; 743 } // case 26 744 case 32: 745 { 746 partialMatch_ = input.readBool(); 747 bitField0_ |= 0x00000008; 748 break; 749 } // case 32 750 case 42: 751 { 752 placeId_ = input.readStringRequireUtf8(); 753 bitField0_ |= 0x00000010; 754 break; 755 } // case 42 756 default: 757 { 758 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 759 done = true; // was an endgroup tag 760 } 761 break; 762 } // default: 763 } // switch (tag) 764 } // while (!done) 765 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 766 throw e.unwrapIOException(); 767 } finally { 768 onChanged(); 769 } // finally 770 return this; 771 } 772 773 private int bitField0_; 774 775 private com.google.rpc.Status geocoderStatus_; 776 private com.google.protobuf.SingleFieldBuilderV3< 777 com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> 778 geocoderStatusBuilder_; 779 /** 780 * 781 * 782 * <pre> 783 * Indicates the status code resulting from the geocoding operation. 784 * </pre> 785 * 786 * <code>.google.rpc.Status geocoder_status = 1;</code> 787 * 788 * @return Whether the geocoderStatus field is set. 789 */ hasGeocoderStatus()790 public boolean hasGeocoderStatus() { 791 return ((bitField0_ & 0x00000001) != 0); 792 } 793 /** 794 * 795 * 796 * <pre> 797 * Indicates the status code resulting from the geocoding operation. 798 * </pre> 799 * 800 * <code>.google.rpc.Status geocoder_status = 1;</code> 801 * 802 * @return The geocoderStatus. 803 */ getGeocoderStatus()804 public com.google.rpc.Status getGeocoderStatus() { 805 if (geocoderStatusBuilder_ == null) { 806 return geocoderStatus_ == null 807 ? com.google.rpc.Status.getDefaultInstance() 808 : geocoderStatus_; 809 } else { 810 return geocoderStatusBuilder_.getMessage(); 811 } 812 } 813 /** 814 * 815 * 816 * <pre> 817 * Indicates the status code resulting from the geocoding operation. 818 * </pre> 819 * 820 * <code>.google.rpc.Status geocoder_status = 1;</code> 821 */ setGeocoderStatus(com.google.rpc.Status value)822 public Builder setGeocoderStatus(com.google.rpc.Status value) { 823 if (geocoderStatusBuilder_ == null) { 824 if (value == null) { 825 throw new NullPointerException(); 826 } 827 geocoderStatus_ = value; 828 } else { 829 geocoderStatusBuilder_.setMessage(value); 830 } 831 bitField0_ |= 0x00000001; 832 onChanged(); 833 return this; 834 } 835 /** 836 * 837 * 838 * <pre> 839 * Indicates the status code resulting from the geocoding operation. 840 * </pre> 841 * 842 * <code>.google.rpc.Status geocoder_status = 1;</code> 843 */ setGeocoderStatus(com.google.rpc.Status.Builder builderForValue)844 public Builder setGeocoderStatus(com.google.rpc.Status.Builder builderForValue) { 845 if (geocoderStatusBuilder_ == null) { 846 geocoderStatus_ = builderForValue.build(); 847 } else { 848 geocoderStatusBuilder_.setMessage(builderForValue.build()); 849 } 850 bitField0_ |= 0x00000001; 851 onChanged(); 852 return this; 853 } 854 /** 855 * 856 * 857 * <pre> 858 * Indicates the status code resulting from the geocoding operation. 859 * </pre> 860 * 861 * <code>.google.rpc.Status geocoder_status = 1;</code> 862 */ mergeGeocoderStatus(com.google.rpc.Status value)863 public Builder mergeGeocoderStatus(com.google.rpc.Status value) { 864 if (geocoderStatusBuilder_ == null) { 865 if (((bitField0_ & 0x00000001) != 0) 866 && geocoderStatus_ != null 867 && geocoderStatus_ != com.google.rpc.Status.getDefaultInstance()) { 868 getGeocoderStatusBuilder().mergeFrom(value); 869 } else { 870 geocoderStatus_ = value; 871 } 872 } else { 873 geocoderStatusBuilder_.mergeFrom(value); 874 } 875 bitField0_ |= 0x00000001; 876 onChanged(); 877 return this; 878 } 879 /** 880 * 881 * 882 * <pre> 883 * Indicates the status code resulting from the geocoding operation. 884 * </pre> 885 * 886 * <code>.google.rpc.Status geocoder_status = 1;</code> 887 */ clearGeocoderStatus()888 public Builder clearGeocoderStatus() { 889 bitField0_ = (bitField0_ & ~0x00000001); 890 geocoderStatus_ = null; 891 if (geocoderStatusBuilder_ != null) { 892 geocoderStatusBuilder_.dispose(); 893 geocoderStatusBuilder_ = null; 894 } 895 onChanged(); 896 return this; 897 } 898 /** 899 * 900 * 901 * <pre> 902 * Indicates the status code resulting from the geocoding operation. 903 * </pre> 904 * 905 * <code>.google.rpc.Status geocoder_status = 1;</code> 906 */ getGeocoderStatusBuilder()907 public com.google.rpc.Status.Builder getGeocoderStatusBuilder() { 908 bitField0_ |= 0x00000001; 909 onChanged(); 910 return getGeocoderStatusFieldBuilder().getBuilder(); 911 } 912 /** 913 * 914 * 915 * <pre> 916 * Indicates the status code resulting from the geocoding operation. 917 * </pre> 918 * 919 * <code>.google.rpc.Status geocoder_status = 1;</code> 920 */ getGeocoderStatusOrBuilder()921 public com.google.rpc.StatusOrBuilder getGeocoderStatusOrBuilder() { 922 if (geocoderStatusBuilder_ != null) { 923 return geocoderStatusBuilder_.getMessageOrBuilder(); 924 } else { 925 return geocoderStatus_ == null 926 ? com.google.rpc.Status.getDefaultInstance() 927 : geocoderStatus_; 928 } 929 } 930 /** 931 * 932 * 933 * <pre> 934 * Indicates the status code resulting from the geocoding operation. 935 * </pre> 936 * 937 * <code>.google.rpc.Status geocoder_status = 1;</code> 938 */ 939 private com.google.protobuf.SingleFieldBuilderV3< 940 com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getGeocoderStatusFieldBuilder()941 getGeocoderStatusFieldBuilder() { 942 if (geocoderStatusBuilder_ == null) { 943 geocoderStatusBuilder_ = 944 new com.google.protobuf.SingleFieldBuilderV3< 945 com.google.rpc.Status, 946 com.google.rpc.Status.Builder, 947 com.google.rpc.StatusOrBuilder>( 948 getGeocoderStatus(), getParentForChildren(), isClean()); 949 geocoderStatus_ = null; 950 } 951 return geocoderStatusBuilder_; 952 } 953 954 private int intermediateWaypointRequestIndex_; 955 /** 956 * 957 * 958 * <pre> 959 * The index of the corresponding intermediate waypoint in the request. 960 * Only populated if the corresponding waypoint is an intermediate 961 * waypoint. 962 * </pre> 963 * 964 * <code>optional int32 intermediate_waypoint_request_index = 2;</code> 965 * 966 * @return Whether the intermediateWaypointRequestIndex field is set. 967 */ 968 @java.lang.Override hasIntermediateWaypointRequestIndex()969 public boolean hasIntermediateWaypointRequestIndex() { 970 return ((bitField0_ & 0x00000002) != 0); 971 } 972 /** 973 * 974 * 975 * <pre> 976 * The index of the corresponding intermediate waypoint in the request. 977 * Only populated if the corresponding waypoint is an intermediate 978 * waypoint. 979 * </pre> 980 * 981 * <code>optional int32 intermediate_waypoint_request_index = 2;</code> 982 * 983 * @return The intermediateWaypointRequestIndex. 984 */ 985 @java.lang.Override getIntermediateWaypointRequestIndex()986 public int getIntermediateWaypointRequestIndex() { 987 return intermediateWaypointRequestIndex_; 988 } 989 /** 990 * 991 * 992 * <pre> 993 * The index of the corresponding intermediate waypoint in the request. 994 * Only populated if the corresponding waypoint is an intermediate 995 * waypoint. 996 * </pre> 997 * 998 * <code>optional int32 intermediate_waypoint_request_index = 2;</code> 999 * 1000 * @param value The intermediateWaypointRequestIndex to set. 1001 * @return This builder for chaining. 1002 */ setIntermediateWaypointRequestIndex(int value)1003 public Builder setIntermediateWaypointRequestIndex(int value) { 1004 1005 intermediateWaypointRequestIndex_ = value; 1006 bitField0_ |= 0x00000002; 1007 onChanged(); 1008 return this; 1009 } 1010 /** 1011 * 1012 * 1013 * <pre> 1014 * The index of the corresponding intermediate waypoint in the request. 1015 * Only populated if the corresponding waypoint is an intermediate 1016 * waypoint. 1017 * </pre> 1018 * 1019 * <code>optional int32 intermediate_waypoint_request_index = 2;</code> 1020 * 1021 * @return This builder for chaining. 1022 */ clearIntermediateWaypointRequestIndex()1023 public Builder clearIntermediateWaypointRequestIndex() { 1024 bitField0_ = (bitField0_ & ~0x00000002); 1025 intermediateWaypointRequestIndex_ = 0; 1026 onChanged(); 1027 return this; 1028 } 1029 1030 private com.google.protobuf.LazyStringList type_ = 1031 com.google.protobuf.LazyStringArrayList.EMPTY; 1032 ensureTypeIsMutable()1033 private void ensureTypeIsMutable() { 1034 if (!((bitField0_ & 0x00000004) != 0)) { 1035 type_ = new com.google.protobuf.LazyStringArrayList(type_); 1036 bitField0_ |= 0x00000004; 1037 } 1038 } 1039 /** 1040 * 1041 * 1042 * <pre> 1043 * The type(s) of the result, in the form of zero or more type tags. 1044 * Supported types: 1045 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1046 * </pre> 1047 * 1048 * <code>repeated string type = 3;</code> 1049 * 1050 * @return A list containing the type. 1051 */ getTypeList()1052 public com.google.protobuf.ProtocolStringList getTypeList() { 1053 return type_.getUnmodifiableView(); 1054 } 1055 /** 1056 * 1057 * 1058 * <pre> 1059 * The type(s) of the result, in the form of zero or more type tags. 1060 * Supported types: 1061 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1062 * </pre> 1063 * 1064 * <code>repeated string type = 3;</code> 1065 * 1066 * @return The count of type. 1067 */ getTypeCount()1068 public int getTypeCount() { 1069 return type_.size(); 1070 } 1071 /** 1072 * 1073 * 1074 * <pre> 1075 * The type(s) of the result, in the form of zero or more type tags. 1076 * Supported types: 1077 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1078 * </pre> 1079 * 1080 * <code>repeated string type = 3;</code> 1081 * 1082 * @param index The index of the element to return. 1083 * @return The type at the given index. 1084 */ getType(int index)1085 public java.lang.String getType(int index) { 1086 return type_.get(index); 1087 } 1088 /** 1089 * 1090 * 1091 * <pre> 1092 * The type(s) of the result, in the form of zero or more type tags. 1093 * Supported types: 1094 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1095 * </pre> 1096 * 1097 * <code>repeated string type = 3;</code> 1098 * 1099 * @param index The index of the value to return. 1100 * @return The bytes of the type at the given index. 1101 */ getTypeBytes(int index)1102 public com.google.protobuf.ByteString getTypeBytes(int index) { 1103 return type_.getByteString(index); 1104 } 1105 /** 1106 * 1107 * 1108 * <pre> 1109 * The type(s) of the result, in the form of zero or more type tags. 1110 * Supported types: 1111 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1112 * </pre> 1113 * 1114 * <code>repeated string type = 3;</code> 1115 * 1116 * @param index The index to set the value at. 1117 * @param value The type to set. 1118 * @return This builder for chaining. 1119 */ setType(int index, java.lang.String value)1120 public Builder setType(int index, java.lang.String value) { 1121 if (value == null) { 1122 throw new NullPointerException(); 1123 } 1124 ensureTypeIsMutable(); 1125 type_.set(index, value); 1126 onChanged(); 1127 return this; 1128 } 1129 /** 1130 * 1131 * 1132 * <pre> 1133 * The type(s) of the result, in the form of zero or more type tags. 1134 * Supported types: 1135 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1136 * </pre> 1137 * 1138 * <code>repeated string type = 3;</code> 1139 * 1140 * @param value The type to add. 1141 * @return This builder for chaining. 1142 */ addType(java.lang.String value)1143 public Builder addType(java.lang.String value) { 1144 if (value == null) { 1145 throw new NullPointerException(); 1146 } 1147 ensureTypeIsMutable(); 1148 type_.add(value); 1149 onChanged(); 1150 return this; 1151 } 1152 /** 1153 * 1154 * 1155 * <pre> 1156 * The type(s) of the result, in the form of zero or more type tags. 1157 * Supported types: 1158 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1159 * </pre> 1160 * 1161 * <code>repeated string type = 3;</code> 1162 * 1163 * @param values The type to add. 1164 * @return This builder for chaining. 1165 */ addAllType(java.lang.Iterable<java.lang.String> values)1166 public Builder addAllType(java.lang.Iterable<java.lang.String> values) { 1167 ensureTypeIsMutable(); 1168 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, type_); 1169 onChanged(); 1170 return this; 1171 } 1172 /** 1173 * 1174 * 1175 * <pre> 1176 * The type(s) of the result, in the form of zero or more type tags. 1177 * Supported types: 1178 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1179 * </pre> 1180 * 1181 * <code>repeated string type = 3;</code> 1182 * 1183 * @return This builder for chaining. 1184 */ clearType()1185 public Builder clearType() { 1186 type_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1187 bitField0_ = (bitField0_ & ~0x00000004); 1188 onChanged(); 1189 return this; 1190 } 1191 /** 1192 * 1193 * 1194 * <pre> 1195 * The type(s) of the result, in the form of zero or more type tags. 1196 * Supported types: 1197 * https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types 1198 * </pre> 1199 * 1200 * <code>repeated string type = 3;</code> 1201 * 1202 * @param value The bytes of the type to add. 1203 * @return This builder for chaining. 1204 */ addTypeBytes(com.google.protobuf.ByteString value)1205 public Builder addTypeBytes(com.google.protobuf.ByteString value) { 1206 if (value == null) { 1207 throw new NullPointerException(); 1208 } 1209 checkByteStringIsUtf8(value); 1210 ensureTypeIsMutable(); 1211 type_.add(value); 1212 onChanged(); 1213 return this; 1214 } 1215 1216 private boolean partialMatch_; 1217 /** 1218 * 1219 * 1220 * <pre> 1221 * Indicates that the geocoder did not return an exact match for the original 1222 * request, though it was able to match part of the requested address. You may 1223 * wish to examine the original request for misspellings and/or an incomplete 1224 * address. 1225 * </pre> 1226 * 1227 * <code>bool partial_match = 4;</code> 1228 * 1229 * @return The partialMatch. 1230 */ 1231 @java.lang.Override getPartialMatch()1232 public boolean getPartialMatch() { 1233 return partialMatch_; 1234 } 1235 /** 1236 * 1237 * 1238 * <pre> 1239 * Indicates that the geocoder did not return an exact match for the original 1240 * request, though it was able to match part of the requested address. You may 1241 * wish to examine the original request for misspellings and/or an incomplete 1242 * address. 1243 * </pre> 1244 * 1245 * <code>bool partial_match = 4;</code> 1246 * 1247 * @param value The partialMatch to set. 1248 * @return This builder for chaining. 1249 */ setPartialMatch(boolean value)1250 public Builder setPartialMatch(boolean value) { 1251 1252 partialMatch_ = value; 1253 bitField0_ |= 0x00000008; 1254 onChanged(); 1255 return this; 1256 } 1257 /** 1258 * 1259 * 1260 * <pre> 1261 * Indicates that the geocoder did not return an exact match for the original 1262 * request, though it was able to match part of the requested address. You may 1263 * wish to examine the original request for misspellings and/or an incomplete 1264 * address. 1265 * </pre> 1266 * 1267 * <code>bool partial_match = 4;</code> 1268 * 1269 * @return This builder for chaining. 1270 */ clearPartialMatch()1271 public Builder clearPartialMatch() { 1272 bitField0_ = (bitField0_ & ~0x00000008); 1273 partialMatch_ = false; 1274 onChanged(); 1275 return this; 1276 } 1277 1278 private java.lang.Object placeId_ = ""; 1279 /** 1280 * 1281 * 1282 * <pre> 1283 * The place ID for this result. 1284 * </pre> 1285 * 1286 * <code>string place_id = 5;</code> 1287 * 1288 * @return The placeId. 1289 */ getPlaceId()1290 public java.lang.String getPlaceId() { 1291 java.lang.Object ref = placeId_; 1292 if (!(ref instanceof java.lang.String)) { 1293 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1294 java.lang.String s = bs.toStringUtf8(); 1295 placeId_ = s; 1296 return s; 1297 } else { 1298 return (java.lang.String) ref; 1299 } 1300 } 1301 /** 1302 * 1303 * 1304 * <pre> 1305 * The place ID for this result. 1306 * </pre> 1307 * 1308 * <code>string place_id = 5;</code> 1309 * 1310 * @return The bytes for placeId. 1311 */ getPlaceIdBytes()1312 public com.google.protobuf.ByteString getPlaceIdBytes() { 1313 java.lang.Object ref = placeId_; 1314 if (ref instanceof String) { 1315 com.google.protobuf.ByteString b = 1316 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1317 placeId_ = b; 1318 return b; 1319 } else { 1320 return (com.google.protobuf.ByteString) ref; 1321 } 1322 } 1323 /** 1324 * 1325 * 1326 * <pre> 1327 * The place ID for this result. 1328 * </pre> 1329 * 1330 * <code>string place_id = 5;</code> 1331 * 1332 * @param value The placeId to set. 1333 * @return This builder for chaining. 1334 */ setPlaceId(java.lang.String value)1335 public Builder setPlaceId(java.lang.String value) { 1336 if (value == null) { 1337 throw new NullPointerException(); 1338 } 1339 placeId_ = value; 1340 bitField0_ |= 0x00000010; 1341 onChanged(); 1342 return this; 1343 } 1344 /** 1345 * 1346 * 1347 * <pre> 1348 * The place ID for this result. 1349 * </pre> 1350 * 1351 * <code>string place_id = 5;</code> 1352 * 1353 * @return This builder for chaining. 1354 */ clearPlaceId()1355 public Builder clearPlaceId() { 1356 placeId_ = getDefaultInstance().getPlaceId(); 1357 bitField0_ = (bitField0_ & ~0x00000010); 1358 onChanged(); 1359 return this; 1360 } 1361 /** 1362 * 1363 * 1364 * <pre> 1365 * The place ID for this result. 1366 * </pre> 1367 * 1368 * <code>string place_id = 5;</code> 1369 * 1370 * @param value The bytes for placeId to set. 1371 * @return This builder for chaining. 1372 */ setPlaceIdBytes(com.google.protobuf.ByteString value)1373 public Builder setPlaceIdBytes(com.google.protobuf.ByteString value) { 1374 if (value == null) { 1375 throw new NullPointerException(); 1376 } 1377 checkByteStringIsUtf8(value); 1378 placeId_ = value; 1379 bitField0_ |= 0x00000010; 1380 onChanged(); 1381 return this; 1382 } 1383 1384 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1385 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1386 return super.setUnknownFields(unknownFields); 1387 } 1388 1389 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1390 public final Builder mergeUnknownFields( 1391 final com.google.protobuf.UnknownFieldSet unknownFields) { 1392 return super.mergeUnknownFields(unknownFields); 1393 } 1394 1395 // @@protoc_insertion_point(builder_scope:google.maps.routing.v2.GeocodedWaypoint) 1396 } 1397 1398 // @@protoc_insertion_point(class_scope:google.maps.routing.v2.GeocodedWaypoint) 1399 private static final com.google.maps.routing.v2.GeocodedWaypoint DEFAULT_INSTANCE; 1400 1401 static { 1402 DEFAULT_INSTANCE = new com.google.maps.routing.v2.GeocodedWaypoint(); 1403 } 1404 getDefaultInstance()1405 public static com.google.maps.routing.v2.GeocodedWaypoint getDefaultInstance() { 1406 return DEFAULT_INSTANCE; 1407 } 1408 1409 private static final com.google.protobuf.Parser<GeocodedWaypoint> PARSER = 1410 new com.google.protobuf.AbstractParser<GeocodedWaypoint>() { 1411 @java.lang.Override 1412 public GeocodedWaypoint parsePartialFrom( 1413 com.google.protobuf.CodedInputStream input, 1414 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1415 throws com.google.protobuf.InvalidProtocolBufferException { 1416 Builder builder = newBuilder(); 1417 try { 1418 builder.mergeFrom(input, extensionRegistry); 1419 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1420 throw e.setUnfinishedMessage(builder.buildPartial()); 1421 } catch (com.google.protobuf.UninitializedMessageException e) { 1422 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1423 } catch (java.io.IOException e) { 1424 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1425 .setUnfinishedMessage(builder.buildPartial()); 1426 } 1427 return builder.buildPartial(); 1428 } 1429 }; 1430 parser()1431 public static com.google.protobuf.Parser<GeocodedWaypoint> parser() { 1432 return PARSER; 1433 } 1434 1435 @java.lang.Override getParserForType()1436 public com.google.protobuf.Parser<GeocodedWaypoint> getParserForType() { 1437 return PARSER; 1438 } 1439 1440 @java.lang.Override getDefaultInstanceForType()1441 public com.google.maps.routing.v2.GeocodedWaypoint getDefaultInstanceForType() { 1442 return DEFAULT_INSTANCE; 1443 } 1444 } 1445