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/cloud/talent/v4beta1/common.proto 18 19 package com.google.cloud.talent.v4beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * A resource that represents a location with full geographic information. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.talent.v4beta1.Location} 29 */ 30 public final class Location extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.talent.v4beta1.Location) 33 LocationOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Location.newBuilder() to construct. Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Location(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Location()40 private Location() { 41 locationType_ = 0; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new Location(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.talent.v4beta1.CommonProto 57 .internal_static_google_cloud_talent_v4beta1_Location_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.talent.v4beta1.CommonProto 64 .internal_static_google_cloud_talent_v4beta1_Location_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.talent.v4beta1.Location.class, 67 com.google.cloud.talent.v4beta1.Location.Builder.class); 68 } 69 70 /** 71 * 72 * 73 * <pre> 74 * An enum which represents the type of a location. 75 * </pre> 76 * 77 * Protobuf enum {@code google.cloud.talent.v4beta1.Location.LocationType} 78 */ 79 public enum LocationType implements com.google.protobuf.ProtocolMessageEnum { 80 /** 81 * 82 * 83 * <pre> 84 * Default value if the type isn't specified. 85 * </pre> 86 * 87 * <code>LOCATION_TYPE_UNSPECIFIED = 0;</code> 88 */ 89 LOCATION_TYPE_UNSPECIFIED(0), 90 /** 91 * 92 * 93 * <pre> 94 * A country level location. 95 * </pre> 96 * 97 * <code>COUNTRY = 1;</code> 98 */ 99 COUNTRY(1), 100 /** 101 * 102 * 103 * <pre> 104 * A state or equivalent level location. 105 * </pre> 106 * 107 * <code>ADMINISTRATIVE_AREA = 2;</code> 108 */ 109 ADMINISTRATIVE_AREA(2), 110 /** 111 * 112 * 113 * <pre> 114 * A county or equivalent level location. 115 * </pre> 116 * 117 * <code>SUB_ADMINISTRATIVE_AREA = 3;</code> 118 */ 119 SUB_ADMINISTRATIVE_AREA(3), 120 /** 121 * 122 * 123 * <pre> 124 * A city or equivalent level location. 125 * </pre> 126 * 127 * <code>LOCALITY = 4;</code> 128 */ 129 LOCALITY(4), 130 /** 131 * 132 * 133 * <pre> 134 * A postal code level location. 135 * </pre> 136 * 137 * <code>POSTAL_CODE = 5;</code> 138 */ 139 POSTAL_CODE(5), 140 /** 141 * 142 * 143 * <pre> 144 * A sublocality is a subdivision of a locality, for example a city borough, 145 * ward, or arrondissement. Sublocalities are usually recognized by a local 146 * political authority. For example, Manhattan and Brooklyn are recognized 147 * as boroughs by the City of New York, and are therefore modeled as 148 * sublocalities. 149 * </pre> 150 * 151 * <code>SUB_LOCALITY = 6;</code> 152 */ 153 SUB_LOCALITY(6), 154 /** 155 * 156 * 157 * <pre> 158 * A district or equivalent level location. 159 * </pre> 160 * 161 * <code>SUB_LOCALITY_1 = 7;</code> 162 */ 163 SUB_LOCALITY_1(7), 164 /** 165 * 166 * 167 * <pre> 168 * A smaller district or equivalent level display. 169 * </pre> 170 * 171 * <code>SUB_LOCALITY_2 = 8;</code> 172 */ 173 SUB_LOCALITY_2(8), 174 /** 175 * 176 * 177 * <pre> 178 * A neighborhood level location. 179 * </pre> 180 * 181 * <code>NEIGHBORHOOD = 9;</code> 182 */ 183 NEIGHBORHOOD(9), 184 /** 185 * 186 * 187 * <pre> 188 * A street address level location. 189 * </pre> 190 * 191 * <code>STREET_ADDRESS = 10;</code> 192 */ 193 STREET_ADDRESS(10), 194 UNRECOGNIZED(-1), 195 ; 196 197 /** 198 * 199 * 200 * <pre> 201 * Default value if the type isn't specified. 202 * </pre> 203 * 204 * <code>LOCATION_TYPE_UNSPECIFIED = 0;</code> 205 */ 206 public static final int LOCATION_TYPE_UNSPECIFIED_VALUE = 0; 207 /** 208 * 209 * 210 * <pre> 211 * A country level location. 212 * </pre> 213 * 214 * <code>COUNTRY = 1;</code> 215 */ 216 public static final int COUNTRY_VALUE = 1; 217 /** 218 * 219 * 220 * <pre> 221 * A state or equivalent level location. 222 * </pre> 223 * 224 * <code>ADMINISTRATIVE_AREA = 2;</code> 225 */ 226 public static final int ADMINISTRATIVE_AREA_VALUE = 2; 227 /** 228 * 229 * 230 * <pre> 231 * A county or equivalent level location. 232 * </pre> 233 * 234 * <code>SUB_ADMINISTRATIVE_AREA = 3;</code> 235 */ 236 public static final int SUB_ADMINISTRATIVE_AREA_VALUE = 3; 237 /** 238 * 239 * 240 * <pre> 241 * A city or equivalent level location. 242 * </pre> 243 * 244 * <code>LOCALITY = 4;</code> 245 */ 246 public static final int LOCALITY_VALUE = 4; 247 /** 248 * 249 * 250 * <pre> 251 * A postal code level location. 252 * </pre> 253 * 254 * <code>POSTAL_CODE = 5;</code> 255 */ 256 public static final int POSTAL_CODE_VALUE = 5; 257 /** 258 * 259 * 260 * <pre> 261 * A sublocality is a subdivision of a locality, for example a city borough, 262 * ward, or arrondissement. Sublocalities are usually recognized by a local 263 * political authority. For example, Manhattan and Brooklyn are recognized 264 * as boroughs by the City of New York, and are therefore modeled as 265 * sublocalities. 266 * </pre> 267 * 268 * <code>SUB_LOCALITY = 6;</code> 269 */ 270 public static final int SUB_LOCALITY_VALUE = 6; 271 /** 272 * 273 * 274 * <pre> 275 * A district or equivalent level location. 276 * </pre> 277 * 278 * <code>SUB_LOCALITY_1 = 7;</code> 279 */ 280 public static final int SUB_LOCALITY_1_VALUE = 7; 281 /** 282 * 283 * 284 * <pre> 285 * A smaller district or equivalent level display. 286 * </pre> 287 * 288 * <code>SUB_LOCALITY_2 = 8;</code> 289 */ 290 public static final int SUB_LOCALITY_2_VALUE = 8; 291 /** 292 * 293 * 294 * <pre> 295 * A neighborhood level location. 296 * </pre> 297 * 298 * <code>NEIGHBORHOOD = 9;</code> 299 */ 300 public static final int NEIGHBORHOOD_VALUE = 9; 301 /** 302 * 303 * 304 * <pre> 305 * A street address level location. 306 * </pre> 307 * 308 * <code>STREET_ADDRESS = 10;</code> 309 */ 310 public static final int STREET_ADDRESS_VALUE = 10; 311 getNumber()312 public final int getNumber() { 313 if (this == UNRECOGNIZED) { 314 throw new java.lang.IllegalArgumentException( 315 "Can't get the number of an unknown enum value."); 316 } 317 return value; 318 } 319 320 /** 321 * @param value The numeric wire value of the corresponding enum entry. 322 * @return The enum associated with the given numeric wire value. 323 * @deprecated Use {@link #forNumber(int)} instead. 324 */ 325 @java.lang.Deprecated valueOf(int value)326 public static LocationType valueOf(int value) { 327 return forNumber(value); 328 } 329 330 /** 331 * @param value The numeric wire value of the corresponding enum entry. 332 * @return The enum associated with the given numeric wire value. 333 */ forNumber(int value)334 public static LocationType forNumber(int value) { 335 switch (value) { 336 case 0: 337 return LOCATION_TYPE_UNSPECIFIED; 338 case 1: 339 return COUNTRY; 340 case 2: 341 return ADMINISTRATIVE_AREA; 342 case 3: 343 return SUB_ADMINISTRATIVE_AREA; 344 case 4: 345 return LOCALITY; 346 case 5: 347 return POSTAL_CODE; 348 case 6: 349 return SUB_LOCALITY; 350 case 7: 351 return SUB_LOCALITY_1; 352 case 8: 353 return SUB_LOCALITY_2; 354 case 9: 355 return NEIGHBORHOOD; 356 case 10: 357 return STREET_ADDRESS; 358 default: 359 return null; 360 } 361 } 362 internalGetValueMap()363 public static com.google.protobuf.Internal.EnumLiteMap<LocationType> internalGetValueMap() { 364 return internalValueMap; 365 } 366 367 private static final com.google.protobuf.Internal.EnumLiteMap<LocationType> internalValueMap = 368 new com.google.protobuf.Internal.EnumLiteMap<LocationType>() { 369 public LocationType findValueByNumber(int number) { 370 return LocationType.forNumber(number); 371 } 372 }; 373 getValueDescriptor()374 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 375 if (this == UNRECOGNIZED) { 376 throw new java.lang.IllegalStateException( 377 "Can't get the descriptor of an unrecognized enum value."); 378 } 379 return getDescriptor().getValues().get(ordinal()); 380 } 381 getDescriptorForType()382 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 383 return getDescriptor(); 384 } 385 getDescriptor()386 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 387 return com.google.cloud.talent.v4beta1.Location.getDescriptor().getEnumTypes().get(0); 388 } 389 390 private static final LocationType[] VALUES = values(); 391 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)392 public static LocationType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 393 if (desc.getType() != getDescriptor()) { 394 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 395 } 396 if (desc.getIndex() == -1) { 397 return UNRECOGNIZED; 398 } 399 return VALUES[desc.getIndex()]; 400 } 401 402 private final int value; 403 LocationType(int value)404 private LocationType(int value) { 405 this.value = value; 406 } 407 408 // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4beta1.Location.LocationType) 409 } 410 411 public static final int LOCATION_TYPE_FIELD_NUMBER = 1; 412 private int locationType_ = 0; 413 /** 414 * 415 * 416 * <pre> 417 * The type of a location, which corresponds to the address lines field of 418 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 419 * "Downtown, Atlanta, GA, USA" has a type of 420 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 421 * and "Kansas City, KS, USA" has a type of 422 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 423 * </pre> 424 * 425 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 426 * 427 * @return The enum numeric value on the wire for locationType. 428 */ 429 @java.lang.Override getLocationTypeValue()430 public int getLocationTypeValue() { 431 return locationType_; 432 } 433 /** 434 * 435 * 436 * <pre> 437 * The type of a location, which corresponds to the address lines field of 438 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 439 * "Downtown, Atlanta, GA, USA" has a type of 440 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 441 * and "Kansas City, KS, USA" has a type of 442 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 443 * </pre> 444 * 445 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 446 * 447 * @return The locationType. 448 */ 449 @java.lang.Override getLocationType()450 public com.google.cloud.talent.v4beta1.Location.LocationType getLocationType() { 451 com.google.cloud.talent.v4beta1.Location.LocationType result = 452 com.google.cloud.talent.v4beta1.Location.LocationType.forNumber(locationType_); 453 return result == null 454 ? com.google.cloud.talent.v4beta1.Location.LocationType.UNRECOGNIZED 455 : result; 456 } 457 458 public static final int POSTAL_ADDRESS_FIELD_NUMBER = 2; 459 private com.google.type.PostalAddress postalAddress_; 460 /** 461 * 462 * 463 * <pre> 464 * Postal address of the location that includes human readable information, 465 * such as postal delivery and payments addresses. Given a postal address, 466 * a postal service can deliver items to a premises, P.O. Box, or other 467 * delivery location. 468 * </pre> 469 * 470 * <code>.google.type.PostalAddress postal_address = 2;</code> 471 * 472 * @return Whether the postalAddress field is set. 473 */ 474 @java.lang.Override hasPostalAddress()475 public boolean hasPostalAddress() { 476 return postalAddress_ != null; 477 } 478 /** 479 * 480 * 481 * <pre> 482 * Postal address of the location that includes human readable information, 483 * such as postal delivery and payments addresses. Given a postal address, 484 * a postal service can deliver items to a premises, P.O. Box, or other 485 * delivery location. 486 * </pre> 487 * 488 * <code>.google.type.PostalAddress postal_address = 2;</code> 489 * 490 * @return The postalAddress. 491 */ 492 @java.lang.Override getPostalAddress()493 public com.google.type.PostalAddress getPostalAddress() { 494 return postalAddress_ == null 495 ? com.google.type.PostalAddress.getDefaultInstance() 496 : postalAddress_; 497 } 498 /** 499 * 500 * 501 * <pre> 502 * Postal address of the location that includes human readable information, 503 * such as postal delivery and payments addresses. Given a postal address, 504 * a postal service can deliver items to a premises, P.O. Box, or other 505 * delivery location. 506 * </pre> 507 * 508 * <code>.google.type.PostalAddress postal_address = 2;</code> 509 */ 510 @java.lang.Override getPostalAddressOrBuilder()511 public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { 512 return postalAddress_ == null 513 ? com.google.type.PostalAddress.getDefaultInstance() 514 : postalAddress_; 515 } 516 517 public static final int LAT_LNG_FIELD_NUMBER = 3; 518 private com.google.type.LatLng latLng_; 519 /** 520 * 521 * 522 * <pre> 523 * An object representing a latitude/longitude pair. 524 * </pre> 525 * 526 * <code>.google.type.LatLng lat_lng = 3;</code> 527 * 528 * @return Whether the latLng field is set. 529 */ 530 @java.lang.Override hasLatLng()531 public boolean hasLatLng() { 532 return latLng_ != null; 533 } 534 /** 535 * 536 * 537 * <pre> 538 * An object representing a latitude/longitude pair. 539 * </pre> 540 * 541 * <code>.google.type.LatLng lat_lng = 3;</code> 542 * 543 * @return The latLng. 544 */ 545 @java.lang.Override getLatLng()546 public com.google.type.LatLng getLatLng() { 547 return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; 548 } 549 /** 550 * 551 * 552 * <pre> 553 * An object representing a latitude/longitude pair. 554 * </pre> 555 * 556 * <code>.google.type.LatLng lat_lng = 3;</code> 557 */ 558 @java.lang.Override getLatLngOrBuilder()559 public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { 560 return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; 561 } 562 563 public static final int RADIUS_MILES_FIELD_NUMBER = 4; 564 private double radiusMiles_ = 0D; 565 /** 566 * 567 * 568 * <pre> 569 * Radius in miles of the job location. This value is derived from the 570 * location bounding box in which a circle with the specified radius 571 * centered from [google.type.LatLng][google.type.LatLng] covers the area 572 * associated with the job location. For example, currently, "Mountain View, 573 * CA, USA" has a radius of 6.17 miles. 574 * </pre> 575 * 576 * <code>double radius_miles = 4;</code> 577 * 578 * @return The radiusMiles. 579 */ 580 @java.lang.Override getRadiusMiles()581 public double getRadiusMiles() { 582 return radiusMiles_; 583 } 584 585 private byte memoizedIsInitialized = -1; 586 587 @java.lang.Override isInitialized()588 public final boolean isInitialized() { 589 byte isInitialized = memoizedIsInitialized; 590 if (isInitialized == 1) return true; 591 if (isInitialized == 0) return false; 592 593 memoizedIsInitialized = 1; 594 return true; 595 } 596 597 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)598 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 599 if (locationType_ 600 != com.google.cloud.talent.v4beta1.Location.LocationType.LOCATION_TYPE_UNSPECIFIED 601 .getNumber()) { 602 output.writeEnum(1, locationType_); 603 } 604 if (postalAddress_ != null) { 605 output.writeMessage(2, getPostalAddress()); 606 } 607 if (latLng_ != null) { 608 output.writeMessage(3, getLatLng()); 609 } 610 if (java.lang.Double.doubleToRawLongBits(radiusMiles_) != 0) { 611 output.writeDouble(4, radiusMiles_); 612 } 613 getUnknownFields().writeTo(output); 614 } 615 616 @java.lang.Override getSerializedSize()617 public int getSerializedSize() { 618 int size = memoizedSize; 619 if (size != -1) return size; 620 621 size = 0; 622 if (locationType_ 623 != com.google.cloud.talent.v4beta1.Location.LocationType.LOCATION_TYPE_UNSPECIFIED 624 .getNumber()) { 625 size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, locationType_); 626 } 627 if (postalAddress_ != null) { 628 size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPostalAddress()); 629 } 630 if (latLng_ != null) { 631 size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLatLng()); 632 } 633 if (java.lang.Double.doubleToRawLongBits(radiusMiles_) != 0) { 634 size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, radiusMiles_); 635 } 636 size += getUnknownFields().getSerializedSize(); 637 memoizedSize = size; 638 return size; 639 } 640 641 @java.lang.Override equals(final java.lang.Object obj)642 public boolean equals(final java.lang.Object obj) { 643 if (obj == this) { 644 return true; 645 } 646 if (!(obj instanceof com.google.cloud.talent.v4beta1.Location)) { 647 return super.equals(obj); 648 } 649 com.google.cloud.talent.v4beta1.Location other = (com.google.cloud.talent.v4beta1.Location) obj; 650 651 if (locationType_ != other.locationType_) return false; 652 if (hasPostalAddress() != other.hasPostalAddress()) return false; 653 if (hasPostalAddress()) { 654 if (!getPostalAddress().equals(other.getPostalAddress())) return false; 655 } 656 if (hasLatLng() != other.hasLatLng()) return false; 657 if (hasLatLng()) { 658 if (!getLatLng().equals(other.getLatLng())) return false; 659 } 660 if (java.lang.Double.doubleToLongBits(getRadiusMiles()) 661 != java.lang.Double.doubleToLongBits(other.getRadiusMiles())) return false; 662 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 663 return true; 664 } 665 666 @java.lang.Override hashCode()667 public int hashCode() { 668 if (memoizedHashCode != 0) { 669 return memoizedHashCode; 670 } 671 int hash = 41; 672 hash = (19 * hash) + getDescriptor().hashCode(); 673 hash = (37 * hash) + LOCATION_TYPE_FIELD_NUMBER; 674 hash = (53 * hash) + locationType_; 675 if (hasPostalAddress()) { 676 hash = (37 * hash) + POSTAL_ADDRESS_FIELD_NUMBER; 677 hash = (53 * hash) + getPostalAddress().hashCode(); 678 } 679 if (hasLatLng()) { 680 hash = (37 * hash) + LAT_LNG_FIELD_NUMBER; 681 hash = (53 * hash) + getLatLng().hashCode(); 682 } 683 hash = (37 * hash) + RADIUS_MILES_FIELD_NUMBER; 684 hash = 685 (53 * hash) 686 + com.google.protobuf.Internal.hashLong( 687 java.lang.Double.doubleToLongBits(getRadiusMiles())); 688 hash = (29 * hash) + getUnknownFields().hashCode(); 689 memoizedHashCode = hash; 690 return hash; 691 } 692 parseFrom(java.nio.ByteBuffer data)693 public static com.google.cloud.talent.v4beta1.Location parseFrom(java.nio.ByteBuffer data) 694 throws com.google.protobuf.InvalidProtocolBufferException { 695 return PARSER.parseFrom(data); 696 } 697 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)698 public static com.google.cloud.talent.v4beta1.Location parseFrom( 699 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 700 throws com.google.protobuf.InvalidProtocolBufferException { 701 return PARSER.parseFrom(data, extensionRegistry); 702 } 703 parseFrom( com.google.protobuf.ByteString data)704 public static com.google.cloud.talent.v4beta1.Location parseFrom( 705 com.google.protobuf.ByteString data) 706 throws com.google.protobuf.InvalidProtocolBufferException { 707 return PARSER.parseFrom(data); 708 } 709 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)710 public static com.google.cloud.talent.v4beta1.Location parseFrom( 711 com.google.protobuf.ByteString data, 712 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 713 throws com.google.protobuf.InvalidProtocolBufferException { 714 return PARSER.parseFrom(data, extensionRegistry); 715 } 716 parseFrom(byte[] data)717 public static com.google.cloud.talent.v4beta1.Location parseFrom(byte[] data) 718 throws com.google.protobuf.InvalidProtocolBufferException { 719 return PARSER.parseFrom(data); 720 } 721 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)722 public static com.google.cloud.talent.v4beta1.Location parseFrom( 723 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 724 throws com.google.protobuf.InvalidProtocolBufferException { 725 return PARSER.parseFrom(data, extensionRegistry); 726 } 727 parseFrom(java.io.InputStream input)728 public static com.google.cloud.talent.v4beta1.Location parseFrom(java.io.InputStream input) 729 throws java.io.IOException { 730 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 731 } 732 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)733 public static com.google.cloud.talent.v4beta1.Location parseFrom( 734 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 735 throws java.io.IOException { 736 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 737 PARSER, input, extensionRegistry); 738 } 739 parseDelimitedFrom( java.io.InputStream input)740 public static com.google.cloud.talent.v4beta1.Location parseDelimitedFrom( 741 java.io.InputStream input) throws java.io.IOException { 742 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 743 } 744 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)745 public static com.google.cloud.talent.v4beta1.Location parseDelimitedFrom( 746 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 747 throws java.io.IOException { 748 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 749 PARSER, input, extensionRegistry); 750 } 751 parseFrom( com.google.protobuf.CodedInputStream input)752 public static com.google.cloud.talent.v4beta1.Location parseFrom( 753 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 754 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 755 } 756 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)757 public static com.google.cloud.talent.v4beta1.Location parseFrom( 758 com.google.protobuf.CodedInputStream input, 759 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 760 throws java.io.IOException { 761 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 762 PARSER, input, extensionRegistry); 763 } 764 765 @java.lang.Override newBuilderForType()766 public Builder newBuilderForType() { 767 return newBuilder(); 768 } 769 newBuilder()770 public static Builder newBuilder() { 771 return DEFAULT_INSTANCE.toBuilder(); 772 } 773 newBuilder(com.google.cloud.talent.v4beta1.Location prototype)774 public static Builder newBuilder(com.google.cloud.talent.v4beta1.Location prototype) { 775 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 776 } 777 778 @java.lang.Override toBuilder()779 public Builder toBuilder() { 780 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 781 } 782 783 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)784 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 785 Builder builder = new Builder(parent); 786 return builder; 787 } 788 /** 789 * 790 * 791 * <pre> 792 * A resource that represents a location with full geographic information. 793 * </pre> 794 * 795 * Protobuf type {@code google.cloud.talent.v4beta1.Location} 796 */ 797 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 798 implements 799 // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4beta1.Location) 800 com.google.cloud.talent.v4beta1.LocationOrBuilder { getDescriptor()801 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 802 return com.google.cloud.talent.v4beta1.CommonProto 803 .internal_static_google_cloud_talent_v4beta1_Location_descriptor; 804 } 805 806 @java.lang.Override 807 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()808 internalGetFieldAccessorTable() { 809 return com.google.cloud.talent.v4beta1.CommonProto 810 .internal_static_google_cloud_talent_v4beta1_Location_fieldAccessorTable 811 .ensureFieldAccessorsInitialized( 812 com.google.cloud.talent.v4beta1.Location.class, 813 com.google.cloud.talent.v4beta1.Location.Builder.class); 814 } 815 816 // Construct using com.google.cloud.talent.v4beta1.Location.newBuilder() Builder()817 private Builder() {} 818 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)819 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 820 super(parent); 821 } 822 823 @java.lang.Override clear()824 public Builder clear() { 825 super.clear(); 826 bitField0_ = 0; 827 locationType_ = 0; 828 postalAddress_ = null; 829 if (postalAddressBuilder_ != null) { 830 postalAddressBuilder_.dispose(); 831 postalAddressBuilder_ = null; 832 } 833 latLng_ = null; 834 if (latLngBuilder_ != null) { 835 latLngBuilder_.dispose(); 836 latLngBuilder_ = null; 837 } 838 radiusMiles_ = 0D; 839 return this; 840 } 841 842 @java.lang.Override getDescriptorForType()843 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 844 return com.google.cloud.talent.v4beta1.CommonProto 845 .internal_static_google_cloud_talent_v4beta1_Location_descriptor; 846 } 847 848 @java.lang.Override getDefaultInstanceForType()849 public com.google.cloud.talent.v4beta1.Location getDefaultInstanceForType() { 850 return com.google.cloud.talent.v4beta1.Location.getDefaultInstance(); 851 } 852 853 @java.lang.Override build()854 public com.google.cloud.talent.v4beta1.Location build() { 855 com.google.cloud.talent.v4beta1.Location result = buildPartial(); 856 if (!result.isInitialized()) { 857 throw newUninitializedMessageException(result); 858 } 859 return result; 860 } 861 862 @java.lang.Override buildPartial()863 public com.google.cloud.talent.v4beta1.Location buildPartial() { 864 com.google.cloud.talent.v4beta1.Location result = 865 new com.google.cloud.talent.v4beta1.Location(this); 866 if (bitField0_ != 0) { 867 buildPartial0(result); 868 } 869 onBuilt(); 870 return result; 871 } 872 buildPartial0(com.google.cloud.talent.v4beta1.Location result)873 private void buildPartial0(com.google.cloud.talent.v4beta1.Location result) { 874 int from_bitField0_ = bitField0_; 875 if (((from_bitField0_ & 0x00000001) != 0)) { 876 result.locationType_ = locationType_; 877 } 878 if (((from_bitField0_ & 0x00000002) != 0)) { 879 result.postalAddress_ = 880 postalAddressBuilder_ == null ? postalAddress_ : postalAddressBuilder_.build(); 881 } 882 if (((from_bitField0_ & 0x00000004) != 0)) { 883 result.latLng_ = latLngBuilder_ == null ? latLng_ : latLngBuilder_.build(); 884 } 885 if (((from_bitField0_ & 0x00000008) != 0)) { 886 result.radiusMiles_ = radiusMiles_; 887 } 888 } 889 890 @java.lang.Override clone()891 public Builder clone() { 892 return super.clone(); 893 } 894 895 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)896 public Builder setField( 897 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 898 return super.setField(field, value); 899 } 900 901 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)902 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 903 return super.clearField(field); 904 } 905 906 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)907 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 908 return super.clearOneof(oneof); 909 } 910 911 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)912 public Builder setRepeatedField( 913 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 914 return super.setRepeatedField(field, index, value); 915 } 916 917 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)918 public Builder addRepeatedField( 919 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 920 return super.addRepeatedField(field, value); 921 } 922 923 @java.lang.Override mergeFrom(com.google.protobuf.Message other)924 public Builder mergeFrom(com.google.protobuf.Message other) { 925 if (other instanceof com.google.cloud.talent.v4beta1.Location) { 926 return mergeFrom((com.google.cloud.talent.v4beta1.Location) other); 927 } else { 928 super.mergeFrom(other); 929 return this; 930 } 931 } 932 mergeFrom(com.google.cloud.talent.v4beta1.Location other)933 public Builder mergeFrom(com.google.cloud.talent.v4beta1.Location other) { 934 if (other == com.google.cloud.talent.v4beta1.Location.getDefaultInstance()) return this; 935 if (other.locationType_ != 0) { 936 setLocationTypeValue(other.getLocationTypeValue()); 937 } 938 if (other.hasPostalAddress()) { 939 mergePostalAddress(other.getPostalAddress()); 940 } 941 if (other.hasLatLng()) { 942 mergeLatLng(other.getLatLng()); 943 } 944 if (other.getRadiusMiles() != 0D) { 945 setRadiusMiles(other.getRadiusMiles()); 946 } 947 this.mergeUnknownFields(other.getUnknownFields()); 948 onChanged(); 949 return this; 950 } 951 952 @java.lang.Override isInitialized()953 public final boolean isInitialized() { 954 return true; 955 } 956 957 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)958 public Builder mergeFrom( 959 com.google.protobuf.CodedInputStream input, 960 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 961 throws java.io.IOException { 962 if (extensionRegistry == null) { 963 throw new java.lang.NullPointerException(); 964 } 965 try { 966 boolean done = false; 967 while (!done) { 968 int tag = input.readTag(); 969 switch (tag) { 970 case 0: 971 done = true; 972 break; 973 case 8: 974 { 975 locationType_ = input.readEnum(); 976 bitField0_ |= 0x00000001; 977 break; 978 } // case 8 979 case 18: 980 { 981 input.readMessage(getPostalAddressFieldBuilder().getBuilder(), extensionRegistry); 982 bitField0_ |= 0x00000002; 983 break; 984 } // case 18 985 case 26: 986 { 987 input.readMessage(getLatLngFieldBuilder().getBuilder(), extensionRegistry); 988 bitField0_ |= 0x00000004; 989 break; 990 } // case 26 991 case 33: 992 { 993 radiusMiles_ = input.readDouble(); 994 bitField0_ |= 0x00000008; 995 break; 996 } // case 33 997 default: 998 { 999 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1000 done = true; // was an endgroup tag 1001 } 1002 break; 1003 } // default: 1004 } // switch (tag) 1005 } // while (!done) 1006 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1007 throw e.unwrapIOException(); 1008 } finally { 1009 onChanged(); 1010 } // finally 1011 return this; 1012 } 1013 1014 private int bitField0_; 1015 1016 private int locationType_ = 0; 1017 /** 1018 * 1019 * 1020 * <pre> 1021 * The type of a location, which corresponds to the address lines field of 1022 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 1023 * "Downtown, Atlanta, GA, USA" has a type of 1024 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 1025 * and "Kansas City, KS, USA" has a type of 1026 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 1027 * </pre> 1028 * 1029 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 1030 * 1031 * @return The enum numeric value on the wire for locationType. 1032 */ 1033 @java.lang.Override getLocationTypeValue()1034 public int getLocationTypeValue() { 1035 return locationType_; 1036 } 1037 /** 1038 * 1039 * 1040 * <pre> 1041 * The type of a location, which corresponds to the address lines field of 1042 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 1043 * "Downtown, Atlanta, GA, USA" has a type of 1044 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 1045 * and "Kansas City, KS, USA" has a type of 1046 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 1047 * </pre> 1048 * 1049 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 1050 * 1051 * @param value The enum numeric value on the wire for locationType to set. 1052 * @return This builder for chaining. 1053 */ setLocationTypeValue(int value)1054 public Builder setLocationTypeValue(int value) { 1055 locationType_ = value; 1056 bitField0_ |= 0x00000001; 1057 onChanged(); 1058 return this; 1059 } 1060 /** 1061 * 1062 * 1063 * <pre> 1064 * The type of a location, which corresponds to the address lines field of 1065 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 1066 * "Downtown, Atlanta, GA, USA" has a type of 1067 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 1068 * and "Kansas City, KS, USA" has a type of 1069 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 1070 * </pre> 1071 * 1072 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 1073 * 1074 * @return The locationType. 1075 */ 1076 @java.lang.Override getLocationType()1077 public com.google.cloud.talent.v4beta1.Location.LocationType getLocationType() { 1078 com.google.cloud.talent.v4beta1.Location.LocationType result = 1079 com.google.cloud.talent.v4beta1.Location.LocationType.forNumber(locationType_); 1080 return result == null 1081 ? com.google.cloud.talent.v4beta1.Location.LocationType.UNRECOGNIZED 1082 : result; 1083 } 1084 /** 1085 * 1086 * 1087 * <pre> 1088 * The type of a location, which corresponds to the address lines field of 1089 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 1090 * "Downtown, Atlanta, GA, USA" has a type of 1091 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 1092 * and "Kansas City, KS, USA" has a type of 1093 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 1094 * </pre> 1095 * 1096 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 1097 * 1098 * @param value The locationType to set. 1099 * @return This builder for chaining. 1100 */ setLocationType(com.google.cloud.talent.v4beta1.Location.LocationType value)1101 public Builder setLocationType(com.google.cloud.talent.v4beta1.Location.LocationType value) { 1102 if (value == null) { 1103 throw new NullPointerException(); 1104 } 1105 bitField0_ |= 0x00000001; 1106 locationType_ = value.getNumber(); 1107 onChanged(); 1108 return this; 1109 } 1110 /** 1111 * 1112 * 1113 * <pre> 1114 * The type of a location, which corresponds to the address lines field of 1115 * [google.type.PostalAddress][google.type.PostalAddress]. For example, 1116 * "Downtown, Atlanta, GA, USA" has a type of 1117 * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4beta1.Location.LocationType.NEIGHBORHOOD], 1118 * and "Kansas City, KS, USA" has a type of 1119 * [LocationType.LOCALITY][google.cloud.talent.v4beta1.Location.LocationType.LOCALITY]. 1120 * </pre> 1121 * 1122 * <code>.google.cloud.talent.v4beta1.Location.LocationType location_type = 1;</code> 1123 * 1124 * @return This builder for chaining. 1125 */ clearLocationType()1126 public Builder clearLocationType() { 1127 bitField0_ = (bitField0_ & ~0x00000001); 1128 locationType_ = 0; 1129 onChanged(); 1130 return this; 1131 } 1132 1133 private com.google.type.PostalAddress postalAddress_; 1134 private com.google.protobuf.SingleFieldBuilderV3< 1135 com.google.type.PostalAddress, 1136 com.google.type.PostalAddress.Builder, 1137 com.google.type.PostalAddressOrBuilder> 1138 postalAddressBuilder_; 1139 /** 1140 * 1141 * 1142 * <pre> 1143 * Postal address of the location that includes human readable information, 1144 * such as postal delivery and payments addresses. Given a postal address, 1145 * a postal service can deliver items to a premises, P.O. Box, or other 1146 * delivery location. 1147 * </pre> 1148 * 1149 * <code>.google.type.PostalAddress postal_address = 2;</code> 1150 * 1151 * @return Whether the postalAddress field is set. 1152 */ hasPostalAddress()1153 public boolean hasPostalAddress() { 1154 return ((bitField0_ & 0x00000002) != 0); 1155 } 1156 /** 1157 * 1158 * 1159 * <pre> 1160 * Postal address of the location that includes human readable information, 1161 * such as postal delivery and payments addresses. Given a postal address, 1162 * a postal service can deliver items to a premises, P.O. Box, or other 1163 * delivery location. 1164 * </pre> 1165 * 1166 * <code>.google.type.PostalAddress postal_address = 2;</code> 1167 * 1168 * @return The postalAddress. 1169 */ getPostalAddress()1170 public com.google.type.PostalAddress getPostalAddress() { 1171 if (postalAddressBuilder_ == null) { 1172 return postalAddress_ == null 1173 ? com.google.type.PostalAddress.getDefaultInstance() 1174 : postalAddress_; 1175 } else { 1176 return postalAddressBuilder_.getMessage(); 1177 } 1178 } 1179 /** 1180 * 1181 * 1182 * <pre> 1183 * Postal address of the location that includes human readable information, 1184 * such as postal delivery and payments addresses. Given a postal address, 1185 * a postal service can deliver items to a premises, P.O. Box, or other 1186 * delivery location. 1187 * </pre> 1188 * 1189 * <code>.google.type.PostalAddress postal_address = 2;</code> 1190 */ setPostalAddress(com.google.type.PostalAddress value)1191 public Builder setPostalAddress(com.google.type.PostalAddress value) { 1192 if (postalAddressBuilder_ == null) { 1193 if (value == null) { 1194 throw new NullPointerException(); 1195 } 1196 postalAddress_ = value; 1197 } else { 1198 postalAddressBuilder_.setMessage(value); 1199 } 1200 bitField0_ |= 0x00000002; 1201 onChanged(); 1202 return this; 1203 } 1204 /** 1205 * 1206 * 1207 * <pre> 1208 * Postal address of the location that includes human readable information, 1209 * such as postal delivery and payments addresses. Given a postal address, 1210 * a postal service can deliver items to a premises, P.O. Box, or other 1211 * delivery location. 1212 * </pre> 1213 * 1214 * <code>.google.type.PostalAddress postal_address = 2;</code> 1215 */ setPostalAddress(com.google.type.PostalAddress.Builder builderForValue)1216 public Builder setPostalAddress(com.google.type.PostalAddress.Builder builderForValue) { 1217 if (postalAddressBuilder_ == null) { 1218 postalAddress_ = builderForValue.build(); 1219 } else { 1220 postalAddressBuilder_.setMessage(builderForValue.build()); 1221 } 1222 bitField0_ |= 0x00000002; 1223 onChanged(); 1224 return this; 1225 } 1226 /** 1227 * 1228 * 1229 * <pre> 1230 * Postal address of the location that includes human readable information, 1231 * such as postal delivery and payments addresses. Given a postal address, 1232 * a postal service can deliver items to a premises, P.O. Box, or other 1233 * delivery location. 1234 * </pre> 1235 * 1236 * <code>.google.type.PostalAddress postal_address = 2;</code> 1237 */ mergePostalAddress(com.google.type.PostalAddress value)1238 public Builder mergePostalAddress(com.google.type.PostalAddress value) { 1239 if (postalAddressBuilder_ == null) { 1240 if (((bitField0_ & 0x00000002) != 0) 1241 && postalAddress_ != null 1242 && postalAddress_ != com.google.type.PostalAddress.getDefaultInstance()) { 1243 getPostalAddressBuilder().mergeFrom(value); 1244 } else { 1245 postalAddress_ = value; 1246 } 1247 } else { 1248 postalAddressBuilder_.mergeFrom(value); 1249 } 1250 bitField0_ |= 0x00000002; 1251 onChanged(); 1252 return this; 1253 } 1254 /** 1255 * 1256 * 1257 * <pre> 1258 * Postal address of the location that includes human readable information, 1259 * such as postal delivery and payments addresses. Given a postal address, 1260 * a postal service can deliver items to a premises, P.O. Box, or other 1261 * delivery location. 1262 * </pre> 1263 * 1264 * <code>.google.type.PostalAddress postal_address = 2;</code> 1265 */ clearPostalAddress()1266 public Builder clearPostalAddress() { 1267 bitField0_ = (bitField0_ & ~0x00000002); 1268 postalAddress_ = null; 1269 if (postalAddressBuilder_ != null) { 1270 postalAddressBuilder_.dispose(); 1271 postalAddressBuilder_ = null; 1272 } 1273 onChanged(); 1274 return this; 1275 } 1276 /** 1277 * 1278 * 1279 * <pre> 1280 * Postal address of the location that includes human readable information, 1281 * such as postal delivery and payments addresses. Given a postal address, 1282 * a postal service can deliver items to a premises, P.O. Box, or other 1283 * delivery location. 1284 * </pre> 1285 * 1286 * <code>.google.type.PostalAddress postal_address = 2;</code> 1287 */ getPostalAddressBuilder()1288 public com.google.type.PostalAddress.Builder getPostalAddressBuilder() { 1289 bitField0_ |= 0x00000002; 1290 onChanged(); 1291 return getPostalAddressFieldBuilder().getBuilder(); 1292 } 1293 /** 1294 * 1295 * 1296 * <pre> 1297 * Postal address of the location that includes human readable information, 1298 * such as postal delivery and payments addresses. Given a postal address, 1299 * a postal service can deliver items to a premises, P.O. Box, or other 1300 * delivery location. 1301 * </pre> 1302 * 1303 * <code>.google.type.PostalAddress postal_address = 2;</code> 1304 */ getPostalAddressOrBuilder()1305 public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() { 1306 if (postalAddressBuilder_ != null) { 1307 return postalAddressBuilder_.getMessageOrBuilder(); 1308 } else { 1309 return postalAddress_ == null 1310 ? com.google.type.PostalAddress.getDefaultInstance() 1311 : postalAddress_; 1312 } 1313 } 1314 /** 1315 * 1316 * 1317 * <pre> 1318 * Postal address of the location that includes human readable information, 1319 * such as postal delivery and payments addresses. Given a postal address, 1320 * a postal service can deliver items to a premises, P.O. Box, or other 1321 * delivery location. 1322 * </pre> 1323 * 1324 * <code>.google.type.PostalAddress postal_address = 2;</code> 1325 */ 1326 private com.google.protobuf.SingleFieldBuilderV3< 1327 com.google.type.PostalAddress, 1328 com.google.type.PostalAddress.Builder, 1329 com.google.type.PostalAddressOrBuilder> getPostalAddressFieldBuilder()1330 getPostalAddressFieldBuilder() { 1331 if (postalAddressBuilder_ == null) { 1332 postalAddressBuilder_ = 1333 new com.google.protobuf.SingleFieldBuilderV3< 1334 com.google.type.PostalAddress, 1335 com.google.type.PostalAddress.Builder, 1336 com.google.type.PostalAddressOrBuilder>( 1337 getPostalAddress(), getParentForChildren(), isClean()); 1338 postalAddress_ = null; 1339 } 1340 return postalAddressBuilder_; 1341 } 1342 1343 private com.google.type.LatLng latLng_; 1344 private com.google.protobuf.SingleFieldBuilderV3< 1345 com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> 1346 latLngBuilder_; 1347 /** 1348 * 1349 * 1350 * <pre> 1351 * An object representing a latitude/longitude pair. 1352 * </pre> 1353 * 1354 * <code>.google.type.LatLng lat_lng = 3;</code> 1355 * 1356 * @return Whether the latLng field is set. 1357 */ hasLatLng()1358 public boolean hasLatLng() { 1359 return ((bitField0_ & 0x00000004) != 0); 1360 } 1361 /** 1362 * 1363 * 1364 * <pre> 1365 * An object representing a latitude/longitude pair. 1366 * </pre> 1367 * 1368 * <code>.google.type.LatLng lat_lng = 3;</code> 1369 * 1370 * @return The latLng. 1371 */ getLatLng()1372 public com.google.type.LatLng getLatLng() { 1373 if (latLngBuilder_ == null) { 1374 return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; 1375 } else { 1376 return latLngBuilder_.getMessage(); 1377 } 1378 } 1379 /** 1380 * 1381 * 1382 * <pre> 1383 * An object representing a latitude/longitude pair. 1384 * </pre> 1385 * 1386 * <code>.google.type.LatLng lat_lng = 3;</code> 1387 */ setLatLng(com.google.type.LatLng value)1388 public Builder setLatLng(com.google.type.LatLng value) { 1389 if (latLngBuilder_ == null) { 1390 if (value == null) { 1391 throw new NullPointerException(); 1392 } 1393 latLng_ = value; 1394 } else { 1395 latLngBuilder_.setMessage(value); 1396 } 1397 bitField0_ |= 0x00000004; 1398 onChanged(); 1399 return this; 1400 } 1401 /** 1402 * 1403 * 1404 * <pre> 1405 * An object representing a latitude/longitude pair. 1406 * </pre> 1407 * 1408 * <code>.google.type.LatLng lat_lng = 3;</code> 1409 */ setLatLng(com.google.type.LatLng.Builder builderForValue)1410 public Builder setLatLng(com.google.type.LatLng.Builder builderForValue) { 1411 if (latLngBuilder_ == null) { 1412 latLng_ = builderForValue.build(); 1413 } else { 1414 latLngBuilder_.setMessage(builderForValue.build()); 1415 } 1416 bitField0_ |= 0x00000004; 1417 onChanged(); 1418 return this; 1419 } 1420 /** 1421 * 1422 * 1423 * <pre> 1424 * An object representing a latitude/longitude pair. 1425 * </pre> 1426 * 1427 * <code>.google.type.LatLng lat_lng = 3;</code> 1428 */ mergeLatLng(com.google.type.LatLng value)1429 public Builder mergeLatLng(com.google.type.LatLng value) { 1430 if (latLngBuilder_ == null) { 1431 if (((bitField0_ & 0x00000004) != 0) 1432 && latLng_ != null 1433 && latLng_ != com.google.type.LatLng.getDefaultInstance()) { 1434 getLatLngBuilder().mergeFrom(value); 1435 } else { 1436 latLng_ = value; 1437 } 1438 } else { 1439 latLngBuilder_.mergeFrom(value); 1440 } 1441 bitField0_ |= 0x00000004; 1442 onChanged(); 1443 return this; 1444 } 1445 /** 1446 * 1447 * 1448 * <pre> 1449 * An object representing a latitude/longitude pair. 1450 * </pre> 1451 * 1452 * <code>.google.type.LatLng lat_lng = 3;</code> 1453 */ clearLatLng()1454 public Builder clearLatLng() { 1455 bitField0_ = (bitField0_ & ~0x00000004); 1456 latLng_ = null; 1457 if (latLngBuilder_ != null) { 1458 latLngBuilder_.dispose(); 1459 latLngBuilder_ = null; 1460 } 1461 onChanged(); 1462 return this; 1463 } 1464 /** 1465 * 1466 * 1467 * <pre> 1468 * An object representing a latitude/longitude pair. 1469 * </pre> 1470 * 1471 * <code>.google.type.LatLng lat_lng = 3;</code> 1472 */ getLatLngBuilder()1473 public com.google.type.LatLng.Builder getLatLngBuilder() { 1474 bitField0_ |= 0x00000004; 1475 onChanged(); 1476 return getLatLngFieldBuilder().getBuilder(); 1477 } 1478 /** 1479 * 1480 * 1481 * <pre> 1482 * An object representing a latitude/longitude pair. 1483 * </pre> 1484 * 1485 * <code>.google.type.LatLng lat_lng = 3;</code> 1486 */ getLatLngOrBuilder()1487 public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { 1488 if (latLngBuilder_ != null) { 1489 return latLngBuilder_.getMessageOrBuilder(); 1490 } else { 1491 return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_; 1492 } 1493 } 1494 /** 1495 * 1496 * 1497 * <pre> 1498 * An object representing a latitude/longitude pair. 1499 * </pre> 1500 * 1501 * <code>.google.type.LatLng lat_lng = 3;</code> 1502 */ 1503 private com.google.protobuf.SingleFieldBuilderV3< 1504 com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> getLatLngFieldBuilder()1505 getLatLngFieldBuilder() { 1506 if (latLngBuilder_ == null) { 1507 latLngBuilder_ = 1508 new com.google.protobuf.SingleFieldBuilderV3< 1509 com.google.type.LatLng, 1510 com.google.type.LatLng.Builder, 1511 com.google.type.LatLngOrBuilder>(getLatLng(), getParentForChildren(), isClean()); 1512 latLng_ = null; 1513 } 1514 return latLngBuilder_; 1515 } 1516 1517 private double radiusMiles_; 1518 /** 1519 * 1520 * 1521 * <pre> 1522 * Radius in miles of the job location. This value is derived from the 1523 * location bounding box in which a circle with the specified radius 1524 * centered from [google.type.LatLng][google.type.LatLng] covers the area 1525 * associated with the job location. For example, currently, "Mountain View, 1526 * CA, USA" has a radius of 6.17 miles. 1527 * </pre> 1528 * 1529 * <code>double radius_miles = 4;</code> 1530 * 1531 * @return The radiusMiles. 1532 */ 1533 @java.lang.Override getRadiusMiles()1534 public double getRadiusMiles() { 1535 return radiusMiles_; 1536 } 1537 /** 1538 * 1539 * 1540 * <pre> 1541 * Radius in miles of the job location. This value is derived from the 1542 * location bounding box in which a circle with the specified radius 1543 * centered from [google.type.LatLng][google.type.LatLng] covers the area 1544 * associated with the job location. For example, currently, "Mountain View, 1545 * CA, USA" has a radius of 6.17 miles. 1546 * </pre> 1547 * 1548 * <code>double radius_miles = 4;</code> 1549 * 1550 * @param value The radiusMiles to set. 1551 * @return This builder for chaining. 1552 */ setRadiusMiles(double value)1553 public Builder setRadiusMiles(double value) { 1554 1555 radiusMiles_ = value; 1556 bitField0_ |= 0x00000008; 1557 onChanged(); 1558 return this; 1559 } 1560 /** 1561 * 1562 * 1563 * <pre> 1564 * Radius in miles of the job location. This value is derived from the 1565 * location bounding box in which a circle with the specified radius 1566 * centered from [google.type.LatLng][google.type.LatLng] covers the area 1567 * associated with the job location. For example, currently, "Mountain View, 1568 * CA, USA" has a radius of 6.17 miles. 1569 * </pre> 1570 * 1571 * <code>double radius_miles = 4;</code> 1572 * 1573 * @return This builder for chaining. 1574 */ clearRadiusMiles()1575 public Builder clearRadiusMiles() { 1576 bitField0_ = (bitField0_ & ~0x00000008); 1577 radiusMiles_ = 0D; 1578 onChanged(); 1579 return this; 1580 } 1581 1582 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1583 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1584 return super.setUnknownFields(unknownFields); 1585 } 1586 1587 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1588 public final Builder mergeUnknownFields( 1589 final com.google.protobuf.UnknownFieldSet unknownFields) { 1590 return super.mergeUnknownFields(unknownFields); 1591 } 1592 1593 // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4beta1.Location) 1594 } 1595 1596 // @@protoc_insertion_point(class_scope:google.cloud.talent.v4beta1.Location) 1597 private static final com.google.cloud.talent.v4beta1.Location DEFAULT_INSTANCE; 1598 1599 static { 1600 DEFAULT_INSTANCE = new com.google.cloud.talent.v4beta1.Location(); 1601 } 1602 getDefaultInstance()1603 public static com.google.cloud.talent.v4beta1.Location getDefaultInstance() { 1604 return DEFAULT_INSTANCE; 1605 } 1606 1607 private static final com.google.protobuf.Parser<Location> PARSER = 1608 new com.google.protobuf.AbstractParser<Location>() { 1609 @java.lang.Override 1610 public Location parsePartialFrom( 1611 com.google.protobuf.CodedInputStream input, 1612 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1613 throws com.google.protobuf.InvalidProtocolBufferException { 1614 Builder builder = newBuilder(); 1615 try { 1616 builder.mergeFrom(input, extensionRegistry); 1617 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1618 throw e.setUnfinishedMessage(builder.buildPartial()); 1619 } catch (com.google.protobuf.UninitializedMessageException e) { 1620 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1621 } catch (java.io.IOException e) { 1622 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1623 .setUnfinishedMessage(builder.buildPartial()); 1624 } 1625 return builder.buildPartial(); 1626 } 1627 }; 1628 parser()1629 public static com.google.protobuf.Parser<Location> parser() { 1630 return PARSER; 1631 } 1632 1633 @java.lang.Override getParserForType()1634 public com.google.protobuf.Parser<Location> getParserForType() { 1635 return PARSER; 1636 } 1637 1638 @java.lang.Override getDefaultInstanceForType()1639 public com.google.cloud.talent.v4beta1.Location getDefaultInstanceForType() { 1640 return DEFAULT_INSTANCE; 1641 } 1642 } 1643