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/routes_service.proto 18 19 package com.google.maps.routing.v2; 20 21 /** 22 * 23 * 24 * <pre> 25 * ComputeRoutes request message. 26 * </pre> 27 * 28 * Protobuf type {@code google.maps.routing.v2.ComputeRoutesRequest} 29 */ 30 public final class ComputeRoutesRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.maps.routing.v2.ComputeRoutesRequest) 33 ComputeRoutesRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ComputeRoutesRequest.newBuilder() to construct. ComputeRoutesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ComputeRoutesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ComputeRoutesRequest()40 private ComputeRoutesRequest() { 41 intermediates_ = java.util.Collections.emptyList(); 42 travelMode_ = 0; 43 routingPreference_ = 0; 44 polylineQuality_ = 0; 45 polylineEncoding_ = 0; 46 languageCode_ = ""; 47 regionCode_ = ""; 48 units_ = 0; 49 requestedReferenceRoutes_ = java.util.Collections.emptyList(); 50 extraComputations_ = java.util.Collections.emptyList(); 51 } 52 53 @java.lang.Override 54 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)55 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 56 return new ComputeRoutesRequest(); 57 } 58 59 @java.lang.Override getUnknownFields()60 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 61 return this.unknownFields; 62 } 63 getDescriptor()64 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 65 return com.google.maps.routing.v2.RoutesServiceProto 66 .internal_static_google_maps_routing_v2_ComputeRoutesRequest_descriptor; 67 } 68 69 @java.lang.Override 70 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()71 internalGetFieldAccessorTable() { 72 return com.google.maps.routing.v2.RoutesServiceProto 73 .internal_static_google_maps_routing_v2_ComputeRoutesRequest_fieldAccessorTable 74 .ensureFieldAccessorsInitialized( 75 com.google.maps.routing.v2.ComputeRoutesRequest.class, 76 com.google.maps.routing.v2.ComputeRoutesRequest.Builder.class); 77 } 78 79 /** 80 * 81 * 82 * <pre> 83 * A supported reference route on the ComputeRoutesRequest. 84 * </pre> 85 * 86 * Protobuf enum {@code google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute} 87 */ 88 public enum ReferenceRoute implements com.google.protobuf.ProtocolMessageEnum { 89 /** 90 * 91 * 92 * <pre> 93 * Not used. Requests containing this value fail. 94 * </pre> 95 * 96 * <code>REFERENCE_ROUTE_UNSPECIFIED = 0;</code> 97 */ 98 REFERENCE_ROUTE_UNSPECIFIED(0), 99 /** 100 * 101 * 102 * <pre> 103 * Fuel efficient route. Routes labeled with this value are determined to be 104 * optimized for parameters such as fuel consumption. 105 * </pre> 106 * 107 * <code>FUEL_EFFICIENT = 1;</code> 108 */ 109 FUEL_EFFICIENT(1), 110 UNRECOGNIZED(-1), 111 ; 112 113 /** 114 * 115 * 116 * <pre> 117 * Not used. Requests containing this value fail. 118 * </pre> 119 * 120 * <code>REFERENCE_ROUTE_UNSPECIFIED = 0;</code> 121 */ 122 public static final int REFERENCE_ROUTE_UNSPECIFIED_VALUE = 0; 123 /** 124 * 125 * 126 * <pre> 127 * Fuel efficient route. Routes labeled with this value are determined to be 128 * optimized for parameters such as fuel consumption. 129 * </pre> 130 * 131 * <code>FUEL_EFFICIENT = 1;</code> 132 */ 133 public static final int FUEL_EFFICIENT_VALUE = 1; 134 getNumber()135 public final int getNumber() { 136 if (this == UNRECOGNIZED) { 137 throw new java.lang.IllegalArgumentException( 138 "Can't get the number of an unknown enum value."); 139 } 140 return value; 141 } 142 143 /** 144 * @param value The numeric wire value of the corresponding enum entry. 145 * @return The enum associated with the given numeric wire value. 146 * @deprecated Use {@link #forNumber(int)} instead. 147 */ 148 @java.lang.Deprecated valueOf(int value)149 public static ReferenceRoute valueOf(int value) { 150 return forNumber(value); 151 } 152 153 /** 154 * @param value The numeric wire value of the corresponding enum entry. 155 * @return The enum associated with the given numeric wire value. 156 */ forNumber(int value)157 public static ReferenceRoute forNumber(int value) { 158 switch (value) { 159 case 0: 160 return REFERENCE_ROUTE_UNSPECIFIED; 161 case 1: 162 return FUEL_EFFICIENT; 163 default: 164 return null; 165 } 166 } 167 internalGetValueMap()168 public static com.google.protobuf.Internal.EnumLiteMap<ReferenceRoute> internalGetValueMap() { 169 return internalValueMap; 170 } 171 172 private static final com.google.protobuf.Internal.EnumLiteMap<ReferenceRoute> internalValueMap = 173 new com.google.protobuf.Internal.EnumLiteMap<ReferenceRoute>() { 174 public ReferenceRoute findValueByNumber(int number) { 175 return ReferenceRoute.forNumber(number); 176 } 177 }; 178 getValueDescriptor()179 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 180 if (this == UNRECOGNIZED) { 181 throw new java.lang.IllegalStateException( 182 "Can't get the descriptor of an unrecognized enum value."); 183 } 184 return getDescriptor().getValues().get(ordinal()); 185 } 186 getDescriptorForType()187 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 188 return getDescriptor(); 189 } 190 getDescriptor()191 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 192 return com.google.maps.routing.v2.ComputeRoutesRequest.getDescriptor().getEnumTypes().get(0); 193 } 194 195 private static final ReferenceRoute[] VALUES = values(); 196 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)197 public static ReferenceRoute valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 198 if (desc.getType() != getDescriptor()) { 199 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 200 } 201 if (desc.getIndex() == -1) { 202 return UNRECOGNIZED; 203 } 204 return VALUES[desc.getIndex()]; 205 } 206 207 private final int value; 208 ReferenceRoute(int value)209 private ReferenceRoute(int value) { 210 this.value = value; 211 } 212 213 // @@protoc_insertion_point(enum_scope:google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute) 214 } 215 216 /** 217 * 218 * 219 * <pre> 220 * Extra computations to perform while completing the request. 221 * </pre> 222 * 223 * Protobuf enum {@code google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation} 224 */ 225 public enum ExtraComputation implements com.google.protobuf.ProtocolMessageEnum { 226 /** 227 * 228 * 229 * <pre> 230 * Not used. Requests containing this value will fail. 231 * </pre> 232 * 233 * <code>EXTRA_COMPUTATION_UNSPECIFIED = 0;</code> 234 */ 235 EXTRA_COMPUTATION_UNSPECIFIED(0), 236 /** 237 * 238 * 239 * <pre> 240 * Toll information for the route(s). 241 * </pre> 242 * 243 * <code>TOLLS = 1;</code> 244 */ 245 TOLLS(1), 246 /** 247 * 248 * 249 * <pre> 250 * Estimated fuel consumption for the route(s). 251 * </pre> 252 * 253 * <code>FUEL_CONSUMPTION = 2;</code> 254 */ 255 FUEL_CONSUMPTION(2), 256 /** 257 * 258 * 259 * <pre> 260 * Traffic aware polylines for the route(s). 261 * </pre> 262 * 263 * <code>TRAFFIC_ON_POLYLINE = 3;</code> 264 */ 265 TRAFFIC_ON_POLYLINE(3), 266 UNRECOGNIZED(-1), 267 ; 268 269 /** 270 * 271 * 272 * <pre> 273 * Not used. Requests containing this value will fail. 274 * </pre> 275 * 276 * <code>EXTRA_COMPUTATION_UNSPECIFIED = 0;</code> 277 */ 278 public static final int EXTRA_COMPUTATION_UNSPECIFIED_VALUE = 0; 279 /** 280 * 281 * 282 * <pre> 283 * Toll information for the route(s). 284 * </pre> 285 * 286 * <code>TOLLS = 1;</code> 287 */ 288 public static final int TOLLS_VALUE = 1; 289 /** 290 * 291 * 292 * <pre> 293 * Estimated fuel consumption for the route(s). 294 * </pre> 295 * 296 * <code>FUEL_CONSUMPTION = 2;</code> 297 */ 298 public static final int FUEL_CONSUMPTION_VALUE = 2; 299 /** 300 * 301 * 302 * <pre> 303 * Traffic aware polylines for the route(s). 304 * </pre> 305 * 306 * <code>TRAFFIC_ON_POLYLINE = 3;</code> 307 */ 308 public static final int TRAFFIC_ON_POLYLINE_VALUE = 3; 309 getNumber()310 public final int getNumber() { 311 if (this == UNRECOGNIZED) { 312 throw new java.lang.IllegalArgumentException( 313 "Can't get the number of an unknown enum value."); 314 } 315 return value; 316 } 317 318 /** 319 * @param value The numeric wire value of the corresponding enum entry. 320 * @return The enum associated with the given numeric wire value. 321 * @deprecated Use {@link #forNumber(int)} instead. 322 */ 323 @java.lang.Deprecated valueOf(int value)324 public static ExtraComputation valueOf(int value) { 325 return forNumber(value); 326 } 327 328 /** 329 * @param value The numeric wire value of the corresponding enum entry. 330 * @return The enum associated with the given numeric wire value. 331 */ forNumber(int value)332 public static ExtraComputation forNumber(int value) { 333 switch (value) { 334 case 0: 335 return EXTRA_COMPUTATION_UNSPECIFIED; 336 case 1: 337 return TOLLS; 338 case 2: 339 return FUEL_CONSUMPTION; 340 case 3: 341 return TRAFFIC_ON_POLYLINE; 342 default: 343 return null; 344 } 345 } 346 internalGetValueMap()347 public static com.google.protobuf.Internal.EnumLiteMap<ExtraComputation> internalGetValueMap() { 348 return internalValueMap; 349 } 350 351 private static final com.google.protobuf.Internal.EnumLiteMap<ExtraComputation> 352 internalValueMap = 353 new com.google.protobuf.Internal.EnumLiteMap<ExtraComputation>() { 354 public ExtraComputation findValueByNumber(int number) { 355 return ExtraComputation.forNumber(number); 356 } 357 }; 358 getValueDescriptor()359 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 360 if (this == UNRECOGNIZED) { 361 throw new java.lang.IllegalStateException( 362 "Can't get the descriptor of an unrecognized enum value."); 363 } 364 return getDescriptor().getValues().get(ordinal()); 365 } 366 getDescriptorForType()367 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 368 return getDescriptor(); 369 } 370 getDescriptor()371 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 372 return com.google.maps.routing.v2.ComputeRoutesRequest.getDescriptor().getEnumTypes().get(1); 373 } 374 375 private static final ExtraComputation[] VALUES = values(); 376 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)377 public static ExtraComputation valueOf( 378 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 379 if (desc.getType() != getDescriptor()) { 380 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 381 } 382 if (desc.getIndex() == -1) { 383 return UNRECOGNIZED; 384 } 385 return VALUES[desc.getIndex()]; 386 } 387 388 private final int value; 389 ExtraComputation(int value)390 private ExtraComputation(int value) { 391 this.value = value; 392 } 393 394 // @@protoc_insertion_point(enum_scope:google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation) 395 } 396 397 public static final int ORIGIN_FIELD_NUMBER = 1; 398 private com.google.maps.routing.v2.Waypoint origin_; 399 /** 400 * 401 * 402 * <pre> 403 * Required. Origin waypoint. 404 * </pre> 405 * 406 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 407 * </code> 408 * 409 * @return Whether the origin field is set. 410 */ 411 @java.lang.Override hasOrigin()412 public boolean hasOrigin() { 413 return origin_ != null; 414 } 415 /** 416 * 417 * 418 * <pre> 419 * Required. Origin waypoint. 420 * </pre> 421 * 422 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 423 * </code> 424 * 425 * @return The origin. 426 */ 427 @java.lang.Override getOrigin()428 public com.google.maps.routing.v2.Waypoint getOrigin() { 429 return origin_ == null ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() : origin_; 430 } 431 /** 432 * 433 * 434 * <pre> 435 * Required. Origin waypoint. 436 * </pre> 437 * 438 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 439 * </code> 440 */ 441 @java.lang.Override getOriginOrBuilder()442 public com.google.maps.routing.v2.WaypointOrBuilder getOriginOrBuilder() { 443 return origin_ == null ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() : origin_; 444 } 445 446 public static final int DESTINATION_FIELD_NUMBER = 2; 447 private com.google.maps.routing.v2.Waypoint destination_; 448 /** 449 * 450 * 451 * <pre> 452 * Required. Destination waypoint. 453 * </pre> 454 * 455 * <code> 456 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 457 * </code> 458 * 459 * @return Whether the destination field is set. 460 */ 461 @java.lang.Override hasDestination()462 public boolean hasDestination() { 463 return destination_ != null; 464 } 465 /** 466 * 467 * 468 * <pre> 469 * Required. Destination waypoint. 470 * </pre> 471 * 472 * <code> 473 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 474 * </code> 475 * 476 * @return The destination. 477 */ 478 @java.lang.Override getDestination()479 public com.google.maps.routing.v2.Waypoint getDestination() { 480 return destination_ == null 481 ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() 482 : destination_; 483 } 484 /** 485 * 486 * 487 * <pre> 488 * Required. Destination waypoint. 489 * </pre> 490 * 491 * <code> 492 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 493 * </code> 494 */ 495 @java.lang.Override getDestinationOrBuilder()496 public com.google.maps.routing.v2.WaypointOrBuilder getDestinationOrBuilder() { 497 return destination_ == null 498 ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() 499 : destination_; 500 } 501 502 public static final int INTERMEDIATES_FIELD_NUMBER = 3; 503 504 @SuppressWarnings("serial") 505 private java.util.List<com.google.maps.routing.v2.Waypoint> intermediates_; 506 /** 507 * 508 * 509 * <pre> 510 * Optional. A set of waypoints along the route (excluding terminal points), 511 * for either stopping at or passing by. Up to 25 intermediate waypoints are 512 * supported. 513 * </pre> 514 * 515 * <code> 516 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 517 * </code> 518 */ 519 @java.lang.Override getIntermediatesList()520 public java.util.List<com.google.maps.routing.v2.Waypoint> getIntermediatesList() { 521 return intermediates_; 522 } 523 /** 524 * 525 * 526 * <pre> 527 * Optional. A set of waypoints along the route (excluding terminal points), 528 * for either stopping at or passing by. Up to 25 intermediate waypoints are 529 * supported. 530 * </pre> 531 * 532 * <code> 533 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 534 * </code> 535 */ 536 @java.lang.Override 537 public java.util.List<? extends com.google.maps.routing.v2.WaypointOrBuilder> getIntermediatesOrBuilderList()538 getIntermediatesOrBuilderList() { 539 return intermediates_; 540 } 541 /** 542 * 543 * 544 * <pre> 545 * Optional. A set of waypoints along the route (excluding terminal points), 546 * for either stopping at or passing by. Up to 25 intermediate waypoints are 547 * supported. 548 * </pre> 549 * 550 * <code> 551 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 552 * </code> 553 */ 554 @java.lang.Override getIntermediatesCount()555 public int getIntermediatesCount() { 556 return intermediates_.size(); 557 } 558 /** 559 * 560 * 561 * <pre> 562 * Optional. A set of waypoints along the route (excluding terminal points), 563 * for either stopping at or passing by. Up to 25 intermediate waypoints are 564 * supported. 565 * </pre> 566 * 567 * <code> 568 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 569 * </code> 570 */ 571 @java.lang.Override getIntermediates(int index)572 public com.google.maps.routing.v2.Waypoint getIntermediates(int index) { 573 return intermediates_.get(index); 574 } 575 /** 576 * 577 * 578 * <pre> 579 * Optional. A set of waypoints along the route (excluding terminal points), 580 * for either stopping at or passing by. Up to 25 intermediate waypoints are 581 * supported. 582 * </pre> 583 * 584 * <code> 585 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 586 * </code> 587 */ 588 @java.lang.Override getIntermediatesOrBuilder(int index)589 public com.google.maps.routing.v2.WaypointOrBuilder getIntermediatesOrBuilder(int index) { 590 return intermediates_.get(index); 591 } 592 593 public static final int TRAVEL_MODE_FIELD_NUMBER = 4; 594 private int travelMode_ = 0; 595 /** 596 * 597 * 598 * <pre> 599 * Optional. Specifies the mode of transportation. 600 * </pre> 601 * 602 * <code> 603 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 604 * </code> 605 * 606 * @return The enum numeric value on the wire for travelMode. 607 */ 608 @java.lang.Override getTravelModeValue()609 public int getTravelModeValue() { 610 return travelMode_; 611 } 612 /** 613 * 614 * 615 * <pre> 616 * Optional. Specifies the mode of transportation. 617 * </pre> 618 * 619 * <code> 620 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 621 * </code> 622 * 623 * @return The travelMode. 624 */ 625 @java.lang.Override getTravelMode()626 public com.google.maps.routing.v2.RouteTravelMode getTravelMode() { 627 com.google.maps.routing.v2.RouteTravelMode result = 628 com.google.maps.routing.v2.RouteTravelMode.forNumber(travelMode_); 629 return result == null ? com.google.maps.routing.v2.RouteTravelMode.UNRECOGNIZED : result; 630 } 631 632 public static final int ROUTING_PREFERENCE_FIELD_NUMBER = 5; 633 private int routingPreference_ = 0; 634 /** 635 * 636 * 637 * <pre> 638 * Optional. Specifies how to compute the route. The server 639 * attempts to use the selected routing preference to compute the route. If 640 * the routing preference results in an error or an extra long latency, then 641 * an error is returned. You can specify this option only when the 642 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 643 * </pre> 644 * 645 * <code> 646 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 647 * </code> 648 * 649 * @return The enum numeric value on the wire for routingPreference. 650 */ 651 @java.lang.Override getRoutingPreferenceValue()652 public int getRoutingPreferenceValue() { 653 return routingPreference_; 654 } 655 /** 656 * 657 * 658 * <pre> 659 * Optional. Specifies how to compute the route. The server 660 * attempts to use the selected routing preference to compute the route. If 661 * the routing preference results in an error or an extra long latency, then 662 * an error is returned. You can specify this option only when the 663 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 664 * </pre> 665 * 666 * <code> 667 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 668 * </code> 669 * 670 * @return The routingPreference. 671 */ 672 @java.lang.Override getRoutingPreference()673 public com.google.maps.routing.v2.RoutingPreference getRoutingPreference() { 674 com.google.maps.routing.v2.RoutingPreference result = 675 com.google.maps.routing.v2.RoutingPreference.forNumber(routingPreference_); 676 return result == null ? com.google.maps.routing.v2.RoutingPreference.UNRECOGNIZED : result; 677 } 678 679 public static final int POLYLINE_QUALITY_FIELD_NUMBER = 6; 680 private int polylineQuality_ = 0; 681 /** 682 * 683 * 684 * <pre> 685 * Optional. Specifies your preference for the quality of the polyline. 686 * </pre> 687 * 688 * <code> 689 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 690 * </code> 691 * 692 * @return The enum numeric value on the wire for polylineQuality. 693 */ 694 @java.lang.Override getPolylineQualityValue()695 public int getPolylineQualityValue() { 696 return polylineQuality_; 697 } 698 /** 699 * 700 * 701 * <pre> 702 * Optional. Specifies your preference for the quality of the polyline. 703 * </pre> 704 * 705 * <code> 706 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 707 * </code> 708 * 709 * @return The polylineQuality. 710 */ 711 @java.lang.Override getPolylineQuality()712 public com.google.maps.routing.v2.PolylineQuality getPolylineQuality() { 713 com.google.maps.routing.v2.PolylineQuality result = 714 com.google.maps.routing.v2.PolylineQuality.forNumber(polylineQuality_); 715 return result == null ? com.google.maps.routing.v2.PolylineQuality.UNRECOGNIZED : result; 716 } 717 718 public static final int POLYLINE_ENCODING_FIELD_NUMBER = 12; 719 private int polylineEncoding_ = 0; 720 /** 721 * 722 * 723 * <pre> 724 * Optional. Specifies the preferred encoding for the polyline. 725 * </pre> 726 * 727 * <code> 728 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 729 * </code> 730 * 731 * @return The enum numeric value on the wire for polylineEncoding. 732 */ 733 @java.lang.Override getPolylineEncodingValue()734 public int getPolylineEncodingValue() { 735 return polylineEncoding_; 736 } 737 /** 738 * 739 * 740 * <pre> 741 * Optional. Specifies the preferred encoding for the polyline. 742 * </pre> 743 * 744 * <code> 745 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 746 * </code> 747 * 748 * @return The polylineEncoding. 749 */ 750 @java.lang.Override getPolylineEncoding()751 public com.google.maps.routing.v2.PolylineEncoding getPolylineEncoding() { 752 com.google.maps.routing.v2.PolylineEncoding result = 753 com.google.maps.routing.v2.PolylineEncoding.forNumber(polylineEncoding_); 754 return result == null ? com.google.maps.routing.v2.PolylineEncoding.UNRECOGNIZED : result; 755 } 756 757 public static final int DEPARTURE_TIME_FIELD_NUMBER = 7; 758 private com.google.protobuf.Timestamp departureTime_; 759 /** 760 * 761 * 762 * <pre> 763 * Optional. The departure time. If you don't set this value, then this value 764 * defaults to the time that you made the request. If you set this value to a 765 * time that has already occurred, then the request fails. 766 * </pre> 767 * 768 * <code>.google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 769 * </code> 770 * 771 * @return Whether the departureTime field is set. 772 */ 773 @java.lang.Override hasDepartureTime()774 public boolean hasDepartureTime() { 775 return departureTime_ != null; 776 } 777 /** 778 * 779 * 780 * <pre> 781 * Optional. The departure time. If you don't set this value, then this value 782 * defaults to the time that you made the request. If you set this value to a 783 * time that has already occurred, then the request fails. 784 * </pre> 785 * 786 * <code>.google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 787 * </code> 788 * 789 * @return The departureTime. 790 */ 791 @java.lang.Override getDepartureTime()792 public com.google.protobuf.Timestamp getDepartureTime() { 793 return departureTime_ == null 794 ? com.google.protobuf.Timestamp.getDefaultInstance() 795 : departureTime_; 796 } 797 /** 798 * 799 * 800 * <pre> 801 * Optional. The departure time. If you don't set this value, then this value 802 * defaults to the time that you made the request. If you set this value to a 803 * time that has already occurred, then the request fails. 804 * </pre> 805 * 806 * <code>.google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 807 * </code> 808 */ 809 @java.lang.Override getDepartureTimeOrBuilder()810 public com.google.protobuf.TimestampOrBuilder getDepartureTimeOrBuilder() { 811 return departureTime_ == null 812 ? com.google.protobuf.Timestamp.getDefaultInstance() 813 : departureTime_; 814 } 815 816 public static final int COMPUTE_ALTERNATIVE_ROUTES_FIELD_NUMBER = 8; 817 private boolean computeAlternativeRoutes_ = false; 818 /** 819 * 820 * 821 * <pre> 822 * Optional. Specifies whether to calculate alternate routes in addition to 823 * the route. No alternative routes are returned for requests that have 824 * intermediate waypoints. 825 * </pre> 826 * 827 * <code>bool compute_alternative_routes = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 828 * 829 * @return The computeAlternativeRoutes. 830 */ 831 @java.lang.Override getComputeAlternativeRoutes()832 public boolean getComputeAlternativeRoutes() { 833 return computeAlternativeRoutes_; 834 } 835 836 public static final int ROUTE_MODIFIERS_FIELD_NUMBER = 9; 837 private com.google.maps.routing.v2.RouteModifiers routeModifiers_; 838 /** 839 * 840 * 841 * <pre> 842 * Optional. A set of conditions to satisfy that affect the way routes are 843 * calculated. 844 * </pre> 845 * 846 * <code> 847 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 848 * </code> 849 * 850 * @return Whether the routeModifiers field is set. 851 */ 852 @java.lang.Override hasRouteModifiers()853 public boolean hasRouteModifiers() { 854 return routeModifiers_ != null; 855 } 856 /** 857 * 858 * 859 * <pre> 860 * Optional. A set of conditions to satisfy that affect the way routes are 861 * calculated. 862 * </pre> 863 * 864 * <code> 865 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 866 * </code> 867 * 868 * @return The routeModifiers. 869 */ 870 @java.lang.Override getRouteModifiers()871 public com.google.maps.routing.v2.RouteModifiers getRouteModifiers() { 872 return routeModifiers_ == null 873 ? com.google.maps.routing.v2.RouteModifiers.getDefaultInstance() 874 : routeModifiers_; 875 } 876 /** 877 * 878 * 879 * <pre> 880 * Optional. A set of conditions to satisfy that affect the way routes are 881 * calculated. 882 * </pre> 883 * 884 * <code> 885 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 886 * </code> 887 */ 888 @java.lang.Override getRouteModifiersOrBuilder()889 public com.google.maps.routing.v2.RouteModifiersOrBuilder getRouteModifiersOrBuilder() { 890 return routeModifiers_ == null 891 ? com.google.maps.routing.v2.RouteModifiers.getDefaultInstance() 892 : routeModifiers_; 893 } 894 895 public static final int LANGUAGE_CODE_FIELD_NUMBER = 10; 896 897 @SuppressWarnings("serial") 898 private volatile java.lang.Object languageCode_ = ""; 899 /** 900 * 901 * 902 * <pre> 903 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 904 * information, see 905 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 906 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 907 * for the list of supported languages. When you don't provide this value, the 908 * display language is inferred from the location of the route request. 909 * </pre> 910 * 911 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 912 * 913 * @return The languageCode. 914 */ 915 @java.lang.Override getLanguageCode()916 public java.lang.String getLanguageCode() { 917 java.lang.Object ref = languageCode_; 918 if (ref instanceof java.lang.String) { 919 return (java.lang.String) ref; 920 } else { 921 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 922 java.lang.String s = bs.toStringUtf8(); 923 languageCode_ = s; 924 return s; 925 } 926 } 927 /** 928 * 929 * 930 * <pre> 931 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 932 * information, see 933 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 934 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 935 * for the list of supported languages. When you don't provide this value, the 936 * display language is inferred from the location of the route request. 937 * </pre> 938 * 939 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 940 * 941 * @return The bytes for languageCode. 942 */ 943 @java.lang.Override getLanguageCodeBytes()944 public com.google.protobuf.ByteString getLanguageCodeBytes() { 945 java.lang.Object ref = languageCode_; 946 if (ref instanceof java.lang.String) { 947 com.google.protobuf.ByteString b = 948 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 949 languageCode_ = b; 950 return b; 951 } else { 952 return (com.google.protobuf.ByteString) ref; 953 } 954 } 955 956 public static final int REGION_CODE_FIELD_NUMBER = 16; 957 958 @SuppressWarnings("serial") 959 private volatile java.lang.Object regionCode_ = ""; 960 /** 961 * 962 * 963 * <pre> 964 * Optional. The region code, specified as a ccTLD ("top-level domain") 965 * two-character value. For more information see 966 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 967 * </pre> 968 * 969 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 970 * 971 * @return The regionCode. 972 */ 973 @java.lang.Override getRegionCode()974 public java.lang.String getRegionCode() { 975 java.lang.Object ref = regionCode_; 976 if (ref instanceof java.lang.String) { 977 return (java.lang.String) ref; 978 } else { 979 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 980 java.lang.String s = bs.toStringUtf8(); 981 regionCode_ = s; 982 return s; 983 } 984 } 985 /** 986 * 987 * 988 * <pre> 989 * Optional. The region code, specified as a ccTLD ("top-level domain") 990 * two-character value. For more information see 991 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 992 * </pre> 993 * 994 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 995 * 996 * @return The bytes for regionCode. 997 */ 998 @java.lang.Override getRegionCodeBytes()999 public com.google.protobuf.ByteString getRegionCodeBytes() { 1000 java.lang.Object ref = regionCode_; 1001 if (ref instanceof java.lang.String) { 1002 com.google.protobuf.ByteString b = 1003 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1004 regionCode_ = b; 1005 return b; 1006 } else { 1007 return (com.google.protobuf.ByteString) ref; 1008 } 1009 } 1010 1011 public static final int UNITS_FIELD_NUMBER = 11; 1012 private int units_ = 0; 1013 /** 1014 * 1015 * 1016 * <pre> 1017 * Optional. Specifies the units of measure for the display fields. This 1018 * includes the `instruction` field in 1019 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 1020 * units of measure used for the route, leg, step distance, and duration are 1021 * not affected by this value. If you don't provide this value, then the 1022 * display units are inferred from the location of the request. 1023 * </pre> 1024 * 1025 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 1026 * </code> 1027 * 1028 * @return The enum numeric value on the wire for units. 1029 */ 1030 @java.lang.Override getUnitsValue()1031 public int getUnitsValue() { 1032 return units_; 1033 } 1034 /** 1035 * 1036 * 1037 * <pre> 1038 * Optional. Specifies the units of measure for the display fields. This 1039 * includes the `instruction` field in 1040 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 1041 * units of measure used for the route, leg, step distance, and duration are 1042 * not affected by this value. If you don't provide this value, then the 1043 * display units are inferred from the location of the request. 1044 * </pre> 1045 * 1046 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 1047 * </code> 1048 * 1049 * @return The units. 1050 */ 1051 @java.lang.Override getUnits()1052 public com.google.maps.routing.v2.Units getUnits() { 1053 com.google.maps.routing.v2.Units result = com.google.maps.routing.v2.Units.forNumber(units_); 1054 return result == null ? com.google.maps.routing.v2.Units.UNRECOGNIZED : result; 1055 } 1056 1057 public static final int REQUESTED_REFERENCE_ROUTES_FIELD_NUMBER = 14; 1058 1059 @SuppressWarnings("serial") 1060 private java.util.List<java.lang.Integer> requestedReferenceRoutes_; 1061 1062 private static final com.google.protobuf.Internal.ListAdapter.Converter< 1063 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute> 1064 requestedReferenceRoutes_converter_ = 1065 new com.google.protobuf.Internal.ListAdapter.Converter< 1066 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute>() { 1067 public com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute convert( 1068 java.lang.Integer from) { 1069 com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute result = 1070 com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute.forNumber(from); 1071 return result == null 1072 ? com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute.UNRECOGNIZED 1073 : result; 1074 } 1075 }; 1076 /** 1077 * 1078 * 1079 * <pre> 1080 * Optional. Specifies what reference routes to calculate as part of the 1081 * request in addition to the default route. A reference route is a route with 1082 * a different route calculation objective than the default route. For example 1083 * a `FUEL_EFFICIENT` reference route calculation takes into account various 1084 * parameters that would generate an optimal fuel efficient route. 1085 * </pre> 1086 * 1087 * <code> 1088 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 1089 * </code> 1090 * 1091 * @return A list containing the requestedReferenceRoutes. 1092 */ 1093 @java.lang.Override 1094 public java.util.List<com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute> getRequestedReferenceRoutesList()1095 getRequestedReferenceRoutesList() { 1096 return new com.google.protobuf.Internal.ListAdapter< 1097 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute>( 1098 requestedReferenceRoutes_, requestedReferenceRoutes_converter_); 1099 } 1100 /** 1101 * 1102 * 1103 * <pre> 1104 * Optional. Specifies what reference routes to calculate as part of the 1105 * request in addition to the default route. A reference route is a route with 1106 * a different route calculation objective than the default route. For example 1107 * a `FUEL_EFFICIENT` reference route calculation takes into account various 1108 * parameters that would generate an optimal fuel efficient route. 1109 * </pre> 1110 * 1111 * <code> 1112 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 1113 * </code> 1114 * 1115 * @return The count of requestedReferenceRoutes. 1116 */ 1117 @java.lang.Override getRequestedReferenceRoutesCount()1118 public int getRequestedReferenceRoutesCount() { 1119 return requestedReferenceRoutes_.size(); 1120 } 1121 /** 1122 * 1123 * 1124 * <pre> 1125 * Optional. Specifies what reference routes to calculate as part of the 1126 * request in addition to the default route. A reference route is a route with 1127 * a different route calculation objective than the default route. For example 1128 * a `FUEL_EFFICIENT` reference route calculation takes into account various 1129 * parameters that would generate an optimal fuel efficient route. 1130 * </pre> 1131 * 1132 * <code> 1133 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 1134 * </code> 1135 * 1136 * @param index The index of the element to return. 1137 * @return The requestedReferenceRoutes at the given index. 1138 */ 1139 @java.lang.Override getRequestedReferenceRoutes( int index)1140 public com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute getRequestedReferenceRoutes( 1141 int index) { 1142 return requestedReferenceRoutes_converter_.convert(requestedReferenceRoutes_.get(index)); 1143 } 1144 /** 1145 * 1146 * 1147 * <pre> 1148 * Optional. Specifies what reference routes to calculate as part of the 1149 * request in addition to the default route. A reference route is a route with 1150 * a different route calculation objective than the default route. For example 1151 * a `FUEL_EFFICIENT` reference route calculation takes into account various 1152 * parameters that would generate an optimal fuel efficient route. 1153 * </pre> 1154 * 1155 * <code> 1156 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 1157 * </code> 1158 * 1159 * @return A list containing the enum numeric values on the wire for requestedReferenceRoutes. 1160 */ 1161 @java.lang.Override getRequestedReferenceRoutesValueList()1162 public java.util.List<java.lang.Integer> getRequestedReferenceRoutesValueList() { 1163 return requestedReferenceRoutes_; 1164 } 1165 /** 1166 * 1167 * 1168 * <pre> 1169 * Optional. Specifies what reference routes to calculate as part of the 1170 * request in addition to the default route. A reference route is a route with 1171 * a different route calculation objective than the default route. For example 1172 * a `FUEL_EFFICIENT` reference route calculation takes into account various 1173 * parameters that would generate an optimal fuel efficient route. 1174 * </pre> 1175 * 1176 * <code> 1177 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 1178 * </code> 1179 * 1180 * @param index The index of the value to return. 1181 * @return The enum numeric value on the wire of requestedReferenceRoutes at the given index. 1182 */ 1183 @java.lang.Override getRequestedReferenceRoutesValue(int index)1184 public int getRequestedReferenceRoutesValue(int index) { 1185 return requestedReferenceRoutes_.get(index); 1186 } 1187 1188 private int requestedReferenceRoutesMemoizedSerializedSize; 1189 1190 public static final int EXTRA_COMPUTATIONS_FIELD_NUMBER = 15; 1191 1192 @SuppressWarnings("serial") 1193 private java.util.List<java.lang.Integer> extraComputations_; 1194 1195 private static final com.google.protobuf.Internal.ListAdapter.Converter< 1196 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation> 1197 extraComputations_converter_ = 1198 new com.google.protobuf.Internal.ListAdapter.Converter< 1199 java.lang.Integer, 1200 com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation>() { 1201 public com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation convert( 1202 java.lang.Integer from) { 1203 com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation result = 1204 com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation.forNumber(from); 1205 return result == null 1206 ? com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation.UNRECOGNIZED 1207 : result; 1208 } 1209 }; 1210 /** 1211 * 1212 * 1213 * <pre> 1214 * Optional. A list of extra computations which may be used to complete the 1215 * request. Note: These extra computations may return extra fields on the 1216 * response. These extra fields must also be specified in the field mask to be 1217 * returned in the response. 1218 * </pre> 1219 * 1220 * <code> 1221 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 1222 * </code> 1223 * 1224 * @return A list containing the extraComputations. 1225 */ 1226 @java.lang.Override 1227 public java.util.List<com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation> getExtraComputationsList()1228 getExtraComputationsList() { 1229 return new com.google.protobuf.Internal.ListAdapter< 1230 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation>( 1231 extraComputations_, extraComputations_converter_); 1232 } 1233 /** 1234 * 1235 * 1236 * <pre> 1237 * Optional. A list of extra computations which may be used to complete the 1238 * request. Note: These extra computations may return extra fields on the 1239 * response. These extra fields must also be specified in the field mask to be 1240 * returned in the response. 1241 * </pre> 1242 * 1243 * <code> 1244 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 1245 * </code> 1246 * 1247 * @return The count of extraComputations. 1248 */ 1249 @java.lang.Override getExtraComputationsCount()1250 public int getExtraComputationsCount() { 1251 return extraComputations_.size(); 1252 } 1253 /** 1254 * 1255 * 1256 * <pre> 1257 * Optional. A list of extra computations which may be used to complete the 1258 * request. Note: These extra computations may return extra fields on the 1259 * response. These extra fields must also be specified in the field mask to be 1260 * returned in the response. 1261 * </pre> 1262 * 1263 * <code> 1264 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 1265 * </code> 1266 * 1267 * @param index The index of the element to return. 1268 * @return The extraComputations at the given index. 1269 */ 1270 @java.lang.Override getExtraComputations( int index)1271 public com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation getExtraComputations( 1272 int index) { 1273 return extraComputations_converter_.convert(extraComputations_.get(index)); 1274 } 1275 /** 1276 * 1277 * 1278 * <pre> 1279 * Optional. A list of extra computations which may be used to complete the 1280 * request. Note: These extra computations may return extra fields on the 1281 * response. These extra fields must also be specified in the field mask to be 1282 * returned in the response. 1283 * </pre> 1284 * 1285 * <code> 1286 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 1287 * </code> 1288 * 1289 * @return A list containing the enum numeric values on the wire for extraComputations. 1290 */ 1291 @java.lang.Override getExtraComputationsValueList()1292 public java.util.List<java.lang.Integer> getExtraComputationsValueList() { 1293 return extraComputations_; 1294 } 1295 /** 1296 * 1297 * 1298 * <pre> 1299 * Optional. A list of extra computations which may be used to complete the 1300 * request. Note: These extra computations may return extra fields on the 1301 * response. These extra fields must also be specified in the field mask to be 1302 * returned in the response. 1303 * </pre> 1304 * 1305 * <code> 1306 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 1307 * </code> 1308 * 1309 * @param index The index of the value to return. 1310 * @return The enum numeric value on the wire of extraComputations at the given index. 1311 */ 1312 @java.lang.Override getExtraComputationsValue(int index)1313 public int getExtraComputationsValue(int index) { 1314 return extraComputations_.get(index); 1315 } 1316 1317 private int extraComputationsMemoizedSerializedSize; 1318 1319 private byte memoizedIsInitialized = -1; 1320 1321 @java.lang.Override isInitialized()1322 public final boolean isInitialized() { 1323 byte isInitialized = memoizedIsInitialized; 1324 if (isInitialized == 1) return true; 1325 if (isInitialized == 0) return false; 1326 1327 memoizedIsInitialized = 1; 1328 return true; 1329 } 1330 1331 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1332 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1333 getSerializedSize(); 1334 if (origin_ != null) { 1335 output.writeMessage(1, getOrigin()); 1336 } 1337 if (destination_ != null) { 1338 output.writeMessage(2, getDestination()); 1339 } 1340 for (int i = 0; i < intermediates_.size(); i++) { 1341 output.writeMessage(3, intermediates_.get(i)); 1342 } 1343 if (travelMode_ 1344 != com.google.maps.routing.v2.RouteTravelMode.TRAVEL_MODE_UNSPECIFIED.getNumber()) { 1345 output.writeEnum(4, travelMode_); 1346 } 1347 if (routingPreference_ 1348 != com.google.maps.routing.v2.RoutingPreference.ROUTING_PREFERENCE_UNSPECIFIED 1349 .getNumber()) { 1350 output.writeEnum(5, routingPreference_); 1351 } 1352 if (polylineQuality_ 1353 != com.google.maps.routing.v2.PolylineQuality.POLYLINE_QUALITY_UNSPECIFIED.getNumber()) { 1354 output.writeEnum(6, polylineQuality_); 1355 } 1356 if (departureTime_ != null) { 1357 output.writeMessage(7, getDepartureTime()); 1358 } 1359 if (computeAlternativeRoutes_ != false) { 1360 output.writeBool(8, computeAlternativeRoutes_); 1361 } 1362 if (routeModifiers_ != null) { 1363 output.writeMessage(9, getRouteModifiers()); 1364 } 1365 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { 1366 com.google.protobuf.GeneratedMessageV3.writeString(output, 10, languageCode_); 1367 } 1368 if (units_ != com.google.maps.routing.v2.Units.UNITS_UNSPECIFIED.getNumber()) { 1369 output.writeEnum(11, units_); 1370 } 1371 if (polylineEncoding_ 1372 != com.google.maps.routing.v2.PolylineEncoding.POLYLINE_ENCODING_UNSPECIFIED.getNumber()) { 1373 output.writeEnum(12, polylineEncoding_); 1374 } 1375 if (getRequestedReferenceRoutesList().size() > 0) { 1376 output.writeUInt32NoTag(114); 1377 output.writeUInt32NoTag(requestedReferenceRoutesMemoizedSerializedSize); 1378 } 1379 for (int i = 0; i < requestedReferenceRoutes_.size(); i++) { 1380 output.writeEnumNoTag(requestedReferenceRoutes_.get(i)); 1381 } 1382 if (getExtraComputationsList().size() > 0) { 1383 output.writeUInt32NoTag(122); 1384 output.writeUInt32NoTag(extraComputationsMemoizedSerializedSize); 1385 } 1386 for (int i = 0; i < extraComputations_.size(); i++) { 1387 output.writeEnumNoTag(extraComputations_.get(i)); 1388 } 1389 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { 1390 com.google.protobuf.GeneratedMessageV3.writeString(output, 16, regionCode_); 1391 } 1392 getUnknownFields().writeTo(output); 1393 } 1394 1395 @java.lang.Override getSerializedSize()1396 public int getSerializedSize() { 1397 int size = memoizedSize; 1398 if (size != -1) return size; 1399 1400 size = 0; 1401 if (origin_ != null) { 1402 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOrigin()); 1403 } 1404 if (destination_ != null) { 1405 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDestination()); 1406 } 1407 for (int i = 0; i < intermediates_.size(); i++) { 1408 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, intermediates_.get(i)); 1409 } 1410 if (travelMode_ 1411 != com.google.maps.routing.v2.RouteTravelMode.TRAVEL_MODE_UNSPECIFIED.getNumber()) { 1412 size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, travelMode_); 1413 } 1414 if (routingPreference_ 1415 != com.google.maps.routing.v2.RoutingPreference.ROUTING_PREFERENCE_UNSPECIFIED 1416 .getNumber()) { 1417 size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, routingPreference_); 1418 } 1419 if (polylineQuality_ 1420 != com.google.maps.routing.v2.PolylineQuality.POLYLINE_QUALITY_UNSPECIFIED.getNumber()) { 1421 size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, polylineQuality_); 1422 } 1423 if (departureTime_ != null) { 1424 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDepartureTime()); 1425 } 1426 if (computeAlternativeRoutes_ != false) { 1427 size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, computeAlternativeRoutes_); 1428 } 1429 if (routeModifiers_ != null) { 1430 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getRouteModifiers()); 1431 } 1432 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { 1433 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, languageCode_); 1434 } 1435 if (units_ != com.google.maps.routing.v2.Units.UNITS_UNSPECIFIED.getNumber()) { 1436 size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, units_); 1437 } 1438 if (polylineEncoding_ 1439 != com.google.maps.routing.v2.PolylineEncoding.POLYLINE_ENCODING_UNSPECIFIED.getNumber()) { 1440 size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, polylineEncoding_); 1441 } 1442 { 1443 int dataSize = 0; 1444 for (int i = 0; i < requestedReferenceRoutes_.size(); i++) { 1445 dataSize += 1446 com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( 1447 requestedReferenceRoutes_.get(i)); 1448 } 1449 size += dataSize; 1450 if (!getRequestedReferenceRoutesList().isEmpty()) { 1451 size += 1; 1452 size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); 1453 } 1454 requestedReferenceRoutesMemoizedSerializedSize = dataSize; 1455 } 1456 { 1457 int dataSize = 0; 1458 for (int i = 0; i < extraComputations_.size(); i++) { 1459 dataSize += 1460 com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(extraComputations_.get(i)); 1461 } 1462 size += dataSize; 1463 if (!getExtraComputationsList().isEmpty()) { 1464 size += 1; 1465 size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); 1466 } 1467 extraComputationsMemoizedSerializedSize = dataSize; 1468 } 1469 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { 1470 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, regionCode_); 1471 } 1472 size += getUnknownFields().getSerializedSize(); 1473 memoizedSize = size; 1474 return size; 1475 } 1476 1477 @java.lang.Override equals(final java.lang.Object obj)1478 public boolean equals(final java.lang.Object obj) { 1479 if (obj == this) { 1480 return true; 1481 } 1482 if (!(obj instanceof com.google.maps.routing.v2.ComputeRoutesRequest)) { 1483 return super.equals(obj); 1484 } 1485 com.google.maps.routing.v2.ComputeRoutesRequest other = 1486 (com.google.maps.routing.v2.ComputeRoutesRequest) obj; 1487 1488 if (hasOrigin() != other.hasOrigin()) return false; 1489 if (hasOrigin()) { 1490 if (!getOrigin().equals(other.getOrigin())) return false; 1491 } 1492 if (hasDestination() != other.hasDestination()) return false; 1493 if (hasDestination()) { 1494 if (!getDestination().equals(other.getDestination())) return false; 1495 } 1496 if (!getIntermediatesList().equals(other.getIntermediatesList())) return false; 1497 if (travelMode_ != other.travelMode_) return false; 1498 if (routingPreference_ != other.routingPreference_) return false; 1499 if (polylineQuality_ != other.polylineQuality_) return false; 1500 if (polylineEncoding_ != other.polylineEncoding_) return false; 1501 if (hasDepartureTime() != other.hasDepartureTime()) return false; 1502 if (hasDepartureTime()) { 1503 if (!getDepartureTime().equals(other.getDepartureTime())) return false; 1504 } 1505 if (getComputeAlternativeRoutes() != other.getComputeAlternativeRoutes()) return false; 1506 if (hasRouteModifiers() != other.hasRouteModifiers()) return false; 1507 if (hasRouteModifiers()) { 1508 if (!getRouteModifiers().equals(other.getRouteModifiers())) return false; 1509 } 1510 if (!getLanguageCode().equals(other.getLanguageCode())) return false; 1511 if (!getRegionCode().equals(other.getRegionCode())) return false; 1512 if (units_ != other.units_) return false; 1513 if (!requestedReferenceRoutes_.equals(other.requestedReferenceRoutes_)) return false; 1514 if (!extraComputations_.equals(other.extraComputations_)) return false; 1515 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1516 return true; 1517 } 1518 1519 @java.lang.Override hashCode()1520 public int hashCode() { 1521 if (memoizedHashCode != 0) { 1522 return memoizedHashCode; 1523 } 1524 int hash = 41; 1525 hash = (19 * hash) + getDescriptor().hashCode(); 1526 if (hasOrigin()) { 1527 hash = (37 * hash) + ORIGIN_FIELD_NUMBER; 1528 hash = (53 * hash) + getOrigin().hashCode(); 1529 } 1530 if (hasDestination()) { 1531 hash = (37 * hash) + DESTINATION_FIELD_NUMBER; 1532 hash = (53 * hash) + getDestination().hashCode(); 1533 } 1534 if (getIntermediatesCount() > 0) { 1535 hash = (37 * hash) + INTERMEDIATES_FIELD_NUMBER; 1536 hash = (53 * hash) + getIntermediatesList().hashCode(); 1537 } 1538 hash = (37 * hash) + TRAVEL_MODE_FIELD_NUMBER; 1539 hash = (53 * hash) + travelMode_; 1540 hash = (37 * hash) + ROUTING_PREFERENCE_FIELD_NUMBER; 1541 hash = (53 * hash) + routingPreference_; 1542 hash = (37 * hash) + POLYLINE_QUALITY_FIELD_NUMBER; 1543 hash = (53 * hash) + polylineQuality_; 1544 hash = (37 * hash) + POLYLINE_ENCODING_FIELD_NUMBER; 1545 hash = (53 * hash) + polylineEncoding_; 1546 if (hasDepartureTime()) { 1547 hash = (37 * hash) + DEPARTURE_TIME_FIELD_NUMBER; 1548 hash = (53 * hash) + getDepartureTime().hashCode(); 1549 } 1550 hash = (37 * hash) + COMPUTE_ALTERNATIVE_ROUTES_FIELD_NUMBER; 1551 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getComputeAlternativeRoutes()); 1552 if (hasRouteModifiers()) { 1553 hash = (37 * hash) + ROUTE_MODIFIERS_FIELD_NUMBER; 1554 hash = (53 * hash) + getRouteModifiers().hashCode(); 1555 } 1556 hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; 1557 hash = (53 * hash) + getLanguageCode().hashCode(); 1558 hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; 1559 hash = (53 * hash) + getRegionCode().hashCode(); 1560 hash = (37 * hash) + UNITS_FIELD_NUMBER; 1561 hash = (53 * hash) + units_; 1562 if (getRequestedReferenceRoutesCount() > 0) { 1563 hash = (37 * hash) + REQUESTED_REFERENCE_ROUTES_FIELD_NUMBER; 1564 hash = (53 * hash) + requestedReferenceRoutes_.hashCode(); 1565 } 1566 if (getExtraComputationsCount() > 0) { 1567 hash = (37 * hash) + EXTRA_COMPUTATIONS_FIELD_NUMBER; 1568 hash = (53 * hash) + extraComputations_.hashCode(); 1569 } 1570 hash = (29 * hash) + getUnknownFields().hashCode(); 1571 memoizedHashCode = hash; 1572 return hash; 1573 } 1574 parseFrom(java.nio.ByteBuffer data)1575 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom(java.nio.ByteBuffer data) 1576 throws com.google.protobuf.InvalidProtocolBufferException { 1577 return PARSER.parseFrom(data); 1578 } 1579 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1580 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1581 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1582 throws com.google.protobuf.InvalidProtocolBufferException { 1583 return PARSER.parseFrom(data, extensionRegistry); 1584 } 1585 parseFrom( com.google.protobuf.ByteString data)1586 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1587 com.google.protobuf.ByteString data) 1588 throws com.google.protobuf.InvalidProtocolBufferException { 1589 return PARSER.parseFrom(data); 1590 } 1591 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1592 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1593 com.google.protobuf.ByteString data, 1594 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1595 throws com.google.protobuf.InvalidProtocolBufferException { 1596 return PARSER.parseFrom(data, extensionRegistry); 1597 } 1598 parseFrom(byte[] data)1599 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom(byte[] data) 1600 throws com.google.protobuf.InvalidProtocolBufferException { 1601 return PARSER.parseFrom(data); 1602 } 1603 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1604 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1605 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1606 throws com.google.protobuf.InvalidProtocolBufferException { 1607 return PARSER.parseFrom(data, extensionRegistry); 1608 } 1609 parseFrom(java.io.InputStream input)1610 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom(java.io.InputStream input) 1611 throws java.io.IOException { 1612 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1613 } 1614 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1615 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1616 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1617 throws java.io.IOException { 1618 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1619 PARSER, input, extensionRegistry); 1620 } 1621 parseDelimitedFrom( java.io.InputStream input)1622 public static com.google.maps.routing.v2.ComputeRoutesRequest parseDelimitedFrom( 1623 java.io.InputStream input) throws java.io.IOException { 1624 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1625 } 1626 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1627 public static com.google.maps.routing.v2.ComputeRoutesRequest parseDelimitedFrom( 1628 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1629 throws java.io.IOException { 1630 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1631 PARSER, input, extensionRegistry); 1632 } 1633 parseFrom( com.google.protobuf.CodedInputStream input)1634 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1635 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1636 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1637 } 1638 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1639 public static com.google.maps.routing.v2.ComputeRoutesRequest parseFrom( 1640 com.google.protobuf.CodedInputStream input, 1641 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1642 throws java.io.IOException { 1643 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1644 PARSER, input, extensionRegistry); 1645 } 1646 1647 @java.lang.Override newBuilderForType()1648 public Builder newBuilderForType() { 1649 return newBuilder(); 1650 } 1651 newBuilder()1652 public static Builder newBuilder() { 1653 return DEFAULT_INSTANCE.toBuilder(); 1654 } 1655 newBuilder(com.google.maps.routing.v2.ComputeRoutesRequest prototype)1656 public static Builder newBuilder(com.google.maps.routing.v2.ComputeRoutesRequest prototype) { 1657 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1658 } 1659 1660 @java.lang.Override toBuilder()1661 public Builder toBuilder() { 1662 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1663 } 1664 1665 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1666 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1667 Builder builder = new Builder(parent); 1668 return builder; 1669 } 1670 /** 1671 * 1672 * 1673 * <pre> 1674 * ComputeRoutes request message. 1675 * </pre> 1676 * 1677 * Protobuf type {@code google.maps.routing.v2.ComputeRoutesRequest} 1678 */ 1679 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1680 implements 1681 // @@protoc_insertion_point(builder_implements:google.maps.routing.v2.ComputeRoutesRequest) 1682 com.google.maps.routing.v2.ComputeRoutesRequestOrBuilder { getDescriptor()1683 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1684 return com.google.maps.routing.v2.RoutesServiceProto 1685 .internal_static_google_maps_routing_v2_ComputeRoutesRequest_descriptor; 1686 } 1687 1688 @java.lang.Override 1689 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1690 internalGetFieldAccessorTable() { 1691 return com.google.maps.routing.v2.RoutesServiceProto 1692 .internal_static_google_maps_routing_v2_ComputeRoutesRequest_fieldAccessorTable 1693 .ensureFieldAccessorsInitialized( 1694 com.google.maps.routing.v2.ComputeRoutesRequest.class, 1695 com.google.maps.routing.v2.ComputeRoutesRequest.Builder.class); 1696 } 1697 1698 // Construct using com.google.maps.routing.v2.ComputeRoutesRequest.newBuilder() Builder()1699 private Builder() {} 1700 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1701 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1702 super(parent); 1703 } 1704 1705 @java.lang.Override clear()1706 public Builder clear() { 1707 super.clear(); 1708 bitField0_ = 0; 1709 origin_ = null; 1710 if (originBuilder_ != null) { 1711 originBuilder_.dispose(); 1712 originBuilder_ = null; 1713 } 1714 destination_ = null; 1715 if (destinationBuilder_ != null) { 1716 destinationBuilder_.dispose(); 1717 destinationBuilder_ = null; 1718 } 1719 if (intermediatesBuilder_ == null) { 1720 intermediates_ = java.util.Collections.emptyList(); 1721 } else { 1722 intermediates_ = null; 1723 intermediatesBuilder_.clear(); 1724 } 1725 bitField0_ = (bitField0_ & ~0x00000004); 1726 travelMode_ = 0; 1727 routingPreference_ = 0; 1728 polylineQuality_ = 0; 1729 polylineEncoding_ = 0; 1730 departureTime_ = null; 1731 if (departureTimeBuilder_ != null) { 1732 departureTimeBuilder_.dispose(); 1733 departureTimeBuilder_ = null; 1734 } 1735 computeAlternativeRoutes_ = false; 1736 routeModifiers_ = null; 1737 if (routeModifiersBuilder_ != null) { 1738 routeModifiersBuilder_.dispose(); 1739 routeModifiersBuilder_ = null; 1740 } 1741 languageCode_ = ""; 1742 regionCode_ = ""; 1743 units_ = 0; 1744 requestedReferenceRoutes_ = java.util.Collections.emptyList(); 1745 bitField0_ = (bitField0_ & ~0x00002000); 1746 extraComputations_ = java.util.Collections.emptyList(); 1747 bitField0_ = (bitField0_ & ~0x00004000); 1748 return this; 1749 } 1750 1751 @java.lang.Override getDescriptorForType()1752 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1753 return com.google.maps.routing.v2.RoutesServiceProto 1754 .internal_static_google_maps_routing_v2_ComputeRoutesRequest_descriptor; 1755 } 1756 1757 @java.lang.Override getDefaultInstanceForType()1758 public com.google.maps.routing.v2.ComputeRoutesRequest getDefaultInstanceForType() { 1759 return com.google.maps.routing.v2.ComputeRoutesRequest.getDefaultInstance(); 1760 } 1761 1762 @java.lang.Override build()1763 public com.google.maps.routing.v2.ComputeRoutesRequest build() { 1764 com.google.maps.routing.v2.ComputeRoutesRequest result = buildPartial(); 1765 if (!result.isInitialized()) { 1766 throw newUninitializedMessageException(result); 1767 } 1768 return result; 1769 } 1770 1771 @java.lang.Override buildPartial()1772 public com.google.maps.routing.v2.ComputeRoutesRequest buildPartial() { 1773 com.google.maps.routing.v2.ComputeRoutesRequest result = 1774 new com.google.maps.routing.v2.ComputeRoutesRequest(this); 1775 buildPartialRepeatedFields(result); 1776 if (bitField0_ != 0) { 1777 buildPartial0(result); 1778 } 1779 onBuilt(); 1780 return result; 1781 } 1782 buildPartialRepeatedFields( com.google.maps.routing.v2.ComputeRoutesRequest result)1783 private void buildPartialRepeatedFields( 1784 com.google.maps.routing.v2.ComputeRoutesRequest result) { 1785 if (intermediatesBuilder_ == null) { 1786 if (((bitField0_ & 0x00000004) != 0)) { 1787 intermediates_ = java.util.Collections.unmodifiableList(intermediates_); 1788 bitField0_ = (bitField0_ & ~0x00000004); 1789 } 1790 result.intermediates_ = intermediates_; 1791 } else { 1792 result.intermediates_ = intermediatesBuilder_.build(); 1793 } 1794 if (((bitField0_ & 0x00002000) != 0)) { 1795 requestedReferenceRoutes_ = 1796 java.util.Collections.unmodifiableList(requestedReferenceRoutes_); 1797 bitField0_ = (bitField0_ & ~0x00002000); 1798 } 1799 result.requestedReferenceRoutes_ = requestedReferenceRoutes_; 1800 if (((bitField0_ & 0x00004000) != 0)) { 1801 extraComputations_ = java.util.Collections.unmodifiableList(extraComputations_); 1802 bitField0_ = (bitField0_ & ~0x00004000); 1803 } 1804 result.extraComputations_ = extraComputations_; 1805 } 1806 buildPartial0(com.google.maps.routing.v2.ComputeRoutesRequest result)1807 private void buildPartial0(com.google.maps.routing.v2.ComputeRoutesRequest result) { 1808 int from_bitField0_ = bitField0_; 1809 if (((from_bitField0_ & 0x00000001) != 0)) { 1810 result.origin_ = originBuilder_ == null ? origin_ : originBuilder_.build(); 1811 } 1812 if (((from_bitField0_ & 0x00000002) != 0)) { 1813 result.destination_ = 1814 destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); 1815 } 1816 if (((from_bitField0_ & 0x00000008) != 0)) { 1817 result.travelMode_ = travelMode_; 1818 } 1819 if (((from_bitField0_ & 0x00000010) != 0)) { 1820 result.routingPreference_ = routingPreference_; 1821 } 1822 if (((from_bitField0_ & 0x00000020) != 0)) { 1823 result.polylineQuality_ = polylineQuality_; 1824 } 1825 if (((from_bitField0_ & 0x00000040) != 0)) { 1826 result.polylineEncoding_ = polylineEncoding_; 1827 } 1828 if (((from_bitField0_ & 0x00000080) != 0)) { 1829 result.departureTime_ = 1830 departureTimeBuilder_ == null ? departureTime_ : departureTimeBuilder_.build(); 1831 } 1832 if (((from_bitField0_ & 0x00000100) != 0)) { 1833 result.computeAlternativeRoutes_ = computeAlternativeRoutes_; 1834 } 1835 if (((from_bitField0_ & 0x00000200) != 0)) { 1836 result.routeModifiers_ = 1837 routeModifiersBuilder_ == null ? routeModifiers_ : routeModifiersBuilder_.build(); 1838 } 1839 if (((from_bitField0_ & 0x00000400) != 0)) { 1840 result.languageCode_ = languageCode_; 1841 } 1842 if (((from_bitField0_ & 0x00000800) != 0)) { 1843 result.regionCode_ = regionCode_; 1844 } 1845 if (((from_bitField0_ & 0x00001000) != 0)) { 1846 result.units_ = units_; 1847 } 1848 } 1849 1850 @java.lang.Override clone()1851 public Builder clone() { 1852 return super.clone(); 1853 } 1854 1855 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1856 public Builder setField( 1857 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1858 return super.setField(field, value); 1859 } 1860 1861 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1862 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1863 return super.clearField(field); 1864 } 1865 1866 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1867 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1868 return super.clearOneof(oneof); 1869 } 1870 1871 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1872 public Builder setRepeatedField( 1873 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1874 return super.setRepeatedField(field, index, value); 1875 } 1876 1877 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1878 public Builder addRepeatedField( 1879 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1880 return super.addRepeatedField(field, value); 1881 } 1882 1883 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1884 public Builder mergeFrom(com.google.protobuf.Message other) { 1885 if (other instanceof com.google.maps.routing.v2.ComputeRoutesRequest) { 1886 return mergeFrom((com.google.maps.routing.v2.ComputeRoutesRequest) other); 1887 } else { 1888 super.mergeFrom(other); 1889 return this; 1890 } 1891 } 1892 mergeFrom(com.google.maps.routing.v2.ComputeRoutesRequest other)1893 public Builder mergeFrom(com.google.maps.routing.v2.ComputeRoutesRequest other) { 1894 if (other == com.google.maps.routing.v2.ComputeRoutesRequest.getDefaultInstance()) 1895 return this; 1896 if (other.hasOrigin()) { 1897 mergeOrigin(other.getOrigin()); 1898 } 1899 if (other.hasDestination()) { 1900 mergeDestination(other.getDestination()); 1901 } 1902 if (intermediatesBuilder_ == null) { 1903 if (!other.intermediates_.isEmpty()) { 1904 if (intermediates_.isEmpty()) { 1905 intermediates_ = other.intermediates_; 1906 bitField0_ = (bitField0_ & ~0x00000004); 1907 } else { 1908 ensureIntermediatesIsMutable(); 1909 intermediates_.addAll(other.intermediates_); 1910 } 1911 onChanged(); 1912 } 1913 } else { 1914 if (!other.intermediates_.isEmpty()) { 1915 if (intermediatesBuilder_.isEmpty()) { 1916 intermediatesBuilder_.dispose(); 1917 intermediatesBuilder_ = null; 1918 intermediates_ = other.intermediates_; 1919 bitField0_ = (bitField0_ & ~0x00000004); 1920 intermediatesBuilder_ = 1921 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1922 ? getIntermediatesFieldBuilder() 1923 : null; 1924 } else { 1925 intermediatesBuilder_.addAllMessages(other.intermediates_); 1926 } 1927 } 1928 } 1929 if (other.travelMode_ != 0) { 1930 setTravelModeValue(other.getTravelModeValue()); 1931 } 1932 if (other.routingPreference_ != 0) { 1933 setRoutingPreferenceValue(other.getRoutingPreferenceValue()); 1934 } 1935 if (other.polylineQuality_ != 0) { 1936 setPolylineQualityValue(other.getPolylineQualityValue()); 1937 } 1938 if (other.polylineEncoding_ != 0) { 1939 setPolylineEncodingValue(other.getPolylineEncodingValue()); 1940 } 1941 if (other.hasDepartureTime()) { 1942 mergeDepartureTime(other.getDepartureTime()); 1943 } 1944 if (other.getComputeAlternativeRoutes() != false) { 1945 setComputeAlternativeRoutes(other.getComputeAlternativeRoutes()); 1946 } 1947 if (other.hasRouteModifiers()) { 1948 mergeRouteModifiers(other.getRouteModifiers()); 1949 } 1950 if (!other.getLanguageCode().isEmpty()) { 1951 languageCode_ = other.languageCode_; 1952 bitField0_ |= 0x00000400; 1953 onChanged(); 1954 } 1955 if (!other.getRegionCode().isEmpty()) { 1956 regionCode_ = other.regionCode_; 1957 bitField0_ |= 0x00000800; 1958 onChanged(); 1959 } 1960 if (other.units_ != 0) { 1961 setUnitsValue(other.getUnitsValue()); 1962 } 1963 if (!other.requestedReferenceRoutes_.isEmpty()) { 1964 if (requestedReferenceRoutes_.isEmpty()) { 1965 requestedReferenceRoutes_ = other.requestedReferenceRoutes_; 1966 bitField0_ = (bitField0_ & ~0x00002000); 1967 } else { 1968 ensureRequestedReferenceRoutesIsMutable(); 1969 requestedReferenceRoutes_.addAll(other.requestedReferenceRoutes_); 1970 } 1971 onChanged(); 1972 } 1973 if (!other.extraComputations_.isEmpty()) { 1974 if (extraComputations_.isEmpty()) { 1975 extraComputations_ = other.extraComputations_; 1976 bitField0_ = (bitField0_ & ~0x00004000); 1977 } else { 1978 ensureExtraComputationsIsMutable(); 1979 extraComputations_.addAll(other.extraComputations_); 1980 } 1981 onChanged(); 1982 } 1983 this.mergeUnknownFields(other.getUnknownFields()); 1984 onChanged(); 1985 return this; 1986 } 1987 1988 @java.lang.Override isInitialized()1989 public final boolean isInitialized() { 1990 return true; 1991 } 1992 1993 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1994 public Builder mergeFrom( 1995 com.google.protobuf.CodedInputStream input, 1996 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1997 throws java.io.IOException { 1998 if (extensionRegistry == null) { 1999 throw new java.lang.NullPointerException(); 2000 } 2001 try { 2002 boolean done = false; 2003 while (!done) { 2004 int tag = input.readTag(); 2005 switch (tag) { 2006 case 0: 2007 done = true; 2008 break; 2009 case 10: 2010 { 2011 input.readMessage(getOriginFieldBuilder().getBuilder(), extensionRegistry); 2012 bitField0_ |= 0x00000001; 2013 break; 2014 } // case 10 2015 case 18: 2016 { 2017 input.readMessage(getDestinationFieldBuilder().getBuilder(), extensionRegistry); 2018 bitField0_ |= 0x00000002; 2019 break; 2020 } // case 18 2021 case 26: 2022 { 2023 com.google.maps.routing.v2.Waypoint m = 2024 input.readMessage( 2025 com.google.maps.routing.v2.Waypoint.parser(), extensionRegistry); 2026 if (intermediatesBuilder_ == null) { 2027 ensureIntermediatesIsMutable(); 2028 intermediates_.add(m); 2029 } else { 2030 intermediatesBuilder_.addMessage(m); 2031 } 2032 break; 2033 } // case 26 2034 case 32: 2035 { 2036 travelMode_ = input.readEnum(); 2037 bitField0_ |= 0x00000008; 2038 break; 2039 } // case 32 2040 case 40: 2041 { 2042 routingPreference_ = input.readEnum(); 2043 bitField0_ |= 0x00000010; 2044 break; 2045 } // case 40 2046 case 48: 2047 { 2048 polylineQuality_ = input.readEnum(); 2049 bitField0_ |= 0x00000020; 2050 break; 2051 } // case 48 2052 case 58: 2053 { 2054 input.readMessage(getDepartureTimeFieldBuilder().getBuilder(), extensionRegistry); 2055 bitField0_ |= 0x00000080; 2056 break; 2057 } // case 58 2058 case 64: 2059 { 2060 computeAlternativeRoutes_ = input.readBool(); 2061 bitField0_ |= 0x00000100; 2062 break; 2063 } // case 64 2064 case 74: 2065 { 2066 input.readMessage(getRouteModifiersFieldBuilder().getBuilder(), extensionRegistry); 2067 bitField0_ |= 0x00000200; 2068 break; 2069 } // case 74 2070 case 82: 2071 { 2072 languageCode_ = input.readStringRequireUtf8(); 2073 bitField0_ |= 0x00000400; 2074 break; 2075 } // case 82 2076 case 88: 2077 { 2078 units_ = input.readEnum(); 2079 bitField0_ |= 0x00001000; 2080 break; 2081 } // case 88 2082 case 96: 2083 { 2084 polylineEncoding_ = input.readEnum(); 2085 bitField0_ |= 0x00000040; 2086 break; 2087 } // case 96 2088 case 112: 2089 { 2090 int tmpRaw = input.readEnum(); 2091 ensureRequestedReferenceRoutesIsMutable(); 2092 requestedReferenceRoutes_.add(tmpRaw); 2093 break; 2094 } // case 112 2095 case 114: 2096 { 2097 int length = input.readRawVarint32(); 2098 int oldLimit = input.pushLimit(length); 2099 while (input.getBytesUntilLimit() > 0) { 2100 int tmpRaw = input.readEnum(); 2101 ensureRequestedReferenceRoutesIsMutable(); 2102 requestedReferenceRoutes_.add(tmpRaw); 2103 } 2104 input.popLimit(oldLimit); 2105 break; 2106 } // case 114 2107 case 120: 2108 { 2109 int tmpRaw = input.readEnum(); 2110 ensureExtraComputationsIsMutable(); 2111 extraComputations_.add(tmpRaw); 2112 break; 2113 } // case 120 2114 case 122: 2115 { 2116 int length = input.readRawVarint32(); 2117 int oldLimit = input.pushLimit(length); 2118 while (input.getBytesUntilLimit() > 0) { 2119 int tmpRaw = input.readEnum(); 2120 ensureExtraComputationsIsMutable(); 2121 extraComputations_.add(tmpRaw); 2122 } 2123 input.popLimit(oldLimit); 2124 break; 2125 } // case 122 2126 case 130: 2127 { 2128 regionCode_ = input.readStringRequireUtf8(); 2129 bitField0_ |= 0x00000800; 2130 break; 2131 } // case 130 2132 default: 2133 { 2134 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2135 done = true; // was an endgroup tag 2136 } 2137 break; 2138 } // default: 2139 } // switch (tag) 2140 } // while (!done) 2141 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2142 throw e.unwrapIOException(); 2143 } finally { 2144 onChanged(); 2145 } // finally 2146 return this; 2147 } 2148 2149 private int bitField0_; 2150 2151 private com.google.maps.routing.v2.Waypoint origin_; 2152 private com.google.protobuf.SingleFieldBuilderV3< 2153 com.google.maps.routing.v2.Waypoint, 2154 com.google.maps.routing.v2.Waypoint.Builder, 2155 com.google.maps.routing.v2.WaypointOrBuilder> 2156 originBuilder_; 2157 /** 2158 * 2159 * 2160 * <pre> 2161 * Required. Origin waypoint. 2162 * </pre> 2163 * 2164 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2165 * </code> 2166 * 2167 * @return Whether the origin field is set. 2168 */ hasOrigin()2169 public boolean hasOrigin() { 2170 return ((bitField0_ & 0x00000001) != 0); 2171 } 2172 /** 2173 * 2174 * 2175 * <pre> 2176 * Required. Origin waypoint. 2177 * </pre> 2178 * 2179 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2180 * </code> 2181 * 2182 * @return The origin. 2183 */ getOrigin()2184 public com.google.maps.routing.v2.Waypoint getOrigin() { 2185 if (originBuilder_ == null) { 2186 return origin_ == null ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() : origin_; 2187 } else { 2188 return originBuilder_.getMessage(); 2189 } 2190 } 2191 /** 2192 * 2193 * 2194 * <pre> 2195 * Required. Origin waypoint. 2196 * </pre> 2197 * 2198 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2199 * </code> 2200 */ setOrigin(com.google.maps.routing.v2.Waypoint value)2201 public Builder setOrigin(com.google.maps.routing.v2.Waypoint value) { 2202 if (originBuilder_ == null) { 2203 if (value == null) { 2204 throw new NullPointerException(); 2205 } 2206 origin_ = value; 2207 } else { 2208 originBuilder_.setMessage(value); 2209 } 2210 bitField0_ |= 0x00000001; 2211 onChanged(); 2212 return this; 2213 } 2214 /** 2215 * 2216 * 2217 * <pre> 2218 * Required. Origin waypoint. 2219 * </pre> 2220 * 2221 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2222 * </code> 2223 */ setOrigin(com.google.maps.routing.v2.Waypoint.Builder builderForValue)2224 public Builder setOrigin(com.google.maps.routing.v2.Waypoint.Builder builderForValue) { 2225 if (originBuilder_ == null) { 2226 origin_ = builderForValue.build(); 2227 } else { 2228 originBuilder_.setMessage(builderForValue.build()); 2229 } 2230 bitField0_ |= 0x00000001; 2231 onChanged(); 2232 return this; 2233 } 2234 /** 2235 * 2236 * 2237 * <pre> 2238 * Required. Origin waypoint. 2239 * </pre> 2240 * 2241 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2242 * </code> 2243 */ mergeOrigin(com.google.maps.routing.v2.Waypoint value)2244 public Builder mergeOrigin(com.google.maps.routing.v2.Waypoint value) { 2245 if (originBuilder_ == null) { 2246 if (((bitField0_ & 0x00000001) != 0) 2247 && origin_ != null 2248 && origin_ != com.google.maps.routing.v2.Waypoint.getDefaultInstance()) { 2249 getOriginBuilder().mergeFrom(value); 2250 } else { 2251 origin_ = value; 2252 } 2253 } else { 2254 originBuilder_.mergeFrom(value); 2255 } 2256 bitField0_ |= 0x00000001; 2257 onChanged(); 2258 return this; 2259 } 2260 /** 2261 * 2262 * 2263 * <pre> 2264 * Required. Origin waypoint. 2265 * </pre> 2266 * 2267 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2268 * </code> 2269 */ clearOrigin()2270 public Builder clearOrigin() { 2271 bitField0_ = (bitField0_ & ~0x00000001); 2272 origin_ = null; 2273 if (originBuilder_ != null) { 2274 originBuilder_.dispose(); 2275 originBuilder_ = null; 2276 } 2277 onChanged(); 2278 return this; 2279 } 2280 /** 2281 * 2282 * 2283 * <pre> 2284 * Required. Origin waypoint. 2285 * </pre> 2286 * 2287 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2288 * </code> 2289 */ getOriginBuilder()2290 public com.google.maps.routing.v2.Waypoint.Builder getOriginBuilder() { 2291 bitField0_ |= 0x00000001; 2292 onChanged(); 2293 return getOriginFieldBuilder().getBuilder(); 2294 } 2295 /** 2296 * 2297 * 2298 * <pre> 2299 * Required. Origin waypoint. 2300 * </pre> 2301 * 2302 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2303 * </code> 2304 */ getOriginOrBuilder()2305 public com.google.maps.routing.v2.WaypointOrBuilder getOriginOrBuilder() { 2306 if (originBuilder_ != null) { 2307 return originBuilder_.getMessageOrBuilder(); 2308 } else { 2309 return origin_ == null ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() : origin_; 2310 } 2311 } 2312 /** 2313 * 2314 * 2315 * <pre> 2316 * Required. Origin waypoint. 2317 * </pre> 2318 * 2319 * <code>.google.maps.routing.v2.Waypoint origin = 1 [(.google.api.field_behavior) = REQUIRED]; 2320 * </code> 2321 */ 2322 private com.google.protobuf.SingleFieldBuilderV3< 2323 com.google.maps.routing.v2.Waypoint, 2324 com.google.maps.routing.v2.Waypoint.Builder, 2325 com.google.maps.routing.v2.WaypointOrBuilder> getOriginFieldBuilder()2326 getOriginFieldBuilder() { 2327 if (originBuilder_ == null) { 2328 originBuilder_ = 2329 new com.google.protobuf.SingleFieldBuilderV3< 2330 com.google.maps.routing.v2.Waypoint, 2331 com.google.maps.routing.v2.Waypoint.Builder, 2332 com.google.maps.routing.v2.WaypointOrBuilder>( 2333 getOrigin(), getParentForChildren(), isClean()); 2334 origin_ = null; 2335 } 2336 return originBuilder_; 2337 } 2338 2339 private com.google.maps.routing.v2.Waypoint destination_; 2340 private com.google.protobuf.SingleFieldBuilderV3< 2341 com.google.maps.routing.v2.Waypoint, 2342 com.google.maps.routing.v2.Waypoint.Builder, 2343 com.google.maps.routing.v2.WaypointOrBuilder> 2344 destinationBuilder_; 2345 /** 2346 * 2347 * 2348 * <pre> 2349 * Required. Destination waypoint. 2350 * </pre> 2351 * 2352 * <code> 2353 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2354 * </code> 2355 * 2356 * @return Whether the destination field is set. 2357 */ hasDestination()2358 public boolean hasDestination() { 2359 return ((bitField0_ & 0x00000002) != 0); 2360 } 2361 /** 2362 * 2363 * 2364 * <pre> 2365 * Required. Destination waypoint. 2366 * </pre> 2367 * 2368 * <code> 2369 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2370 * </code> 2371 * 2372 * @return The destination. 2373 */ getDestination()2374 public com.google.maps.routing.v2.Waypoint getDestination() { 2375 if (destinationBuilder_ == null) { 2376 return destination_ == null 2377 ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() 2378 : destination_; 2379 } else { 2380 return destinationBuilder_.getMessage(); 2381 } 2382 } 2383 /** 2384 * 2385 * 2386 * <pre> 2387 * Required. Destination waypoint. 2388 * </pre> 2389 * 2390 * <code> 2391 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2392 * </code> 2393 */ setDestination(com.google.maps.routing.v2.Waypoint value)2394 public Builder setDestination(com.google.maps.routing.v2.Waypoint value) { 2395 if (destinationBuilder_ == null) { 2396 if (value == null) { 2397 throw new NullPointerException(); 2398 } 2399 destination_ = value; 2400 } else { 2401 destinationBuilder_.setMessage(value); 2402 } 2403 bitField0_ |= 0x00000002; 2404 onChanged(); 2405 return this; 2406 } 2407 /** 2408 * 2409 * 2410 * <pre> 2411 * Required. Destination waypoint. 2412 * </pre> 2413 * 2414 * <code> 2415 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2416 * </code> 2417 */ setDestination(com.google.maps.routing.v2.Waypoint.Builder builderForValue)2418 public Builder setDestination(com.google.maps.routing.v2.Waypoint.Builder builderForValue) { 2419 if (destinationBuilder_ == null) { 2420 destination_ = builderForValue.build(); 2421 } else { 2422 destinationBuilder_.setMessage(builderForValue.build()); 2423 } 2424 bitField0_ |= 0x00000002; 2425 onChanged(); 2426 return this; 2427 } 2428 /** 2429 * 2430 * 2431 * <pre> 2432 * Required. Destination waypoint. 2433 * </pre> 2434 * 2435 * <code> 2436 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2437 * </code> 2438 */ mergeDestination(com.google.maps.routing.v2.Waypoint value)2439 public Builder mergeDestination(com.google.maps.routing.v2.Waypoint value) { 2440 if (destinationBuilder_ == null) { 2441 if (((bitField0_ & 0x00000002) != 0) 2442 && destination_ != null 2443 && destination_ != com.google.maps.routing.v2.Waypoint.getDefaultInstance()) { 2444 getDestinationBuilder().mergeFrom(value); 2445 } else { 2446 destination_ = value; 2447 } 2448 } else { 2449 destinationBuilder_.mergeFrom(value); 2450 } 2451 bitField0_ |= 0x00000002; 2452 onChanged(); 2453 return this; 2454 } 2455 /** 2456 * 2457 * 2458 * <pre> 2459 * Required. Destination waypoint. 2460 * </pre> 2461 * 2462 * <code> 2463 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2464 * </code> 2465 */ clearDestination()2466 public Builder clearDestination() { 2467 bitField0_ = (bitField0_ & ~0x00000002); 2468 destination_ = null; 2469 if (destinationBuilder_ != null) { 2470 destinationBuilder_.dispose(); 2471 destinationBuilder_ = null; 2472 } 2473 onChanged(); 2474 return this; 2475 } 2476 /** 2477 * 2478 * 2479 * <pre> 2480 * Required. Destination waypoint. 2481 * </pre> 2482 * 2483 * <code> 2484 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2485 * </code> 2486 */ getDestinationBuilder()2487 public com.google.maps.routing.v2.Waypoint.Builder getDestinationBuilder() { 2488 bitField0_ |= 0x00000002; 2489 onChanged(); 2490 return getDestinationFieldBuilder().getBuilder(); 2491 } 2492 /** 2493 * 2494 * 2495 * <pre> 2496 * Required. Destination waypoint. 2497 * </pre> 2498 * 2499 * <code> 2500 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2501 * </code> 2502 */ getDestinationOrBuilder()2503 public com.google.maps.routing.v2.WaypointOrBuilder getDestinationOrBuilder() { 2504 if (destinationBuilder_ != null) { 2505 return destinationBuilder_.getMessageOrBuilder(); 2506 } else { 2507 return destination_ == null 2508 ? com.google.maps.routing.v2.Waypoint.getDefaultInstance() 2509 : destination_; 2510 } 2511 } 2512 /** 2513 * 2514 * 2515 * <pre> 2516 * Required. Destination waypoint. 2517 * </pre> 2518 * 2519 * <code> 2520 * .google.maps.routing.v2.Waypoint destination = 2 [(.google.api.field_behavior) = REQUIRED]; 2521 * </code> 2522 */ 2523 private com.google.protobuf.SingleFieldBuilderV3< 2524 com.google.maps.routing.v2.Waypoint, 2525 com.google.maps.routing.v2.Waypoint.Builder, 2526 com.google.maps.routing.v2.WaypointOrBuilder> getDestinationFieldBuilder()2527 getDestinationFieldBuilder() { 2528 if (destinationBuilder_ == null) { 2529 destinationBuilder_ = 2530 new com.google.protobuf.SingleFieldBuilderV3< 2531 com.google.maps.routing.v2.Waypoint, 2532 com.google.maps.routing.v2.Waypoint.Builder, 2533 com.google.maps.routing.v2.WaypointOrBuilder>( 2534 getDestination(), getParentForChildren(), isClean()); 2535 destination_ = null; 2536 } 2537 return destinationBuilder_; 2538 } 2539 2540 private java.util.List<com.google.maps.routing.v2.Waypoint> intermediates_ = 2541 java.util.Collections.emptyList(); 2542 ensureIntermediatesIsMutable()2543 private void ensureIntermediatesIsMutable() { 2544 if (!((bitField0_ & 0x00000004) != 0)) { 2545 intermediates_ = 2546 new java.util.ArrayList<com.google.maps.routing.v2.Waypoint>(intermediates_); 2547 bitField0_ |= 0x00000004; 2548 } 2549 } 2550 2551 private com.google.protobuf.RepeatedFieldBuilderV3< 2552 com.google.maps.routing.v2.Waypoint, 2553 com.google.maps.routing.v2.Waypoint.Builder, 2554 com.google.maps.routing.v2.WaypointOrBuilder> 2555 intermediatesBuilder_; 2556 2557 /** 2558 * 2559 * 2560 * <pre> 2561 * Optional. A set of waypoints along the route (excluding terminal points), 2562 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2563 * supported. 2564 * </pre> 2565 * 2566 * <code> 2567 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2568 * </code> 2569 */ getIntermediatesList()2570 public java.util.List<com.google.maps.routing.v2.Waypoint> getIntermediatesList() { 2571 if (intermediatesBuilder_ == null) { 2572 return java.util.Collections.unmodifiableList(intermediates_); 2573 } else { 2574 return intermediatesBuilder_.getMessageList(); 2575 } 2576 } 2577 /** 2578 * 2579 * 2580 * <pre> 2581 * Optional. A set of waypoints along the route (excluding terminal points), 2582 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2583 * supported. 2584 * </pre> 2585 * 2586 * <code> 2587 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2588 * </code> 2589 */ getIntermediatesCount()2590 public int getIntermediatesCount() { 2591 if (intermediatesBuilder_ == null) { 2592 return intermediates_.size(); 2593 } else { 2594 return intermediatesBuilder_.getCount(); 2595 } 2596 } 2597 /** 2598 * 2599 * 2600 * <pre> 2601 * Optional. A set of waypoints along the route (excluding terminal points), 2602 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2603 * supported. 2604 * </pre> 2605 * 2606 * <code> 2607 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2608 * </code> 2609 */ getIntermediates(int index)2610 public com.google.maps.routing.v2.Waypoint getIntermediates(int index) { 2611 if (intermediatesBuilder_ == null) { 2612 return intermediates_.get(index); 2613 } else { 2614 return intermediatesBuilder_.getMessage(index); 2615 } 2616 } 2617 /** 2618 * 2619 * 2620 * <pre> 2621 * Optional. A set of waypoints along the route (excluding terminal points), 2622 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2623 * supported. 2624 * </pre> 2625 * 2626 * <code> 2627 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2628 * </code> 2629 */ setIntermediates(int index, com.google.maps.routing.v2.Waypoint value)2630 public Builder setIntermediates(int index, com.google.maps.routing.v2.Waypoint value) { 2631 if (intermediatesBuilder_ == null) { 2632 if (value == null) { 2633 throw new NullPointerException(); 2634 } 2635 ensureIntermediatesIsMutable(); 2636 intermediates_.set(index, value); 2637 onChanged(); 2638 } else { 2639 intermediatesBuilder_.setMessage(index, value); 2640 } 2641 return this; 2642 } 2643 /** 2644 * 2645 * 2646 * <pre> 2647 * Optional. A set of waypoints along the route (excluding terminal points), 2648 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2649 * supported. 2650 * </pre> 2651 * 2652 * <code> 2653 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2654 * </code> 2655 */ setIntermediates( int index, com.google.maps.routing.v2.Waypoint.Builder builderForValue)2656 public Builder setIntermediates( 2657 int index, com.google.maps.routing.v2.Waypoint.Builder builderForValue) { 2658 if (intermediatesBuilder_ == null) { 2659 ensureIntermediatesIsMutable(); 2660 intermediates_.set(index, builderForValue.build()); 2661 onChanged(); 2662 } else { 2663 intermediatesBuilder_.setMessage(index, builderForValue.build()); 2664 } 2665 return this; 2666 } 2667 /** 2668 * 2669 * 2670 * <pre> 2671 * Optional. A set of waypoints along the route (excluding terminal points), 2672 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2673 * supported. 2674 * </pre> 2675 * 2676 * <code> 2677 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2678 * </code> 2679 */ addIntermediates(com.google.maps.routing.v2.Waypoint value)2680 public Builder addIntermediates(com.google.maps.routing.v2.Waypoint value) { 2681 if (intermediatesBuilder_ == null) { 2682 if (value == null) { 2683 throw new NullPointerException(); 2684 } 2685 ensureIntermediatesIsMutable(); 2686 intermediates_.add(value); 2687 onChanged(); 2688 } else { 2689 intermediatesBuilder_.addMessage(value); 2690 } 2691 return this; 2692 } 2693 /** 2694 * 2695 * 2696 * <pre> 2697 * Optional. A set of waypoints along the route (excluding terminal points), 2698 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2699 * supported. 2700 * </pre> 2701 * 2702 * <code> 2703 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2704 * </code> 2705 */ addIntermediates(int index, com.google.maps.routing.v2.Waypoint value)2706 public Builder addIntermediates(int index, com.google.maps.routing.v2.Waypoint value) { 2707 if (intermediatesBuilder_ == null) { 2708 if (value == null) { 2709 throw new NullPointerException(); 2710 } 2711 ensureIntermediatesIsMutable(); 2712 intermediates_.add(index, value); 2713 onChanged(); 2714 } else { 2715 intermediatesBuilder_.addMessage(index, value); 2716 } 2717 return this; 2718 } 2719 /** 2720 * 2721 * 2722 * <pre> 2723 * Optional. A set of waypoints along the route (excluding terminal points), 2724 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2725 * supported. 2726 * </pre> 2727 * 2728 * <code> 2729 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2730 * </code> 2731 */ addIntermediates(com.google.maps.routing.v2.Waypoint.Builder builderForValue)2732 public Builder addIntermediates(com.google.maps.routing.v2.Waypoint.Builder builderForValue) { 2733 if (intermediatesBuilder_ == null) { 2734 ensureIntermediatesIsMutable(); 2735 intermediates_.add(builderForValue.build()); 2736 onChanged(); 2737 } else { 2738 intermediatesBuilder_.addMessage(builderForValue.build()); 2739 } 2740 return this; 2741 } 2742 /** 2743 * 2744 * 2745 * <pre> 2746 * Optional. A set of waypoints along the route (excluding terminal points), 2747 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2748 * supported. 2749 * </pre> 2750 * 2751 * <code> 2752 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2753 * </code> 2754 */ addIntermediates( int index, com.google.maps.routing.v2.Waypoint.Builder builderForValue)2755 public Builder addIntermediates( 2756 int index, com.google.maps.routing.v2.Waypoint.Builder builderForValue) { 2757 if (intermediatesBuilder_ == null) { 2758 ensureIntermediatesIsMutable(); 2759 intermediates_.add(index, builderForValue.build()); 2760 onChanged(); 2761 } else { 2762 intermediatesBuilder_.addMessage(index, builderForValue.build()); 2763 } 2764 return this; 2765 } 2766 /** 2767 * 2768 * 2769 * <pre> 2770 * Optional. A set of waypoints along the route (excluding terminal points), 2771 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2772 * supported. 2773 * </pre> 2774 * 2775 * <code> 2776 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2777 * </code> 2778 */ addAllIntermediates( java.lang.Iterable<? extends com.google.maps.routing.v2.Waypoint> values)2779 public Builder addAllIntermediates( 2780 java.lang.Iterable<? extends com.google.maps.routing.v2.Waypoint> values) { 2781 if (intermediatesBuilder_ == null) { 2782 ensureIntermediatesIsMutable(); 2783 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intermediates_); 2784 onChanged(); 2785 } else { 2786 intermediatesBuilder_.addAllMessages(values); 2787 } 2788 return this; 2789 } 2790 /** 2791 * 2792 * 2793 * <pre> 2794 * Optional. A set of waypoints along the route (excluding terminal points), 2795 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2796 * supported. 2797 * </pre> 2798 * 2799 * <code> 2800 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2801 * </code> 2802 */ clearIntermediates()2803 public Builder clearIntermediates() { 2804 if (intermediatesBuilder_ == null) { 2805 intermediates_ = java.util.Collections.emptyList(); 2806 bitField0_ = (bitField0_ & ~0x00000004); 2807 onChanged(); 2808 } else { 2809 intermediatesBuilder_.clear(); 2810 } 2811 return this; 2812 } 2813 /** 2814 * 2815 * 2816 * <pre> 2817 * Optional. A set of waypoints along the route (excluding terminal points), 2818 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2819 * supported. 2820 * </pre> 2821 * 2822 * <code> 2823 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2824 * </code> 2825 */ removeIntermediates(int index)2826 public Builder removeIntermediates(int index) { 2827 if (intermediatesBuilder_ == null) { 2828 ensureIntermediatesIsMutable(); 2829 intermediates_.remove(index); 2830 onChanged(); 2831 } else { 2832 intermediatesBuilder_.remove(index); 2833 } 2834 return this; 2835 } 2836 /** 2837 * 2838 * 2839 * <pre> 2840 * Optional. A set of waypoints along the route (excluding terminal points), 2841 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2842 * supported. 2843 * </pre> 2844 * 2845 * <code> 2846 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2847 * </code> 2848 */ getIntermediatesBuilder(int index)2849 public com.google.maps.routing.v2.Waypoint.Builder getIntermediatesBuilder(int index) { 2850 return getIntermediatesFieldBuilder().getBuilder(index); 2851 } 2852 /** 2853 * 2854 * 2855 * <pre> 2856 * Optional. A set of waypoints along the route (excluding terminal points), 2857 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2858 * supported. 2859 * </pre> 2860 * 2861 * <code> 2862 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2863 * </code> 2864 */ getIntermediatesOrBuilder(int index)2865 public com.google.maps.routing.v2.WaypointOrBuilder getIntermediatesOrBuilder(int index) { 2866 if (intermediatesBuilder_ == null) { 2867 return intermediates_.get(index); 2868 } else { 2869 return intermediatesBuilder_.getMessageOrBuilder(index); 2870 } 2871 } 2872 /** 2873 * 2874 * 2875 * <pre> 2876 * Optional. A set of waypoints along the route (excluding terminal points), 2877 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2878 * supported. 2879 * </pre> 2880 * 2881 * <code> 2882 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2883 * </code> 2884 */ 2885 public java.util.List<? extends com.google.maps.routing.v2.WaypointOrBuilder> getIntermediatesOrBuilderList()2886 getIntermediatesOrBuilderList() { 2887 if (intermediatesBuilder_ != null) { 2888 return intermediatesBuilder_.getMessageOrBuilderList(); 2889 } else { 2890 return java.util.Collections.unmodifiableList(intermediates_); 2891 } 2892 } 2893 /** 2894 * 2895 * 2896 * <pre> 2897 * Optional. A set of waypoints along the route (excluding terminal points), 2898 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2899 * supported. 2900 * </pre> 2901 * 2902 * <code> 2903 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2904 * </code> 2905 */ addIntermediatesBuilder()2906 public com.google.maps.routing.v2.Waypoint.Builder addIntermediatesBuilder() { 2907 return getIntermediatesFieldBuilder() 2908 .addBuilder(com.google.maps.routing.v2.Waypoint.getDefaultInstance()); 2909 } 2910 /** 2911 * 2912 * 2913 * <pre> 2914 * Optional. A set of waypoints along the route (excluding terminal points), 2915 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2916 * supported. 2917 * </pre> 2918 * 2919 * <code> 2920 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2921 * </code> 2922 */ addIntermediatesBuilder(int index)2923 public com.google.maps.routing.v2.Waypoint.Builder addIntermediatesBuilder(int index) { 2924 return getIntermediatesFieldBuilder() 2925 .addBuilder(index, com.google.maps.routing.v2.Waypoint.getDefaultInstance()); 2926 } 2927 /** 2928 * 2929 * 2930 * <pre> 2931 * Optional. A set of waypoints along the route (excluding terminal points), 2932 * for either stopping at or passing by. Up to 25 intermediate waypoints are 2933 * supported. 2934 * </pre> 2935 * 2936 * <code> 2937 * repeated .google.maps.routing.v2.Waypoint intermediates = 3 [(.google.api.field_behavior) = OPTIONAL]; 2938 * </code> 2939 */ 2940 public java.util.List<com.google.maps.routing.v2.Waypoint.Builder> getIntermediatesBuilderList()2941 getIntermediatesBuilderList() { 2942 return getIntermediatesFieldBuilder().getBuilderList(); 2943 } 2944 2945 private com.google.protobuf.RepeatedFieldBuilderV3< 2946 com.google.maps.routing.v2.Waypoint, 2947 com.google.maps.routing.v2.Waypoint.Builder, 2948 com.google.maps.routing.v2.WaypointOrBuilder> getIntermediatesFieldBuilder()2949 getIntermediatesFieldBuilder() { 2950 if (intermediatesBuilder_ == null) { 2951 intermediatesBuilder_ = 2952 new com.google.protobuf.RepeatedFieldBuilderV3< 2953 com.google.maps.routing.v2.Waypoint, 2954 com.google.maps.routing.v2.Waypoint.Builder, 2955 com.google.maps.routing.v2.WaypointOrBuilder>( 2956 intermediates_, 2957 ((bitField0_ & 0x00000004) != 0), 2958 getParentForChildren(), 2959 isClean()); 2960 intermediates_ = null; 2961 } 2962 return intermediatesBuilder_; 2963 } 2964 2965 private int travelMode_ = 0; 2966 /** 2967 * 2968 * 2969 * <pre> 2970 * Optional. Specifies the mode of transportation. 2971 * </pre> 2972 * 2973 * <code> 2974 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 2975 * </code> 2976 * 2977 * @return The enum numeric value on the wire for travelMode. 2978 */ 2979 @java.lang.Override getTravelModeValue()2980 public int getTravelModeValue() { 2981 return travelMode_; 2982 } 2983 /** 2984 * 2985 * 2986 * <pre> 2987 * Optional. Specifies the mode of transportation. 2988 * </pre> 2989 * 2990 * <code> 2991 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 2992 * </code> 2993 * 2994 * @param value The enum numeric value on the wire for travelMode to set. 2995 * @return This builder for chaining. 2996 */ setTravelModeValue(int value)2997 public Builder setTravelModeValue(int value) { 2998 travelMode_ = value; 2999 bitField0_ |= 0x00000008; 3000 onChanged(); 3001 return this; 3002 } 3003 /** 3004 * 3005 * 3006 * <pre> 3007 * Optional. Specifies the mode of transportation. 3008 * </pre> 3009 * 3010 * <code> 3011 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 3012 * </code> 3013 * 3014 * @return The travelMode. 3015 */ 3016 @java.lang.Override getTravelMode()3017 public com.google.maps.routing.v2.RouteTravelMode getTravelMode() { 3018 com.google.maps.routing.v2.RouteTravelMode result = 3019 com.google.maps.routing.v2.RouteTravelMode.forNumber(travelMode_); 3020 return result == null ? com.google.maps.routing.v2.RouteTravelMode.UNRECOGNIZED : result; 3021 } 3022 /** 3023 * 3024 * 3025 * <pre> 3026 * Optional. Specifies the mode of transportation. 3027 * </pre> 3028 * 3029 * <code> 3030 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 3031 * </code> 3032 * 3033 * @param value The travelMode to set. 3034 * @return This builder for chaining. 3035 */ setTravelMode(com.google.maps.routing.v2.RouteTravelMode value)3036 public Builder setTravelMode(com.google.maps.routing.v2.RouteTravelMode value) { 3037 if (value == null) { 3038 throw new NullPointerException(); 3039 } 3040 bitField0_ |= 0x00000008; 3041 travelMode_ = value.getNumber(); 3042 onChanged(); 3043 return this; 3044 } 3045 /** 3046 * 3047 * 3048 * <pre> 3049 * Optional. Specifies the mode of transportation. 3050 * </pre> 3051 * 3052 * <code> 3053 * .google.maps.routing.v2.RouteTravelMode travel_mode = 4 [(.google.api.field_behavior) = OPTIONAL]; 3054 * </code> 3055 * 3056 * @return This builder for chaining. 3057 */ clearTravelMode()3058 public Builder clearTravelMode() { 3059 bitField0_ = (bitField0_ & ~0x00000008); 3060 travelMode_ = 0; 3061 onChanged(); 3062 return this; 3063 } 3064 3065 private int routingPreference_ = 0; 3066 /** 3067 * 3068 * 3069 * <pre> 3070 * Optional. Specifies how to compute the route. The server 3071 * attempts to use the selected routing preference to compute the route. If 3072 * the routing preference results in an error or an extra long latency, then 3073 * an error is returned. You can specify this option only when the 3074 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 3075 * </pre> 3076 * 3077 * <code> 3078 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 3079 * </code> 3080 * 3081 * @return The enum numeric value on the wire for routingPreference. 3082 */ 3083 @java.lang.Override getRoutingPreferenceValue()3084 public int getRoutingPreferenceValue() { 3085 return routingPreference_; 3086 } 3087 /** 3088 * 3089 * 3090 * <pre> 3091 * Optional. Specifies how to compute the route. The server 3092 * attempts to use the selected routing preference to compute the route. If 3093 * the routing preference results in an error or an extra long latency, then 3094 * an error is returned. You can specify this option only when the 3095 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 3096 * </pre> 3097 * 3098 * <code> 3099 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 3100 * </code> 3101 * 3102 * @param value The enum numeric value on the wire for routingPreference to set. 3103 * @return This builder for chaining. 3104 */ setRoutingPreferenceValue(int value)3105 public Builder setRoutingPreferenceValue(int value) { 3106 routingPreference_ = value; 3107 bitField0_ |= 0x00000010; 3108 onChanged(); 3109 return this; 3110 } 3111 /** 3112 * 3113 * 3114 * <pre> 3115 * Optional. Specifies how to compute the route. The server 3116 * attempts to use the selected routing preference to compute the route. If 3117 * the routing preference results in an error or an extra long latency, then 3118 * an error is returned. You can specify this option only when the 3119 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 3120 * </pre> 3121 * 3122 * <code> 3123 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 3124 * </code> 3125 * 3126 * @return The routingPreference. 3127 */ 3128 @java.lang.Override getRoutingPreference()3129 public com.google.maps.routing.v2.RoutingPreference getRoutingPreference() { 3130 com.google.maps.routing.v2.RoutingPreference result = 3131 com.google.maps.routing.v2.RoutingPreference.forNumber(routingPreference_); 3132 return result == null ? com.google.maps.routing.v2.RoutingPreference.UNRECOGNIZED : result; 3133 } 3134 /** 3135 * 3136 * 3137 * <pre> 3138 * Optional. Specifies how to compute the route. The server 3139 * attempts to use the selected routing preference to compute the route. If 3140 * the routing preference results in an error or an extra long latency, then 3141 * an error is returned. You can specify this option only when the 3142 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 3143 * </pre> 3144 * 3145 * <code> 3146 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 3147 * </code> 3148 * 3149 * @param value The routingPreference to set. 3150 * @return This builder for chaining. 3151 */ setRoutingPreference(com.google.maps.routing.v2.RoutingPreference value)3152 public Builder setRoutingPreference(com.google.maps.routing.v2.RoutingPreference value) { 3153 if (value == null) { 3154 throw new NullPointerException(); 3155 } 3156 bitField0_ |= 0x00000010; 3157 routingPreference_ = value.getNumber(); 3158 onChanged(); 3159 return this; 3160 } 3161 /** 3162 * 3163 * 3164 * <pre> 3165 * Optional. Specifies how to compute the route. The server 3166 * attempts to use the selected routing preference to compute the route. If 3167 * the routing preference results in an error or an extra long latency, then 3168 * an error is returned. You can specify this option only when the 3169 * `travel_mode` is `DRIVE` or `TWO_WHEELER`, otherwise the request fails. 3170 * </pre> 3171 * 3172 * <code> 3173 * .google.maps.routing.v2.RoutingPreference routing_preference = 5 [(.google.api.field_behavior) = OPTIONAL]; 3174 * </code> 3175 * 3176 * @return This builder for chaining. 3177 */ clearRoutingPreference()3178 public Builder clearRoutingPreference() { 3179 bitField0_ = (bitField0_ & ~0x00000010); 3180 routingPreference_ = 0; 3181 onChanged(); 3182 return this; 3183 } 3184 3185 private int polylineQuality_ = 0; 3186 /** 3187 * 3188 * 3189 * <pre> 3190 * Optional. Specifies your preference for the quality of the polyline. 3191 * </pre> 3192 * 3193 * <code> 3194 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 3195 * </code> 3196 * 3197 * @return The enum numeric value on the wire for polylineQuality. 3198 */ 3199 @java.lang.Override getPolylineQualityValue()3200 public int getPolylineQualityValue() { 3201 return polylineQuality_; 3202 } 3203 /** 3204 * 3205 * 3206 * <pre> 3207 * Optional. Specifies your preference for the quality of the polyline. 3208 * </pre> 3209 * 3210 * <code> 3211 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 3212 * </code> 3213 * 3214 * @param value The enum numeric value on the wire for polylineQuality to set. 3215 * @return This builder for chaining. 3216 */ setPolylineQualityValue(int value)3217 public Builder setPolylineQualityValue(int value) { 3218 polylineQuality_ = value; 3219 bitField0_ |= 0x00000020; 3220 onChanged(); 3221 return this; 3222 } 3223 /** 3224 * 3225 * 3226 * <pre> 3227 * Optional. Specifies your preference for the quality of the polyline. 3228 * </pre> 3229 * 3230 * <code> 3231 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 3232 * </code> 3233 * 3234 * @return The polylineQuality. 3235 */ 3236 @java.lang.Override getPolylineQuality()3237 public com.google.maps.routing.v2.PolylineQuality getPolylineQuality() { 3238 com.google.maps.routing.v2.PolylineQuality result = 3239 com.google.maps.routing.v2.PolylineQuality.forNumber(polylineQuality_); 3240 return result == null ? com.google.maps.routing.v2.PolylineQuality.UNRECOGNIZED : result; 3241 } 3242 /** 3243 * 3244 * 3245 * <pre> 3246 * Optional. Specifies your preference for the quality of the polyline. 3247 * </pre> 3248 * 3249 * <code> 3250 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 3251 * </code> 3252 * 3253 * @param value The polylineQuality to set. 3254 * @return This builder for chaining. 3255 */ setPolylineQuality(com.google.maps.routing.v2.PolylineQuality value)3256 public Builder setPolylineQuality(com.google.maps.routing.v2.PolylineQuality value) { 3257 if (value == null) { 3258 throw new NullPointerException(); 3259 } 3260 bitField0_ |= 0x00000020; 3261 polylineQuality_ = value.getNumber(); 3262 onChanged(); 3263 return this; 3264 } 3265 /** 3266 * 3267 * 3268 * <pre> 3269 * Optional. Specifies your preference for the quality of the polyline. 3270 * </pre> 3271 * 3272 * <code> 3273 * .google.maps.routing.v2.PolylineQuality polyline_quality = 6 [(.google.api.field_behavior) = OPTIONAL]; 3274 * </code> 3275 * 3276 * @return This builder for chaining. 3277 */ clearPolylineQuality()3278 public Builder clearPolylineQuality() { 3279 bitField0_ = (bitField0_ & ~0x00000020); 3280 polylineQuality_ = 0; 3281 onChanged(); 3282 return this; 3283 } 3284 3285 private int polylineEncoding_ = 0; 3286 /** 3287 * 3288 * 3289 * <pre> 3290 * Optional. Specifies the preferred encoding for the polyline. 3291 * </pre> 3292 * 3293 * <code> 3294 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 3295 * </code> 3296 * 3297 * @return The enum numeric value on the wire for polylineEncoding. 3298 */ 3299 @java.lang.Override getPolylineEncodingValue()3300 public int getPolylineEncodingValue() { 3301 return polylineEncoding_; 3302 } 3303 /** 3304 * 3305 * 3306 * <pre> 3307 * Optional. Specifies the preferred encoding for the polyline. 3308 * </pre> 3309 * 3310 * <code> 3311 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 3312 * </code> 3313 * 3314 * @param value The enum numeric value on the wire for polylineEncoding to set. 3315 * @return This builder for chaining. 3316 */ setPolylineEncodingValue(int value)3317 public Builder setPolylineEncodingValue(int value) { 3318 polylineEncoding_ = value; 3319 bitField0_ |= 0x00000040; 3320 onChanged(); 3321 return this; 3322 } 3323 /** 3324 * 3325 * 3326 * <pre> 3327 * Optional. Specifies the preferred encoding for the polyline. 3328 * </pre> 3329 * 3330 * <code> 3331 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 3332 * </code> 3333 * 3334 * @return The polylineEncoding. 3335 */ 3336 @java.lang.Override getPolylineEncoding()3337 public com.google.maps.routing.v2.PolylineEncoding getPolylineEncoding() { 3338 com.google.maps.routing.v2.PolylineEncoding result = 3339 com.google.maps.routing.v2.PolylineEncoding.forNumber(polylineEncoding_); 3340 return result == null ? com.google.maps.routing.v2.PolylineEncoding.UNRECOGNIZED : result; 3341 } 3342 /** 3343 * 3344 * 3345 * <pre> 3346 * Optional. Specifies the preferred encoding for the polyline. 3347 * </pre> 3348 * 3349 * <code> 3350 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 3351 * </code> 3352 * 3353 * @param value The polylineEncoding to set. 3354 * @return This builder for chaining. 3355 */ setPolylineEncoding(com.google.maps.routing.v2.PolylineEncoding value)3356 public Builder setPolylineEncoding(com.google.maps.routing.v2.PolylineEncoding value) { 3357 if (value == null) { 3358 throw new NullPointerException(); 3359 } 3360 bitField0_ |= 0x00000040; 3361 polylineEncoding_ = value.getNumber(); 3362 onChanged(); 3363 return this; 3364 } 3365 /** 3366 * 3367 * 3368 * <pre> 3369 * Optional. Specifies the preferred encoding for the polyline. 3370 * </pre> 3371 * 3372 * <code> 3373 * .google.maps.routing.v2.PolylineEncoding polyline_encoding = 12 [(.google.api.field_behavior) = OPTIONAL]; 3374 * </code> 3375 * 3376 * @return This builder for chaining. 3377 */ clearPolylineEncoding()3378 public Builder clearPolylineEncoding() { 3379 bitField0_ = (bitField0_ & ~0x00000040); 3380 polylineEncoding_ = 0; 3381 onChanged(); 3382 return this; 3383 } 3384 3385 private com.google.protobuf.Timestamp departureTime_; 3386 private com.google.protobuf.SingleFieldBuilderV3< 3387 com.google.protobuf.Timestamp, 3388 com.google.protobuf.Timestamp.Builder, 3389 com.google.protobuf.TimestampOrBuilder> 3390 departureTimeBuilder_; 3391 /** 3392 * 3393 * 3394 * <pre> 3395 * Optional. The departure time. If you don't set this value, then this value 3396 * defaults to the time that you made the request. If you set this value to a 3397 * time that has already occurred, then the request fails. 3398 * </pre> 3399 * 3400 * <code> 3401 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3402 * </code> 3403 * 3404 * @return Whether the departureTime field is set. 3405 */ hasDepartureTime()3406 public boolean hasDepartureTime() { 3407 return ((bitField0_ & 0x00000080) != 0); 3408 } 3409 /** 3410 * 3411 * 3412 * <pre> 3413 * Optional. The departure time. If you don't set this value, then this value 3414 * defaults to the time that you made the request. If you set this value to a 3415 * time that has already occurred, then the request fails. 3416 * </pre> 3417 * 3418 * <code> 3419 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3420 * </code> 3421 * 3422 * @return The departureTime. 3423 */ getDepartureTime()3424 public com.google.protobuf.Timestamp getDepartureTime() { 3425 if (departureTimeBuilder_ == null) { 3426 return departureTime_ == null 3427 ? com.google.protobuf.Timestamp.getDefaultInstance() 3428 : departureTime_; 3429 } else { 3430 return departureTimeBuilder_.getMessage(); 3431 } 3432 } 3433 /** 3434 * 3435 * 3436 * <pre> 3437 * Optional. The departure time. If you don't set this value, then this value 3438 * defaults to the time that you made the request. If you set this value to a 3439 * time that has already occurred, then the request fails. 3440 * </pre> 3441 * 3442 * <code> 3443 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3444 * </code> 3445 */ setDepartureTime(com.google.protobuf.Timestamp value)3446 public Builder setDepartureTime(com.google.protobuf.Timestamp value) { 3447 if (departureTimeBuilder_ == null) { 3448 if (value == null) { 3449 throw new NullPointerException(); 3450 } 3451 departureTime_ = value; 3452 } else { 3453 departureTimeBuilder_.setMessage(value); 3454 } 3455 bitField0_ |= 0x00000080; 3456 onChanged(); 3457 return this; 3458 } 3459 /** 3460 * 3461 * 3462 * <pre> 3463 * Optional. The departure time. If you don't set this value, then this value 3464 * defaults to the time that you made the request. If you set this value to a 3465 * time that has already occurred, then the request fails. 3466 * </pre> 3467 * 3468 * <code> 3469 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3470 * </code> 3471 */ setDepartureTime(com.google.protobuf.Timestamp.Builder builderForValue)3472 public Builder setDepartureTime(com.google.protobuf.Timestamp.Builder builderForValue) { 3473 if (departureTimeBuilder_ == null) { 3474 departureTime_ = builderForValue.build(); 3475 } else { 3476 departureTimeBuilder_.setMessage(builderForValue.build()); 3477 } 3478 bitField0_ |= 0x00000080; 3479 onChanged(); 3480 return this; 3481 } 3482 /** 3483 * 3484 * 3485 * <pre> 3486 * Optional. The departure time. If you don't set this value, then this value 3487 * defaults to the time that you made the request. If you set this value to a 3488 * time that has already occurred, then the request fails. 3489 * </pre> 3490 * 3491 * <code> 3492 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3493 * </code> 3494 */ mergeDepartureTime(com.google.protobuf.Timestamp value)3495 public Builder mergeDepartureTime(com.google.protobuf.Timestamp value) { 3496 if (departureTimeBuilder_ == null) { 3497 if (((bitField0_ & 0x00000080) != 0) 3498 && departureTime_ != null 3499 && departureTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 3500 getDepartureTimeBuilder().mergeFrom(value); 3501 } else { 3502 departureTime_ = value; 3503 } 3504 } else { 3505 departureTimeBuilder_.mergeFrom(value); 3506 } 3507 bitField0_ |= 0x00000080; 3508 onChanged(); 3509 return this; 3510 } 3511 /** 3512 * 3513 * 3514 * <pre> 3515 * Optional. The departure time. If you don't set this value, then this value 3516 * defaults to the time that you made the request. If you set this value to a 3517 * time that has already occurred, then the request fails. 3518 * </pre> 3519 * 3520 * <code> 3521 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3522 * </code> 3523 */ clearDepartureTime()3524 public Builder clearDepartureTime() { 3525 bitField0_ = (bitField0_ & ~0x00000080); 3526 departureTime_ = null; 3527 if (departureTimeBuilder_ != null) { 3528 departureTimeBuilder_.dispose(); 3529 departureTimeBuilder_ = null; 3530 } 3531 onChanged(); 3532 return this; 3533 } 3534 /** 3535 * 3536 * 3537 * <pre> 3538 * Optional. The departure time. If you don't set this value, then this value 3539 * defaults to the time that you made the request. If you set this value to a 3540 * time that has already occurred, then the request fails. 3541 * </pre> 3542 * 3543 * <code> 3544 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3545 * </code> 3546 */ getDepartureTimeBuilder()3547 public com.google.protobuf.Timestamp.Builder getDepartureTimeBuilder() { 3548 bitField0_ |= 0x00000080; 3549 onChanged(); 3550 return getDepartureTimeFieldBuilder().getBuilder(); 3551 } 3552 /** 3553 * 3554 * 3555 * <pre> 3556 * Optional. The departure time. If you don't set this value, then this value 3557 * defaults to the time that you made the request. If you set this value to a 3558 * time that has already occurred, then the request fails. 3559 * </pre> 3560 * 3561 * <code> 3562 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3563 * </code> 3564 */ getDepartureTimeOrBuilder()3565 public com.google.protobuf.TimestampOrBuilder getDepartureTimeOrBuilder() { 3566 if (departureTimeBuilder_ != null) { 3567 return departureTimeBuilder_.getMessageOrBuilder(); 3568 } else { 3569 return departureTime_ == null 3570 ? com.google.protobuf.Timestamp.getDefaultInstance() 3571 : departureTime_; 3572 } 3573 } 3574 /** 3575 * 3576 * 3577 * <pre> 3578 * Optional. The departure time. If you don't set this value, then this value 3579 * defaults to the time that you made the request. If you set this value to a 3580 * time that has already occurred, then the request fails. 3581 * </pre> 3582 * 3583 * <code> 3584 * .google.protobuf.Timestamp departure_time = 7 [(.google.api.field_behavior) = OPTIONAL]; 3585 * </code> 3586 */ 3587 private com.google.protobuf.SingleFieldBuilderV3< 3588 com.google.protobuf.Timestamp, 3589 com.google.protobuf.Timestamp.Builder, 3590 com.google.protobuf.TimestampOrBuilder> getDepartureTimeFieldBuilder()3591 getDepartureTimeFieldBuilder() { 3592 if (departureTimeBuilder_ == null) { 3593 departureTimeBuilder_ = 3594 new com.google.protobuf.SingleFieldBuilderV3< 3595 com.google.protobuf.Timestamp, 3596 com.google.protobuf.Timestamp.Builder, 3597 com.google.protobuf.TimestampOrBuilder>( 3598 getDepartureTime(), getParentForChildren(), isClean()); 3599 departureTime_ = null; 3600 } 3601 return departureTimeBuilder_; 3602 } 3603 3604 private boolean computeAlternativeRoutes_; 3605 /** 3606 * 3607 * 3608 * <pre> 3609 * Optional. Specifies whether to calculate alternate routes in addition to 3610 * the route. No alternative routes are returned for requests that have 3611 * intermediate waypoints. 3612 * </pre> 3613 * 3614 * <code>bool compute_alternative_routes = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 3615 * 3616 * @return The computeAlternativeRoutes. 3617 */ 3618 @java.lang.Override getComputeAlternativeRoutes()3619 public boolean getComputeAlternativeRoutes() { 3620 return computeAlternativeRoutes_; 3621 } 3622 /** 3623 * 3624 * 3625 * <pre> 3626 * Optional. Specifies whether to calculate alternate routes in addition to 3627 * the route. No alternative routes are returned for requests that have 3628 * intermediate waypoints. 3629 * </pre> 3630 * 3631 * <code>bool compute_alternative_routes = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 3632 * 3633 * @param value The computeAlternativeRoutes to set. 3634 * @return This builder for chaining. 3635 */ setComputeAlternativeRoutes(boolean value)3636 public Builder setComputeAlternativeRoutes(boolean value) { 3637 3638 computeAlternativeRoutes_ = value; 3639 bitField0_ |= 0x00000100; 3640 onChanged(); 3641 return this; 3642 } 3643 /** 3644 * 3645 * 3646 * <pre> 3647 * Optional. Specifies whether to calculate alternate routes in addition to 3648 * the route. No alternative routes are returned for requests that have 3649 * intermediate waypoints. 3650 * </pre> 3651 * 3652 * <code>bool compute_alternative_routes = 8 [(.google.api.field_behavior) = OPTIONAL];</code> 3653 * 3654 * @return This builder for chaining. 3655 */ clearComputeAlternativeRoutes()3656 public Builder clearComputeAlternativeRoutes() { 3657 bitField0_ = (bitField0_ & ~0x00000100); 3658 computeAlternativeRoutes_ = false; 3659 onChanged(); 3660 return this; 3661 } 3662 3663 private com.google.maps.routing.v2.RouteModifiers routeModifiers_; 3664 private com.google.protobuf.SingleFieldBuilderV3< 3665 com.google.maps.routing.v2.RouteModifiers, 3666 com.google.maps.routing.v2.RouteModifiers.Builder, 3667 com.google.maps.routing.v2.RouteModifiersOrBuilder> 3668 routeModifiersBuilder_; 3669 /** 3670 * 3671 * 3672 * <pre> 3673 * Optional. A set of conditions to satisfy that affect the way routes are 3674 * calculated. 3675 * </pre> 3676 * 3677 * <code> 3678 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3679 * </code> 3680 * 3681 * @return Whether the routeModifiers field is set. 3682 */ hasRouteModifiers()3683 public boolean hasRouteModifiers() { 3684 return ((bitField0_ & 0x00000200) != 0); 3685 } 3686 /** 3687 * 3688 * 3689 * <pre> 3690 * Optional. A set of conditions to satisfy that affect the way routes are 3691 * calculated. 3692 * </pre> 3693 * 3694 * <code> 3695 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3696 * </code> 3697 * 3698 * @return The routeModifiers. 3699 */ getRouteModifiers()3700 public com.google.maps.routing.v2.RouteModifiers getRouteModifiers() { 3701 if (routeModifiersBuilder_ == null) { 3702 return routeModifiers_ == null 3703 ? com.google.maps.routing.v2.RouteModifiers.getDefaultInstance() 3704 : routeModifiers_; 3705 } else { 3706 return routeModifiersBuilder_.getMessage(); 3707 } 3708 } 3709 /** 3710 * 3711 * 3712 * <pre> 3713 * Optional. A set of conditions to satisfy that affect the way routes are 3714 * calculated. 3715 * </pre> 3716 * 3717 * <code> 3718 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3719 * </code> 3720 */ setRouteModifiers(com.google.maps.routing.v2.RouteModifiers value)3721 public Builder setRouteModifiers(com.google.maps.routing.v2.RouteModifiers value) { 3722 if (routeModifiersBuilder_ == null) { 3723 if (value == null) { 3724 throw new NullPointerException(); 3725 } 3726 routeModifiers_ = value; 3727 } else { 3728 routeModifiersBuilder_.setMessage(value); 3729 } 3730 bitField0_ |= 0x00000200; 3731 onChanged(); 3732 return this; 3733 } 3734 /** 3735 * 3736 * 3737 * <pre> 3738 * Optional. A set of conditions to satisfy that affect the way routes are 3739 * calculated. 3740 * </pre> 3741 * 3742 * <code> 3743 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3744 * </code> 3745 */ setRouteModifiers( com.google.maps.routing.v2.RouteModifiers.Builder builderForValue)3746 public Builder setRouteModifiers( 3747 com.google.maps.routing.v2.RouteModifiers.Builder builderForValue) { 3748 if (routeModifiersBuilder_ == null) { 3749 routeModifiers_ = builderForValue.build(); 3750 } else { 3751 routeModifiersBuilder_.setMessage(builderForValue.build()); 3752 } 3753 bitField0_ |= 0x00000200; 3754 onChanged(); 3755 return this; 3756 } 3757 /** 3758 * 3759 * 3760 * <pre> 3761 * Optional. A set of conditions to satisfy that affect the way routes are 3762 * calculated. 3763 * </pre> 3764 * 3765 * <code> 3766 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3767 * </code> 3768 */ mergeRouteModifiers(com.google.maps.routing.v2.RouteModifiers value)3769 public Builder mergeRouteModifiers(com.google.maps.routing.v2.RouteModifiers value) { 3770 if (routeModifiersBuilder_ == null) { 3771 if (((bitField0_ & 0x00000200) != 0) 3772 && routeModifiers_ != null 3773 && routeModifiers_ != com.google.maps.routing.v2.RouteModifiers.getDefaultInstance()) { 3774 getRouteModifiersBuilder().mergeFrom(value); 3775 } else { 3776 routeModifiers_ = value; 3777 } 3778 } else { 3779 routeModifiersBuilder_.mergeFrom(value); 3780 } 3781 bitField0_ |= 0x00000200; 3782 onChanged(); 3783 return this; 3784 } 3785 /** 3786 * 3787 * 3788 * <pre> 3789 * Optional. A set of conditions to satisfy that affect the way routes are 3790 * calculated. 3791 * </pre> 3792 * 3793 * <code> 3794 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3795 * </code> 3796 */ clearRouteModifiers()3797 public Builder clearRouteModifiers() { 3798 bitField0_ = (bitField0_ & ~0x00000200); 3799 routeModifiers_ = null; 3800 if (routeModifiersBuilder_ != null) { 3801 routeModifiersBuilder_.dispose(); 3802 routeModifiersBuilder_ = null; 3803 } 3804 onChanged(); 3805 return this; 3806 } 3807 /** 3808 * 3809 * 3810 * <pre> 3811 * Optional. A set of conditions to satisfy that affect the way routes are 3812 * calculated. 3813 * </pre> 3814 * 3815 * <code> 3816 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3817 * </code> 3818 */ getRouteModifiersBuilder()3819 public com.google.maps.routing.v2.RouteModifiers.Builder getRouteModifiersBuilder() { 3820 bitField0_ |= 0x00000200; 3821 onChanged(); 3822 return getRouteModifiersFieldBuilder().getBuilder(); 3823 } 3824 /** 3825 * 3826 * 3827 * <pre> 3828 * Optional. A set of conditions to satisfy that affect the way routes are 3829 * calculated. 3830 * </pre> 3831 * 3832 * <code> 3833 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3834 * </code> 3835 */ getRouteModifiersOrBuilder()3836 public com.google.maps.routing.v2.RouteModifiersOrBuilder getRouteModifiersOrBuilder() { 3837 if (routeModifiersBuilder_ != null) { 3838 return routeModifiersBuilder_.getMessageOrBuilder(); 3839 } else { 3840 return routeModifiers_ == null 3841 ? com.google.maps.routing.v2.RouteModifiers.getDefaultInstance() 3842 : routeModifiers_; 3843 } 3844 } 3845 /** 3846 * 3847 * 3848 * <pre> 3849 * Optional. A set of conditions to satisfy that affect the way routes are 3850 * calculated. 3851 * </pre> 3852 * 3853 * <code> 3854 * .google.maps.routing.v2.RouteModifiers route_modifiers = 9 [(.google.api.field_behavior) = OPTIONAL]; 3855 * </code> 3856 */ 3857 private com.google.protobuf.SingleFieldBuilderV3< 3858 com.google.maps.routing.v2.RouteModifiers, 3859 com.google.maps.routing.v2.RouteModifiers.Builder, 3860 com.google.maps.routing.v2.RouteModifiersOrBuilder> getRouteModifiersFieldBuilder()3861 getRouteModifiersFieldBuilder() { 3862 if (routeModifiersBuilder_ == null) { 3863 routeModifiersBuilder_ = 3864 new com.google.protobuf.SingleFieldBuilderV3< 3865 com.google.maps.routing.v2.RouteModifiers, 3866 com.google.maps.routing.v2.RouteModifiers.Builder, 3867 com.google.maps.routing.v2.RouteModifiersOrBuilder>( 3868 getRouteModifiers(), getParentForChildren(), isClean()); 3869 routeModifiers_ = null; 3870 } 3871 return routeModifiersBuilder_; 3872 } 3873 3874 private java.lang.Object languageCode_ = ""; 3875 /** 3876 * 3877 * 3878 * <pre> 3879 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 3880 * information, see 3881 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 3882 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 3883 * for the list of supported languages. When you don't provide this value, the 3884 * display language is inferred from the location of the route request. 3885 * </pre> 3886 * 3887 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 3888 * 3889 * @return The languageCode. 3890 */ getLanguageCode()3891 public java.lang.String getLanguageCode() { 3892 java.lang.Object ref = languageCode_; 3893 if (!(ref instanceof java.lang.String)) { 3894 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3895 java.lang.String s = bs.toStringUtf8(); 3896 languageCode_ = s; 3897 return s; 3898 } else { 3899 return (java.lang.String) ref; 3900 } 3901 } 3902 /** 3903 * 3904 * 3905 * <pre> 3906 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 3907 * information, see 3908 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 3909 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 3910 * for the list of supported languages. When you don't provide this value, the 3911 * display language is inferred from the location of the route request. 3912 * </pre> 3913 * 3914 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 3915 * 3916 * @return The bytes for languageCode. 3917 */ getLanguageCodeBytes()3918 public com.google.protobuf.ByteString getLanguageCodeBytes() { 3919 java.lang.Object ref = languageCode_; 3920 if (ref instanceof String) { 3921 com.google.protobuf.ByteString b = 3922 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3923 languageCode_ = b; 3924 return b; 3925 } else { 3926 return (com.google.protobuf.ByteString) ref; 3927 } 3928 } 3929 /** 3930 * 3931 * 3932 * <pre> 3933 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 3934 * information, see 3935 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 3936 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 3937 * for the list of supported languages. When you don't provide this value, the 3938 * display language is inferred from the location of the route request. 3939 * </pre> 3940 * 3941 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 3942 * 3943 * @param value The languageCode to set. 3944 * @return This builder for chaining. 3945 */ setLanguageCode(java.lang.String value)3946 public Builder setLanguageCode(java.lang.String value) { 3947 if (value == null) { 3948 throw new NullPointerException(); 3949 } 3950 languageCode_ = value; 3951 bitField0_ |= 0x00000400; 3952 onChanged(); 3953 return this; 3954 } 3955 /** 3956 * 3957 * 3958 * <pre> 3959 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 3960 * information, see 3961 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 3962 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 3963 * for the list of supported languages. When you don't provide this value, the 3964 * display language is inferred from the location of the route request. 3965 * </pre> 3966 * 3967 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 3968 * 3969 * @return This builder for chaining. 3970 */ clearLanguageCode()3971 public Builder clearLanguageCode() { 3972 languageCode_ = getDefaultInstance().getLanguageCode(); 3973 bitField0_ = (bitField0_ & ~0x00000400); 3974 onChanged(); 3975 return this; 3976 } 3977 /** 3978 * 3979 * 3980 * <pre> 3981 * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more 3982 * information, see 3983 * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See 3984 * [Language Support](https://developers.google.com/maps/faq#languagesupport) 3985 * for the list of supported languages. When you don't provide this value, the 3986 * display language is inferred from the location of the route request. 3987 * </pre> 3988 * 3989 * <code>string language_code = 10 [(.google.api.field_behavior) = OPTIONAL];</code> 3990 * 3991 * @param value The bytes for languageCode to set. 3992 * @return This builder for chaining. 3993 */ setLanguageCodeBytes(com.google.protobuf.ByteString value)3994 public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { 3995 if (value == null) { 3996 throw new NullPointerException(); 3997 } 3998 checkByteStringIsUtf8(value); 3999 languageCode_ = value; 4000 bitField0_ |= 0x00000400; 4001 onChanged(); 4002 return this; 4003 } 4004 4005 private java.lang.Object regionCode_ = ""; 4006 /** 4007 * 4008 * 4009 * <pre> 4010 * Optional. The region code, specified as a ccTLD ("top-level domain") 4011 * two-character value. For more information see 4012 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 4013 * </pre> 4014 * 4015 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 4016 * 4017 * @return The regionCode. 4018 */ getRegionCode()4019 public java.lang.String getRegionCode() { 4020 java.lang.Object ref = regionCode_; 4021 if (!(ref instanceof java.lang.String)) { 4022 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 4023 java.lang.String s = bs.toStringUtf8(); 4024 regionCode_ = s; 4025 return s; 4026 } else { 4027 return (java.lang.String) ref; 4028 } 4029 } 4030 /** 4031 * 4032 * 4033 * <pre> 4034 * Optional. The region code, specified as a ccTLD ("top-level domain") 4035 * two-character value. For more information see 4036 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 4037 * </pre> 4038 * 4039 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 4040 * 4041 * @return The bytes for regionCode. 4042 */ getRegionCodeBytes()4043 public com.google.protobuf.ByteString getRegionCodeBytes() { 4044 java.lang.Object ref = regionCode_; 4045 if (ref instanceof String) { 4046 com.google.protobuf.ByteString b = 4047 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 4048 regionCode_ = b; 4049 return b; 4050 } else { 4051 return (com.google.protobuf.ByteString) ref; 4052 } 4053 } 4054 /** 4055 * 4056 * 4057 * <pre> 4058 * Optional. The region code, specified as a ccTLD ("top-level domain") 4059 * two-character value. For more information see 4060 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 4061 * </pre> 4062 * 4063 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 4064 * 4065 * @param value The regionCode to set. 4066 * @return This builder for chaining. 4067 */ setRegionCode(java.lang.String value)4068 public Builder setRegionCode(java.lang.String value) { 4069 if (value == null) { 4070 throw new NullPointerException(); 4071 } 4072 regionCode_ = value; 4073 bitField0_ |= 0x00000800; 4074 onChanged(); 4075 return this; 4076 } 4077 /** 4078 * 4079 * 4080 * <pre> 4081 * Optional. The region code, specified as a ccTLD ("top-level domain") 4082 * two-character value. For more information see 4083 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 4084 * </pre> 4085 * 4086 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 4087 * 4088 * @return This builder for chaining. 4089 */ clearRegionCode()4090 public Builder clearRegionCode() { 4091 regionCode_ = getDefaultInstance().getRegionCode(); 4092 bitField0_ = (bitField0_ & ~0x00000800); 4093 onChanged(); 4094 return this; 4095 } 4096 /** 4097 * 4098 * 4099 * <pre> 4100 * Optional. The region code, specified as a ccTLD ("top-level domain") 4101 * two-character value. For more information see 4102 * https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains 4103 * </pre> 4104 * 4105 * <code>string region_code = 16 [(.google.api.field_behavior) = OPTIONAL];</code> 4106 * 4107 * @param value The bytes for regionCode to set. 4108 * @return This builder for chaining. 4109 */ setRegionCodeBytes(com.google.protobuf.ByteString value)4110 public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { 4111 if (value == null) { 4112 throw new NullPointerException(); 4113 } 4114 checkByteStringIsUtf8(value); 4115 regionCode_ = value; 4116 bitField0_ |= 0x00000800; 4117 onChanged(); 4118 return this; 4119 } 4120 4121 private int units_ = 0; 4122 /** 4123 * 4124 * 4125 * <pre> 4126 * Optional. Specifies the units of measure for the display fields. This 4127 * includes the `instruction` field in 4128 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 4129 * units of measure used for the route, leg, step distance, and duration are 4130 * not affected by this value. If you don't provide this value, then the 4131 * display units are inferred from the location of the request. 4132 * </pre> 4133 * 4134 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 4135 * </code> 4136 * 4137 * @return The enum numeric value on the wire for units. 4138 */ 4139 @java.lang.Override getUnitsValue()4140 public int getUnitsValue() { 4141 return units_; 4142 } 4143 /** 4144 * 4145 * 4146 * <pre> 4147 * Optional. Specifies the units of measure for the display fields. This 4148 * includes the `instruction` field in 4149 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 4150 * units of measure used for the route, leg, step distance, and duration are 4151 * not affected by this value. If you don't provide this value, then the 4152 * display units are inferred from the location of the request. 4153 * </pre> 4154 * 4155 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 4156 * </code> 4157 * 4158 * @param value The enum numeric value on the wire for units to set. 4159 * @return This builder for chaining. 4160 */ setUnitsValue(int value)4161 public Builder setUnitsValue(int value) { 4162 units_ = value; 4163 bitField0_ |= 0x00001000; 4164 onChanged(); 4165 return this; 4166 } 4167 /** 4168 * 4169 * 4170 * <pre> 4171 * Optional. Specifies the units of measure for the display fields. This 4172 * includes the `instruction` field in 4173 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 4174 * units of measure used for the route, leg, step distance, and duration are 4175 * not affected by this value. If you don't provide this value, then the 4176 * display units are inferred from the location of the request. 4177 * </pre> 4178 * 4179 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 4180 * </code> 4181 * 4182 * @return The units. 4183 */ 4184 @java.lang.Override getUnits()4185 public com.google.maps.routing.v2.Units getUnits() { 4186 com.google.maps.routing.v2.Units result = com.google.maps.routing.v2.Units.forNumber(units_); 4187 return result == null ? com.google.maps.routing.v2.Units.UNRECOGNIZED : result; 4188 } 4189 /** 4190 * 4191 * 4192 * <pre> 4193 * Optional. Specifies the units of measure for the display fields. This 4194 * includes the `instruction` field in 4195 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 4196 * units of measure used for the route, leg, step distance, and duration are 4197 * not affected by this value. If you don't provide this value, then the 4198 * display units are inferred from the location of the request. 4199 * </pre> 4200 * 4201 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 4202 * </code> 4203 * 4204 * @param value The units to set. 4205 * @return This builder for chaining. 4206 */ setUnits(com.google.maps.routing.v2.Units value)4207 public Builder setUnits(com.google.maps.routing.v2.Units value) { 4208 if (value == null) { 4209 throw new NullPointerException(); 4210 } 4211 bitField0_ |= 0x00001000; 4212 units_ = value.getNumber(); 4213 onChanged(); 4214 return this; 4215 } 4216 /** 4217 * 4218 * 4219 * <pre> 4220 * Optional. Specifies the units of measure for the display fields. This 4221 * includes the `instruction` field in 4222 * [NavigationInstruction][google.maps.routing.v2.NavigationInstruction]. The 4223 * units of measure used for the route, leg, step distance, and duration are 4224 * not affected by this value. If you don't provide this value, then the 4225 * display units are inferred from the location of the request. 4226 * </pre> 4227 * 4228 * <code>.google.maps.routing.v2.Units units = 11 [(.google.api.field_behavior) = OPTIONAL]; 4229 * </code> 4230 * 4231 * @return This builder for chaining. 4232 */ clearUnits()4233 public Builder clearUnits() { 4234 bitField0_ = (bitField0_ & ~0x00001000); 4235 units_ = 0; 4236 onChanged(); 4237 return this; 4238 } 4239 4240 private java.util.List<java.lang.Integer> requestedReferenceRoutes_ = 4241 java.util.Collections.emptyList(); 4242 ensureRequestedReferenceRoutesIsMutable()4243 private void ensureRequestedReferenceRoutesIsMutable() { 4244 if (!((bitField0_ & 0x00002000) != 0)) { 4245 requestedReferenceRoutes_ = 4246 new java.util.ArrayList<java.lang.Integer>(requestedReferenceRoutes_); 4247 bitField0_ |= 0x00002000; 4248 } 4249 } 4250 /** 4251 * 4252 * 4253 * <pre> 4254 * Optional. Specifies what reference routes to calculate as part of the 4255 * request in addition to the default route. A reference route is a route with 4256 * a different route calculation objective than the default route. For example 4257 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4258 * parameters that would generate an optimal fuel efficient route. 4259 * </pre> 4260 * 4261 * <code> 4262 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4263 * </code> 4264 * 4265 * @return A list containing the requestedReferenceRoutes. 4266 */ 4267 public java.util.List<com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute> getRequestedReferenceRoutesList()4268 getRequestedReferenceRoutesList() { 4269 return new com.google.protobuf.Internal.ListAdapter< 4270 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute>( 4271 requestedReferenceRoutes_, requestedReferenceRoutes_converter_); 4272 } 4273 /** 4274 * 4275 * 4276 * <pre> 4277 * Optional. Specifies what reference routes to calculate as part of the 4278 * request in addition to the default route. A reference route is a route with 4279 * a different route calculation objective than the default route. For example 4280 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4281 * parameters that would generate an optimal fuel efficient route. 4282 * </pre> 4283 * 4284 * <code> 4285 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4286 * </code> 4287 * 4288 * @return The count of requestedReferenceRoutes. 4289 */ getRequestedReferenceRoutesCount()4290 public int getRequestedReferenceRoutesCount() { 4291 return requestedReferenceRoutes_.size(); 4292 } 4293 /** 4294 * 4295 * 4296 * <pre> 4297 * Optional. Specifies what reference routes to calculate as part of the 4298 * request in addition to the default route. A reference route is a route with 4299 * a different route calculation objective than the default route. For example 4300 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4301 * parameters that would generate an optimal fuel efficient route. 4302 * </pre> 4303 * 4304 * <code> 4305 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4306 * </code> 4307 * 4308 * @param index The index of the element to return. 4309 * @return The requestedReferenceRoutes at the given index. 4310 */ 4311 public com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute getRequestedReferenceRoutes(int index)4312 getRequestedReferenceRoutes(int index) { 4313 return requestedReferenceRoutes_converter_.convert(requestedReferenceRoutes_.get(index)); 4314 } 4315 /** 4316 * 4317 * 4318 * <pre> 4319 * Optional. Specifies what reference routes to calculate as part of the 4320 * request in addition to the default route. A reference route is a route with 4321 * a different route calculation objective than the default route. For example 4322 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4323 * parameters that would generate an optimal fuel efficient route. 4324 * </pre> 4325 * 4326 * <code> 4327 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4328 * </code> 4329 * 4330 * @param index The index to set the value at. 4331 * @param value The requestedReferenceRoutes to set. 4332 * @return This builder for chaining. 4333 */ setRequestedReferenceRoutes( int index, com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute value)4334 public Builder setRequestedReferenceRoutes( 4335 int index, com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute value) { 4336 if (value == null) { 4337 throw new NullPointerException(); 4338 } 4339 ensureRequestedReferenceRoutesIsMutable(); 4340 requestedReferenceRoutes_.set(index, value.getNumber()); 4341 onChanged(); 4342 return this; 4343 } 4344 /** 4345 * 4346 * 4347 * <pre> 4348 * Optional. Specifies what reference routes to calculate as part of the 4349 * request in addition to the default route. A reference route is a route with 4350 * a different route calculation objective than the default route. For example 4351 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4352 * parameters that would generate an optimal fuel efficient route. 4353 * </pre> 4354 * 4355 * <code> 4356 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4357 * </code> 4358 * 4359 * @param value The requestedReferenceRoutes to add. 4360 * @return This builder for chaining. 4361 */ addRequestedReferenceRoutes( com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute value)4362 public Builder addRequestedReferenceRoutes( 4363 com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute value) { 4364 if (value == null) { 4365 throw new NullPointerException(); 4366 } 4367 ensureRequestedReferenceRoutesIsMutable(); 4368 requestedReferenceRoutes_.add(value.getNumber()); 4369 onChanged(); 4370 return this; 4371 } 4372 /** 4373 * 4374 * 4375 * <pre> 4376 * Optional. Specifies what reference routes to calculate as part of the 4377 * request in addition to the default route. A reference route is a route with 4378 * a different route calculation objective than the default route. For example 4379 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4380 * parameters that would generate an optimal fuel efficient route. 4381 * </pre> 4382 * 4383 * <code> 4384 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4385 * </code> 4386 * 4387 * @param values The requestedReferenceRoutes to add. 4388 * @return This builder for chaining. 4389 */ addAllRequestedReferenceRoutes( java.lang.Iterable<? extends com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute> values)4390 public Builder addAllRequestedReferenceRoutes( 4391 java.lang.Iterable<? extends com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute> 4392 values) { 4393 ensureRequestedReferenceRoutesIsMutable(); 4394 for (com.google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute value : values) { 4395 requestedReferenceRoutes_.add(value.getNumber()); 4396 } 4397 onChanged(); 4398 return this; 4399 } 4400 /** 4401 * 4402 * 4403 * <pre> 4404 * Optional. Specifies what reference routes to calculate as part of the 4405 * request in addition to the default route. A reference route is a route with 4406 * a different route calculation objective than the default route. For example 4407 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4408 * parameters that would generate an optimal fuel efficient route. 4409 * </pre> 4410 * 4411 * <code> 4412 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4413 * </code> 4414 * 4415 * @return This builder for chaining. 4416 */ clearRequestedReferenceRoutes()4417 public Builder clearRequestedReferenceRoutes() { 4418 requestedReferenceRoutes_ = java.util.Collections.emptyList(); 4419 bitField0_ = (bitField0_ & ~0x00002000); 4420 onChanged(); 4421 return this; 4422 } 4423 /** 4424 * 4425 * 4426 * <pre> 4427 * Optional. Specifies what reference routes to calculate as part of the 4428 * request in addition to the default route. A reference route is a route with 4429 * a different route calculation objective than the default route. For example 4430 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4431 * parameters that would generate an optimal fuel efficient route. 4432 * </pre> 4433 * 4434 * <code> 4435 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4436 * </code> 4437 * 4438 * @return A list containing the enum numeric values on the wire for requestedReferenceRoutes. 4439 */ getRequestedReferenceRoutesValueList()4440 public java.util.List<java.lang.Integer> getRequestedReferenceRoutesValueList() { 4441 return java.util.Collections.unmodifiableList(requestedReferenceRoutes_); 4442 } 4443 /** 4444 * 4445 * 4446 * <pre> 4447 * Optional. Specifies what reference routes to calculate as part of the 4448 * request in addition to the default route. A reference route is a route with 4449 * a different route calculation objective than the default route. For example 4450 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4451 * parameters that would generate an optimal fuel efficient route. 4452 * </pre> 4453 * 4454 * <code> 4455 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4456 * </code> 4457 * 4458 * @param index The index of the value to return. 4459 * @return The enum numeric value on the wire of requestedReferenceRoutes at the given index. 4460 */ getRequestedReferenceRoutesValue(int index)4461 public int getRequestedReferenceRoutesValue(int index) { 4462 return requestedReferenceRoutes_.get(index); 4463 } 4464 /** 4465 * 4466 * 4467 * <pre> 4468 * Optional. Specifies what reference routes to calculate as part of the 4469 * request in addition to the default route. A reference route is a route with 4470 * a different route calculation objective than the default route. For example 4471 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4472 * parameters that would generate an optimal fuel efficient route. 4473 * </pre> 4474 * 4475 * <code> 4476 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4477 * </code> 4478 * 4479 * @param index The index to set the value at. 4480 * @param value The enum numeric value on the wire for requestedReferenceRoutes to set. 4481 * @return This builder for chaining. 4482 */ setRequestedReferenceRoutesValue(int index, int value)4483 public Builder setRequestedReferenceRoutesValue(int index, int value) { 4484 ensureRequestedReferenceRoutesIsMutable(); 4485 requestedReferenceRoutes_.set(index, value); 4486 onChanged(); 4487 return this; 4488 } 4489 /** 4490 * 4491 * 4492 * <pre> 4493 * Optional. Specifies what reference routes to calculate as part of the 4494 * request in addition to the default route. A reference route is a route with 4495 * a different route calculation objective than the default route. For example 4496 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4497 * parameters that would generate an optimal fuel efficient route. 4498 * </pre> 4499 * 4500 * <code> 4501 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4502 * </code> 4503 * 4504 * @param value The enum numeric value on the wire for requestedReferenceRoutes to add. 4505 * @return This builder for chaining. 4506 */ addRequestedReferenceRoutesValue(int value)4507 public Builder addRequestedReferenceRoutesValue(int value) { 4508 ensureRequestedReferenceRoutesIsMutable(); 4509 requestedReferenceRoutes_.add(value); 4510 onChanged(); 4511 return this; 4512 } 4513 /** 4514 * 4515 * 4516 * <pre> 4517 * Optional. Specifies what reference routes to calculate as part of the 4518 * request in addition to the default route. A reference route is a route with 4519 * a different route calculation objective than the default route. For example 4520 * a `FUEL_EFFICIENT` reference route calculation takes into account various 4521 * parameters that would generate an optimal fuel efficient route. 4522 * </pre> 4523 * 4524 * <code> 4525 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ReferenceRoute requested_reference_routes = 14 [(.google.api.field_behavior) = OPTIONAL]; 4526 * </code> 4527 * 4528 * @param values The enum numeric values on the wire for requestedReferenceRoutes to add. 4529 * @return This builder for chaining. 4530 */ addAllRequestedReferenceRoutesValue( java.lang.Iterable<java.lang.Integer> values)4531 public Builder addAllRequestedReferenceRoutesValue( 4532 java.lang.Iterable<java.lang.Integer> values) { 4533 ensureRequestedReferenceRoutesIsMutable(); 4534 for (int value : values) { 4535 requestedReferenceRoutes_.add(value); 4536 } 4537 onChanged(); 4538 return this; 4539 } 4540 4541 private java.util.List<java.lang.Integer> extraComputations_ = 4542 java.util.Collections.emptyList(); 4543 ensureExtraComputationsIsMutable()4544 private void ensureExtraComputationsIsMutable() { 4545 if (!((bitField0_ & 0x00004000) != 0)) { 4546 extraComputations_ = new java.util.ArrayList<java.lang.Integer>(extraComputations_); 4547 bitField0_ |= 0x00004000; 4548 } 4549 } 4550 /** 4551 * 4552 * 4553 * <pre> 4554 * Optional. A list of extra computations which may be used to complete the 4555 * request. Note: These extra computations may return extra fields on the 4556 * response. These extra fields must also be specified in the field mask to be 4557 * returned in the response. 4558 * </pre> 4559 * 4560 * <code> 4561 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4562 * </code> 4563 * 4564 * @return A list containing the extraComputations. 4565 */ 4566 public java.util.List<com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation> getExtraComputationsList()4567 getExtraComputationsList() { 4568 return new com.google.protobuf.Internal.ListAdapter< 4569 java.lang.Integer, com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation>( 4570 extraComputations_, extraComputations_converter_); 4571 } 4572 /** 4573 * 4574 * 4575 * <pre> 4576 * Optional. A list of extra computations which may be used to complete the 4577 * request. Note: These extra computations may return extra fields on the 4578 * response. These extra fields must also be specified in the field mask to be 4579 * returned in the response. 4580 * </pre> 4581 * 4582 * <code> 4583 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4584 * </code> 4585 * 4586 * @return The count of extraComputations. 4587 */ getExtraComputationsCount()4588 public int getExtraComputationsCount() { 4589 return extraComputations_.size(); 4590 } 4591 /** 4592 * 4593 * 4594 * <pre> 4595 * Optional. A list of extra computations which may be used to complete the 4596 * request. Note: These extra computations may return extra fields on the 4597 * response. These extra fields must also be specified in the field mask to be 4598 * returned in the response. 4599 * </pre> 4600 * 4601 * <code> 4602 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4603 * </code> 4604 * 4605 * @param index The index of the element to return. 4606 * @return The extraComputations at the given index. 4607 */ getExtraComputations( int index)4608 public com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation getExtraComputations( 4609 int index) { 4610 return extraComputations_converter_.convert(extraComputations_.get(index)); 4611 } 4612 /** 4613 * 4614 * 4615 * <pre> 4616 * Optional. A list of extra computations which may be used to complete the 4617 * request. Note: These extra computations may return extra fields on the 4618 * response. These extra fields must also be specified in the field mask to be 4619 * returned in the response. 4620 * </pre> 4621 * 4622 * <code> 4623 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4624 * </code> 4625 * 4626 * @param index The index to set the value at. 4627 * @param value The extraComputations to set. 4628 * @return This builder for chaining. 4629 */ setExtraComputations( int index, com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation value)4630 public Builder setExtraComputations( 4631 int index, com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation value) { 4632 if (value == null) { 4633 throw new NullPointerException(); 4634 } 4635 ensureExtraComputationsIsMutable(); 4636 extraComputations_.set(index, value.getNumber()); 4637 onChanged(); 4638 return this; 4639 } 4640 /** 4641 * 4642 * 4643 * <pre> 4644 * Optional. A list of extra computations which may be used to complete the 4645 * request. Note: These extra computations may return extra fields on the 4646 * response. These extra fields must also be specified in the field mask to be 4647 * returned in the response. 4648 * </pre> 4649 * 4650 * <code> 4651 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4652 * </code> 4653 * 4654 * @param value The extraComputations to add. 4655 * @return This builder for chaining. 4656 */ addExtraComputations( com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation value)4657 public Builder addExtraComputations( 4658 com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation value) { 4659 if (value == null) { 4660 throw new NullPointerException(); 4661 } 4662 ensureExtraComputationsIsMutable(); 4663 extraComputations_.add(value.getNumber()); 4664 onChanged(); 4665 return this; 4666 } 4667 /** 4668 * 4669 * 4670 * <pre> 4671 * Optional. A list of extra computations which may be used to complete the 4672 * request. Note: These extra computations may return extra fields on the 4673 * response. These extra fields must also be specified in the field mask to be 4674 * returned in the response. 4675 * </pre> 4676 * 4677 * <code> 4678 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4679 * </code> 4680 * 4681 * @param values The extraComputations to add. 4682 * @return This builder for chaining. 4683 */ addAllExtraComputations( java.lang.Iterable< ? extends com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation> values)4684 public Builder addAllExtraComputations( 4685 java.lang.Iterable< 4686 ? extends com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation> 4687 values) { 4688 ensureExtraComputationsIsMutable(); 4689 for (com.google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation value : values) { 4690 extraComputations_.add(value.getNumber()); 4691 } 4692 onChanged(); 4693 return this; 4694 } 4695 /** 4696 * 4697 * 4698 * <pre> 4699 * Optional. A list of extra computations which may be used to complete the 4700 * request. Note: These extra computations may return extra fields on the 4701 * response. These extra fields must also be specified in the field mask to be 4702 * returned in the response. 4703 * </pre> 4704 * 4705 * <code> 4706 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4707 * </code> 4708 * 4709 * @return This builder for chaining. 4710 */ clearExtraComputations()4711 public Builder clearExtraComputations() { 4712 extraComputations_ = java.util.Collections.emptyList(); 4713 bitField0_ = (bitField0_ & ~0x00004000); 4714 onChanged(); 4715 return this; 4716 } 4717 /** 4718 * 4719 * 4720 * <pre> 4721 * Optional. A list of extra computations which may be used to complete the 4722 * request. Note: These extra computations may return extra fields on the 4723 * response. These extra fields must also be specified in the field mask to be 4724 * returned in the response. 4725 * </pre> 4726 * 4727 * <code> 4728 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4729 * </code> 4730 * 4731 * @return A list containing the enum numeric values on the wire for extraComputations. 4732 */ getExtraComputationsValueList()4733 public java.util.List<java.lang.Integer> getExtraComputationsValueList() { 4734 return java.util.Collections.unmodifiableList(extraComputations_); 4735 } 4736 /** 4737 * 4738 * 4739 * <pre> 4740 * Optional. A list of extra computations which may be used to complete the 4741 * request. Note: These extra computations may return extra fields on the 4742 * response. These extra fields must also be specified in the field mask to be 4743 * returned in the response. 4744 * </pre> 4745 * 4746 * <code> 4747 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4748 * </code> 4749 * 4750 * @param index The index of the value to return. 4751 * @return The enum numeric value on the wire of extraComputations at the given index. 4752 */ getExtraComputationsValue(int index)4753 public int getExtraComputationsValue(int index) { 4754 return extraComputations_.get(index); 4755 } 4756 /** 4757 * 4758 * 4759 * <pre> 4760 * Optional. A list of extra computations which may be used to complete the 4761 * request. Note: These extra computations may return extra fields on the 4762 * response. These extra fields must also be specified in the field mask to be 4763 * returned in the response. 4764 * </pre> 4765 * 4766 * <code> 4767 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4768 * </code> 4769 * 4770 * @param index The index to set the value at. 4771 * @param value The enum numeric value on the wire for extraComputations to set. 4772 * @return This builder for chaining. 4773 */ setExtraComputationsValue(int index, int value)4774 public Builder setExtraComputationsValue(int index, int value) { 4775 ensureExtraComputationsIsMutable(); 4776 extraComputations_.set(index, value); 4777 onChanged(); 4778 return this; 4779 } 4780 /** 4781 * 4782 * 4783 * <pre> 4784 * Optional. A list of extra computations which may be used to complete the 4785 * request. Note: These extra computations may return extra fields on the 4786 * response. These extra fields must also be specified in the field mask to be 4787 * returned in the response. 4788 * </pre> 4789 * 4790 * <code> 4791 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4792 * </code> 4793 * 4794 * @param value The enum numeric value on the wire for extraComputations to add. 4795 * @return This builder for chaining. 4796 */ addExtraComputationsValue(int value)4797 public Builder addExtraComputationsValue(int value) { 4798 ensureExtraComputationsIsMutable(); 4799 extraComputations_.add(value); 4800 onChanged(); 4801 return this; 4802 } 4803 /** 4804 * 4805 * 4806 * <pre> 4807 * Optional. A list of extra computations which may be used to complete the 4808 * request. Note: These extra computations may return extra fields on the 4809 * response. These extra fields must also be specified in the field mask to be 4810 * returned in the response. 4811 * </pre> 4812 * 4813 * <code> 4814 * repeated .google.maps.routing.v2.ComputeRoutesRequest.ExtraComputation extra_computations = 15 [(.google.api.field_behavior) = OPTIONAL]; 4815 * </code> 4816 * 4817 * @param values The enum numeric values on the wire for extraComputations to add. 4818 * @return This builder for chaining. 4819 */ addAllExtraComputationsValue(java.lang.Iterable<java.lang.Integer> values)4820 public Builder addAllExtraComputationsValue(java.lang.Iterable<java.lang.Integer> values) { 4821 ensureExtraComputationsIsMutable(); 4822 for (int value : values) { 4823 extraComputations_.add(value); 4824 } 4825 onChanged(); 4826 return this; 4827 } 4828 4829 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4830 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 4831 return super.setUnknownFields(unknownFields); 4832 } 4833 4834 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4835 public final Builder mergeUnknownFields( 4836 final com.google.protobuf.UnknownFieldSet unknownFields) { 4837 return super.mergeUnknownFields(unknownFields); 4838 } 4839 4840 // @@protoc_insertion_point(builder_scope:google.maps.routing.v2.ComputeRoutesRequest) 4841 } 4842 4843 // @@protoc_insertion_point(class_scope:google.maps.routing.v2.ComputeRoutesRequest) 4844 private static final com.google.maps.routing.v2.ComputeRoutesRequest DEFAULT_INSTANCE; 4845 4846 static { 4847 DEFAULT_INSTANCE = new com.google.maps.routing.v2.ComputeRoutesRequest(); 4848 } 4849 getDefaultInstance()4850 public static com.google.maps.routing.v2.ComputeRoutesRequest getDefaultInstance() { 4851 return DEFAULT_INSTANCE; 4852 } 4853 4854 private static final com.google.protobuf.Parser<ComputeRoutesRequest> PARSER = 4855 new com.google.protobuf.AbstractParser<ComputeRoutesRequest>() { 4856 @java.lang.Override 4857 public ComputeRoutesRequest parsePartialFrom( 4858 com.google.protobuf.CodedInputStream input, 4859 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4860 throws com.google.protobuf.InvalidProtocolBufferException { 4861 Builder builder = newBuilder(); 4862 try { 4863 builder.mergeFrom(input, extensionRegistry); 4864 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4865 throw e.setUnfinishedMessage(builder.buildPartial()); 4866 } catch (com.google.protobuf.UninitializedMessageException e) { 4867 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 4868 } catch (java.io.IOException e) { 4869 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4870 .setUnfinishedMessage(builder.buildPartial()); 4871 } 4872 return builder.buildPartial(); 4873 } 4874 }; 4875 parser()4876 public static com.google.protobuf.Parser<ComputeRoutesRequest> parser() { 4877 return PARSER; 4878 } 4879 4880 @java.lang.Override getParserForType()4881 public com.google.protobuf.Parser<ComputeRoutesRequest> getParserForType() { 4882 return PARSER; 4883 } 4884 4885 @java.lang.Override getDefaultInstanceForType()4886 public com.google.maps.routing.v2.ComputeRoutesRequest getDefaultInstanceForType() { 4887 return DEFAULT_INSTANCE; 4888 } 4889 } 4890