• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/v4/common.proto
18 
19 package com.google.cloud.talent.v4;
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.v4.Location}
29  */
30 public final class Location extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.talent.v4.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.v4.CommonProto
57         .internal_static_google_cloud_talent_v4_Location_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.cloud.talent.v4.CommonProto
64         .internal_static_google_cloud_talent_v4_Location_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.cloud.talent.v4.Location.class,
67             com.google.cloud.talent.v4.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.v4.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.v4.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.v4.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.v4.Location.LocationType.NEIGHBORHOOD],
421    * and "Kansas City, KS, USA" has a type of
422    * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
423    * </pre>
424    *
425    * <code>.google.cloud.talent.v4.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.v4.Location.LocationType.NEIGHBORHOOD],
441    * and "Kansas City, KS, USA" has a type of
442    * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
443    * </pre>
444    *
445    * <code>.google.cloud.talent.v4.Location.LocationType location_type = 1;</code>
446    *
447    * @return The locationType.
448    */
449   @java.lang.Override
getLocationType()450   public com.google.cloud.talent.v4.Location.LocationType getLocationType() {
451     com.google.cloud.talent.v4.Location.LocationType result =
452         com.google.cloud.talent.v4.Location.LocationType.forNumber(locationType_);
453     return result == null ? com.google.cloud.talent.v4.Location.LocationType.UNRECOGNIZED : result;
454   }
455 
456   public static final int POSTAL_ADDRESS_FIELD_NUMBER = 2;
457   private com.google.type.PostalAddress postalAddress_;
458   /**
459    *
460    *
461    * <pre>
462    * Postal address of the location that includes human readable information,
463    * such as postal delivery and payments addresses. Given a postal address,
464    * a postal service can deliver items to a premises, P.O. Box, or other
465    * delivery location.
466    * </pre>
467    *
468    * <code>.google.type.PostalAddress postal_address = 2;</code>
469    *
470    * @return Whether the postalAddress field is set.
471    */
472   @java.lang.Override
hasPostalAddress()473   public boolean hasPostalAddress() {
474     return postalAddress_ != null;
475   }
476   /**
477    *
478    *
479    * <pre>
480    * Postal address of the location that includes human readable information,
481    * such as postal delivery and payments addresses. Given a postal address,
482    * a postal service can deliver items to a premises, P.O. Box, or other
483    * delivery location.
484    * </pre>
485    *
486    * <code>.google.type.PostalAddress postal_address = 2;</code>
487    *
488    * @return The postalAddress.
489    */
490   @java.lang.Override
getPostalAddress()491   public com.google.type.PostalAddress getPostalAddress() {
492     return postalAddress_ == null
493         ? com.google.type.PostalAddress.getDefaultInstance()
494         : postalAddress_;
495   }
496   /**
497    *
498    *
499    * <pre>
500    * Postal address of the location that includes human readable information,
501    * such as postal delivery and payments addresses. Given a postal address,
502    * a postal service can deliver items to a premises, P.O. Box, or other
503    * delivery location.
504    * </pre>
505    *
506    * <code>.google.type.PostalAddress postal_address = 2;</code>
507    */
508   @java.lang.Override
getPostalAddressOrBuilder()509   public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() {
510     return postalAddress_ == null
511         ? com.google.type.PostalAddress.getDefaultInstance()
512         : postalAddress_;
513   }
514 
515   public static final int LAT_LNG_FIELD_NUMBER = 3;
516   private com.google.type.LatLng latLng_;
517   /**
518    *
519    *
520    * <pre>
521    * An object representing a latitude/longitude pair.
522    * </pre>
523    *
524    * <code>.google.type.LatLng lat_lng = 3;</code>
525    *
526    * @return Whether the latLng field is set.
527    */
528   @java.lang.Override
hasLatLng()529   public boolean hasLatLng() {
530     return latLng_ != null;
531   }
532   /**
533    *
534    *
535    * <pre>
536    * An object representing a latitude/longitude pair.
537    * </pre>
538    *
539    * <code>.google.type.LatLng lat_lng = 3;</code>
540    *
541    * @return The latLng.
542    */
543   @java.lang.Override
getLatLng()544   public com.google.type.LatLng getLatLng() {
545     return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_;
546   }
547   /**
548    *
549    *
550    * <pre>
551    * An object representing a latitude/longitude pair.
552    * </pre>
553    *
554    * <code>.google.type.LatLng lat_lng = 3;</code>
555    */
556   @java.lang.Override
getLatLngOrBuilder()557   public com.google.type.LatLngOrBuilder getLatLngOrBuilder() {
558     return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_;
559   }
560 
561   public static final int RADIUS_MILES_FIELD_NUMBER = 4;
562   private double radiusMiles_ = 0D;
563   /**
564    *
565    *
566    * <pre>
567    * Radius in miles of the job location. This value is derived from the
568    * location bounding box in which a circle with the specified radius
569    * centered from [google.type.LatLng][google.type.LatLng] covers the area
570    * associated with the job location. For example, currently, "Mountain View,
571    * CA, USA" has a radius of 6.17 miles.
572    * </pre>
573    *
574    * <code>double radius_miles = 4;</code>
575    *
576    * @return The radiusMiles.
577    */
578   @java.lang.Override
getRadiusMiles()579   public double getRadiusMiles() {
580     return radiusMiles_;
581   }
582 
583   private byte memoizedIsInitialized = -1;
584 
585   @java.lang.Override
isInitialized()586   public final boolean isInitialized() {
587     byte isInitialized = memoizedIsInitialized;
588     if (isInitialized == 1) return true;
589     if (isInitialized == 0) return false;
590 
591     memoizedIsInitialized = 1;
592     return true;
593   }
594 
595   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)596   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
597     if (locationType_
598         != com.google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED.getNumber()) {
599       output.writeEnum(1, locationType_);
600     }
601     if (postalAddress_ != null) {
602       output.writeMessage(2, getPostalAddress());
603     }
604     if (latLng_ != null) {
605       output.writeMessage(3, getLatLng());
606     }
607     if (java.lang.Double.doubleToRawLongBits(radiusMiles_) != 0) {
608       output.writeDouble(4, radiusMiles_);
609     }
610     getUnknownFields().writeTo(output);
611   }
612 
613   @java.lang.Override
getSerializedSize()614   public int getSerializedSize() {
615     int size = memoizedSize;
616     if (size != -1) return size;
617 
618     size = 0;
619     if (locationType_
620         != com.google.cloud.talent.v4.Location.LocationType.LOCATION_TYPE_UNSPECIFIED.getNumber()) {
621       size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, locationType_);
622     }
623     if (postalAddress_ != null) {
624       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPostalAddress());
625     }
626     if (latLng_ != null) {
627       size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLatLng());
628     }
629     if (java.lang.Double.doubleToRawLongBits(radiusMiles_) != 0) {
630       size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, radiusMiles_);
631     }
632     size += getUnknownFields().getSerializedSize();
633     memoizedSize = size;
634     return size;
635   }
636 
637   @java.lang.Override
equals(final java.lang.Object obj)638   public boolean equals(final java.lang.Object obj) {
639     if (obj == this) {
640       return true;
641     }
642     if (!(obj instanceof com.google.cloud.talent.v4.Location)) {
643       return super.equals(obj);
644     }
645     com.google.cloud.talent.v4.Location other = (com.google.cloud.talent.v4.Location) obj;
646 
647     if (locationType_ != other.locationType_) return false;
648     if (hasPostalAddress() != other.hasPostalAddress()) return false;
649     if (hasPostalAddress()) {
650       if (!getPostalAddress().equals(other.getPostalAddress())) return false;
651     }
652     if (hasLatLng() != other.hasLatLng()) return false;
653     if (hasLatLng()) {
654       if (!getLatLng().equals(other.getLatLng())) return false;
655     }
656     if (java.lang.Double.doubleToLongBits(getRadiusMiles())
657         != java.lang.Double.doubleToLongBits(other.getRadiusMiles())) return false;
658     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
659     return true;
660   }
661 
662   @java.lang.Override
hashCode()663   public int hashCode() {
664     if (memoizedHashCode != 0) {
665       return memoizedHashCode;
666     }
667     int hash = 41;
668     hash = (19 * hash) + getDescriptor().hashCode();
669     hash = (37 * hash) + LOCATION_TYPE_FIELD_NUMBER;
670     hash = (53 * hash) + locationType_;
671     if (hasPostalAddress()) {
672       hash = (37 * hash) + POSTAL_ADDRESS_FIELD_NUMBER;
673       hash = (53 * hash) + getPostalAddress().hashCode();
674     }
675     if (hasLatLng()) {
676       hash = (37 * hash) + LAT_LNG_FIELD_NUMBER;
677       hash = (53 * hash) + getLatLng().hashCode();
678     }
679     hash = (37 * hash) + RADIUS_MILES_FIELD_NUMBER;
680     hash =
681         (53 * hash)
682             + com.google.protobuf.Internal.hashLong(
683                 java.lang.Double.doubleToLongBits(getRadiusMiles()));
684     hash = (29 * hash) + getUnknownFields().hashCode();
685     memoizedHashCode = hash;
686     return hash;
687   }
688 
parseFrom(java.nio.ByteBuffer data)689   public static com.google.cloud.talent.v4.Location parseFrom(java.nio.ByteBuffer data)
690       throws com.google.protobuf.InvalidProtocolBufferException {
691     return PARSER.parseFrom(data);
692   }
693 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)694   public static com.google.cloud.talent.v4.Location parseFrom(
695       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
696       throws com.google.protobuf.InvalidProtocolBufferException {
697     return PARSER.parseFrom(data, extensionRegistry);
698   }
699 
parseFrom(com.google.protobuf.ByteString data)700   public static com.google.cloud.talent.v4.Location parseFrom(com.google.protobuf.ByteString data)
701       throws com.google.protobuf.InvalidProtocolBufferException {
702     return PARSER.parseFrom(data);
703   }
704 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)705   public static com.google.cloud.talent.v4.Location parseFrom(
706       com.google.protobuf.ByteString data,
707       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
708       throws com.google.protobuf.InvalidProtocolBufferException {
709     return PARSER.parseFrom(data, extensionRegistry);
710   }
711 
parseFrom(byte[] data)712   public static com.google.cloud.talent.v4.Location parseFrom(byte[] data)
713       throws com.google.protobuf.InvalidProtocolBufferException {
714     return PARSER.parseFrom(data);
715   }
716 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)717   public static com.google.cloud.talent.v4.Location parseFrom(
718       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
719       throws com.google.protobuf.InvalidProtocolBufferException {
720     return PARSER.parseFrom(data, extensionRegistry);
721   }
722 
parseFrom(java.io.InputStream input)723   public static com.google.cloud.talent.v4.Location parseFrom(java.io.InputStream input)
724       throws java.io.IOException {
725     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
726   }
727 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)728   public static com.google.cloud.talent.v4.Location parseFrom(
729       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
730       throws java.io.IOException {
731     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
732         PARSER, input, extensionRegistry);
733   }
734 
parseDelimitedFrom(java.io.InputStream input)735   public static com.google.cloud.talent.v4.Location parseDelimitedFrom(java.io.InputStream input)
736       throws java.io.IOException {
737     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
738   }
739 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)740   public static com.google.cloud.talent.v4.Location parseDelimitedFrom(
741       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
742       throws java.io.IOException {
743     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
744         PARSER, input, extensionRegistry);
745   }
746 
parseFrom( com.google.protobuf.CodedInputStream input)747   public static com.google.cloud.talent.v4.Location parseFrom(
748       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
749     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
750   }
751 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)752   public static com.google.cloud.talent.v4.Location parseFrom(
753       com.google.protobuf.CodedInputStream input,
754       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
755       throws java.io.IOException {
756     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
757         PARSER, input, extensionRegistry);
758   }
759 
760   @java.lang.Override
newBuilderForType()761   public Builder newBuilderForType() {
762     return newBuilder();
763   }
764 
newBuilder()765   public static Builder newBuilder() {
766     return DEFAULT_INSTANCE.toBuilder();
767   }
768 
newBuilder(com.google.cloud.talent.v4.Location prototype)769   public static Builder newBuilder(com.google.cloud.talent.v4.Location prototype) {
770     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
771   }
772 
773   @java.lang.Override
toBuilder()774   public Builder toBuilder() {
775     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
776   }
777 
778   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)779   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
780     Builder builder = new Builder(parent);
781     return builder;
782   }
783   /**
784    *
785    *
786    * <pre>
787    * A resource that represents a location with full geographic information.
788    * </pre>
789    *
790    * Protobuf type {@code google.cloud.talent.v4.Location}
791    */
792   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
793       implements
794       // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4.Location)
795       com.google.cloud.talent.v4.LocationOrBuilder {
getDescriptor()796     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
797       return com.google.cloud.talent.v4.CommonProto
798           .internal_static_google_cloud_talent_v4_Location_descriptor;
799     }
800 
801     @java.lang.Override
802     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()803         internalGetFieldAccessorTable() {
804       return com.google.cloud.talent.v4.CommonProto
805           .internal_static_google_cloud_talent_v4_Location_fieldAccessorTable
806           .ensureFieldAccessorsInitialized(
807               com.google.cloud.talent.v4.Location.class,
808               com.google.cloud.talent.v4.Location.Builder.class);
809     }
810 
811     // Construct using com.google.cloud.talent.v4.Location.newBuilder()
Builder()812     private Builder() {}
813 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)814     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
815       super(parent);
816     }
817 
818     @java.lang.Override
clear()819     public Builder clear() {
820       super.clear();
821       bitField0_ = 0;
822       locationType_ = 0;
823       postalAddress_ = null;
824       if (postalAddressBuilder_ != null) {
825         postalAddressBuilder_.dispose();
826         postalAddressBuilder_ = null;
827       }
828       latLng_ = null;
829       if (latLngBuilder_ != null) {
830         latLngBuilder_.dispose();
831         latLngBuilder_ = null;
832       }
833       radiusMiles_ = 0D;
834       return this;
835     }
836 
837     @java.lang.Override
getDescriptorForType()838     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
839       return com.google.cloud.talent.v4.CommonProto
840           .internal_static_google_cloud_talent_v4_Location_descriptor;
841     }
842 
843     @java.lang.Override
getDefaultInstanceForType()844     public com.google.cloud.talent.v4.Location getDefaultInstanceForType() {
845       return com.google.cloud.talent.v4.Location.getDefaultInstance();
846     }
847 
848     @java.lang.Override
build()849     public com.google.cloud.talent.v4.Location build() {
850       com.google.cloud.talent.v4.Location result = buildPartial();
851       if (!result.isInitialized()) {
852         throw newUninitializedMessageException(result);
853       }
854       return result;
855     }
856 
857     @java.lang.Override
buildPartial()858     public com.google.cloud.talent.v4.Location buildPartial() {
859       com.google.cloud.talent.v4.Location result = new com.google.cloud.talent.v4.Location(this);
860       if (bitField0_ != 0) {
861         buildPartial0(result);
862       }
863       onBuilt();
864       return result;
865     }
866 
buildPartial0(com.google.cloud.talent.v4.Location result)867     private void buildPartial0(com.google.cloud.talent.v4.Location result) {
868       int from_bitField0_ = bitField0_;
869       if (((from_bitField0_ & 0x00000001) != 0)) {
870         result.locationType_ = locationType_;
871       }
872       if (((from_bitField0_ & 0x00000002) != 0)) {
873         result.postalAddress_ =
874             postalAddressBuilder_ == null ? postalAddress_ : postalAddressBuilder_.build();
875       }
876       if (((from_bitField0_ & 0x00000004) != 0)) {
877         result.latLng_ = latLngBuilder_ == null ? latLng_ : latLngBuilder_.build();
878       }
879       if (((from_bitField0_ & 0x00000008) != 0)) {
880         result.radiusMiles_ = radiusMiles_;
881       }
882     }
883 
884     @java.lang.Override
clone()885     public Builder clone() {
886       return super.clone();
887     }
888 
889     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)890     public Builder setField(
891         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
892       return super.setField(field, value);
893     }
894 
895     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)896     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
897       return super.clearField(field);
898     }
899 
900     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)901     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
902       return super.clearOneof(oneof);
903     }
904 
905     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)906     public Builder setRepeatedField(
907         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
908       return super.setRepeatedField(field, index, value);
909     }
910 
911     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)912     public Builder addRepeatedField(
913         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
914       return super.addRepeatedField(field, value);
915     }
916 
917     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)918     public Builder mergeFrom(com.google.protobuf.Message other) {
919       if (other instanceof com.google.cloud.talent.v4.Location) {
920         return mergeFrom((com.google.cloud.talent.v4.Location) other);
921       } else {
922         super.mergeFrom(other);
923         return this;
924       }
925     }
926 
mergeFrom(com.google.cloud.talent.v4.Location other)927     public Builder mergeFrom(com.google.cloud.talent.v4.Location other) {
928       if (other == com.google.cloud.talent.v4.Location.getDefaultInstance()) return this;
929       if (other.locationType_ != 0) {
930         setLocationTypeValue(other.getLocationTypeValue());
931       }
932       if (other.hasPostalAddress()) {
933         mergePostalAddress(other.getPostalAddress());
934       }
935       if (other.hasLatLng()) {
936         mergeLatLng(other.getLatLng());
937       }
938       if (other.getRadiusMiles() != 0D) {
939         setRadiusMiles(other.getRadiusMiles());
940       }
941       this.mergeUnknownFields(other.getUnknownFields());
942       onChanged();
943       return this;
944     }
945 
946     @java.lang.Override
isInitialized()947     public final boolean isInitialized() {
948       return true;
949     }
950 
951     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)952     public Builder mergeFrom(
953         com.google.protobuf.CodedInputStream input,
954         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
955         throws java.io.IOException {
956       if (extensionRegistry == null) {
957         throw new java.lang.NullPointerException();
958       }
959       try {
960         boolean done = false;
961         while (!done) {
962           int tag = input.readTag();
963           switch (tag) {
964             case 0:
965               done = true;
966               break;
967             case 8:
968               {
969                 locationType_ = input.readEnum();
970                 bitField0_ |= 0x00000001;
971                 break;
972               } // case 8
973             case 18:
974               {
975                 input.readMessage(getPostalAddressFieldBuilder().getBuilder(), extensionRegistry);
976                 bitField0_ |= 0x00000002;
977                 break;
978               } // case 18
979             case 26:
980               {
981                 input.readMessage(getLatLngFieldBuilder().getBuilder(), extensionRegistry);
982                 bitField0_ |= 0x00000004;
983                 break;
984               } // case 26
985             case 33:
986               {
987                 radiusMiles_ = input.readDouble();
988                 bitField0_ |= 0x00000008;
989                 break;
990               } // case 33
991             default:
992               {
993                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
994                   done = true; // was an endgroup tag
995                 }
996                 break;
997               } // default:
998           } // switch (tag)
999         } // while (!done)
1000       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1001         throw e.unwrapIOException();
1002       } finally {
1003         onChanged();
1004       } // finally
1005       return this;
1006     }
1007 
1008     private int bitField0_;
1009 
1010     private int locationType_ = 0;
1011     /**
1012      *
1013      *
1014      * <pre>
1015      * The type of a location, which corresponds to the address lines field of
1016      * [google.type.PostalAddress][google.type.PostalAddress]. For example,
1017      * "Downtown, Atlanta, GA, USA" has a type of
1018      * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
1019      * and "Kansas City, KS, USA" has a type of
1020      * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
1021      * </pre>
1022      *
1023      * <code>.google.cloud.talent.v4.Location.LocationType location_type = 1;</code>
1024      *
1025      * @return The enum numeric value on the wire for locationType.
1026      */
1027     @java.lang.Override
getLocationTypeValue()1028     public int getLocationTypeValue() {
1029       return locationType_;
1030     }
1031     /**
1032      *
1033      *
1034      * <pre>
1035      * The type of a location, which corresponds to the address lines field of
1036      * [google.type.PostalAddress][google.type.PostalAddress]. For example,
1037      * "Downtown, Atlanta, GA, USA" has a type of
1038      * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
1039      * and "Kansas City, KS, USA" has a type of
1040      * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
1041      * </pre>
1042      *
1043      * <code>.google.cloud.talent.v4.Location.LocationType location_type = 1;</code>
1044      *
1045      * @param value The enum numeric value on the wire for locationType to set.
1046      * @return This builder for chaining.
1047      */
setLocationTypeValue(int value)1048     public Builder setLocationTypeValue(int value) {
1049       locationType_ = value;
1050       bitField0_ |= 0x00000001;
1051       onChanged();
1052       return this;
1053     }
1054     /**
1055      *
1056      *
1057      * <pre>
1058      * The type of a location, which corresponds to the address lines field of
1059      * [google.type.PostalAddress][google.type.PostalAddress]. For example,
1060      * "Downtown, Atlanta, GA, USA" has a type of
1061      * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
1062      * and "Kansas City, KS, USA" has a type of
1063      * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
1064      * </pre>
1065      *
1066      * <code>.google.cloud.talent.v4.Location.LocationType location_type = 1;</code>
1067      *
1068      * @return The locationType.
1069      */
1070     @java.lang.Override
getLocationType()1071     public com.google.cloud.talent.v4.Location.LocationType getLocationType() {
1072       com.google.cloud.talent.v4.Location.LocationType result =
1073           com.google.cloud.talent.v4.Location.LocationType.forNumber(locationType_);
1074       return result == null
1075           ? com.google.cloud.talent.v4.Location.LocationType.UNRECOGNIZED
1076           : result;
1077     }
1078     /**
1079      *
1080      *
1081      * <pre>
1082      * The type of a location, which corresponds to the address lines field of
1083      * [google.type.PostalAddress][google.type.PostalAddress]. For example,
1084      * "Downtown, Atlanta, GA, USA" has a type of
1085      * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
1086      * and "Kansas City, KS, USA" has a type of
1087      * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
1088      * </pre>
1089      *
1090      * <code>.google.cloud.talent.v4.Location.LocationType location_type = 1;</code>
1091      *
1092      * @param value The locationType to set.
1093      * @return This builder for chaining.
1094      */
setLocationType(com.google.cloud.talent.v4.Location.LocationType value)1095     public Builder setLocationType(com.google.cloud.talent.v4.Location.LocationType value) {
1096       if (value == null) {
1097         throw new NullPointerException();
1098       }
1099       bitField0_ |= 0x00000001;
1100       locationType_ = value.getNumber();
1101       onChanged();
1102       return this;
1103     }
1104     /**
1105      *
1106      *
1107      * <pre>
1108      * The type of a location, which corresponds to the address lines field of
1109      * [google.type.PostalAddress][google.type.PostalAddress]. For example,
1110      * "Downtown, Atlanta, GA, USA" has a type of
1111      * [LocationType.NEIGHBORHOOD][google.cloud.talent.v4.Location.LocationType.NEIGHBORHOOD],
1112      * and "Kansas City, KS, USA" has a type of
1113      * [LocationType.LOCALITY][google.cloud.talent.v4.Location.LocationType.LOCALITY].
1114      * </pre>
1115      *
1116      * <code>.google.cloud.talent.v4.Location.LocationType location_type = 1;</code>
1117      *
1118      * @return This builder for chaining.
1119      */
clearLocationType()1120     public Builder clearLocationType() {
1121       bitField0_ = (bitField0_ & ~0x00000001);
1122       locationType_ = 0;
1123       onChanged();
1124       return this;
1125     }
1126 
1127     private com.google.type.PostalAddress postalAddress_;
1128     private com.google.protobuf.SingleFieldBuilderV3<
1129             com.google.type.PostalAddress,
1130             com.google.type.PostalAddress.Builder,
1131             com.google.type.PostalAddressOrBuilder>
1132         postalAddressBuilder_;
1133     /**
1134      *
1135      *
1136      * <pre>
1137      * Postal address of the location that includes human readable information,
1138      * such as postal delivery and payments addresses. Given a postal address,
1139      * a postal service can deliver items to a premises, P.O. Box, or other
1140      * delivery location.
1141      * </pre>
1142      *
1143      * <code>.google.type.PostalAddress postal_address = 2;</code>
1144      *
1145      * @return Whether the postalAddress field is set.
1146      */
hasPostalAddress()1147     public boolean hasPostalAddress() {
1148       return ((bitField0_ & 0x00000002) != 0);
1149     }
1150     /**
1151      *
1152      *
1153      * <pre>
1154      * Postal address of the location that includes human readable information,
1155      * such as postal delivery and payments addresses. Given a postal address,
1156      * a postal service can deliver items to a premises, P.O. Box, or other
1157      * delivery location.
1158      * </pre>
1159      *
1160      * <code>.google.type.PostalAddress postal_address = 2;</code>
1161      *
1162      * @return The postalAddress.
1163      */
getPostalAddress()1164     public com.google.type.PostalAddress getPostalAddress() {
1165       if (postalAddressBuilder_ == null) {
1166         return postalAddress_ == null
1167             ? com.google.type.PostalAddress.getDefaultInstance()
1168             : postalAddress_;
1169       } else {
1170         return postalAddressBuilder_.getMessage();
1171       }
1172     }
1173     /**
1174      *
1175      *
1176      * <pre>
1177      * Postal address of the location that includes human readable information,
1178      * such as postal delivery and payments addresses. Given a postal address,
1179      * a postal service can deliver items to a premises, P.O. Box, or other
1180      * delivery location.
1181      * </pre>
1182      *
1183      * <code>.google.type.PostalAddress postal_address = 2;</code>
1184      */
setPostalAddress(com.google.type.PostalAddress value)1185     public Builder setPostalAddress(com.google.type.PostalAddress value) {
1186       if (postalAddressBuilder_ == null) {
1187         if (value == null) {
1188           throw new NullPointerException();
1189         }
1190         postalAddress_ = value;
1191       } else {
1192         postalAddressBuilder_.setMessage(value);
1193       }
1194       bitField0_ |= 0x00000002;
1195       onChanged();
1196       return this;
1197     }
1198     /**
1199      *
1200      *
1201      * <pre>
1202      * Postal address of the location that includes human readable information,
1203      * such as postal delivery and payments addresses. Given a postal address,
1204      * a postal service can deliver items to a premises, P.O. Box, or other
1205      * delivery location.
1206      * </pre>
1207      *
1208      * <code>.google.type.PostalAddress postal_address = 2;</code>
1209      */
setPostalAddress(com.google.type.PostalAddress.Builder builderForValue)1210     public Builder setPostalAddress(com.google.type.PostalAddress.Builder builderForValue) {
1211       if (postalAddressBuilder_ == null) {
1212         postalAddress_ = builderForValue.build();
1213       } else {
1214         postalAddressBuilder_.setMessage(builderForValue.build());
1215       }
1216       bitField0_ |= 0x00000002;
1217       onChanged();
1218       return this;
1219     }
1220     /**
1221      *
1222      *
1223      * <pre>
1224      * Postal address of the location that includes human readable information,
1225      * such as postal delivery and payments addresses. Given a postal address,
1226      * a postal service can deliver items to a premises, P.O. Box, or other
1227      * delivery location.
1228      * </pre>
1229      *
1230      * <code>.google.type.PostalAddress postal_address = 2;</code>
1231      */
mergePostalAddress(com.google.type.PostalAddress value)1232     public Builder mergePostalAddress(com.google.type.PostalAddress value) {
1233       if (postalAddressBuilder_ == null) {
1234         if (((bitField0_ & 0x00000002) != 0)
1235             && postalAddress_ != null
1236             && postalAddress_ != com.google.type.PostalAddress.getDefaultInstance()) {
1237           getPostalAddressBuilder().mergeFrom(value);
1238         } else {
1239           postalAddress_ = value;
1240         }
1241       } else {
1242         postalAddressBuilder_.mergeFrom(value);
1243       }
1244       bitField0_ |= 0x00000002;
1245       onChanged();
1246       return this;
1247     }
1248     /**
1249      *
1250      *
1251      * <pre>
1252      * Postal address of the location that includes human readable information,
1253      * such as postal delivery and payments addresses. Given a postal address,
1254      * a postal service can deliver items to a premises, P.O. Box, or other
1255      * delivery location.
1256      * </pre>
1257      *
1258      * <code>.google.type.PostalAddress postal_address = 2;</code>
1259      */
clearPostalAddress()1260     public Builder clearPostalAddress() {
1261       bitField0_ = (bitField0_ & ~0x00000002);
1262       postalAddress_ = null;
1263       if (postalAddressBuilder_ != null) {
1264         postalAddressBuilder_.dispose();
1265         postalAddressBuilder_ = null;
1266       }
1267       onChanged();
1268       return this;
1269     }
1270     /**
1271      *
1272      *
1273      * <pre>
1274      * Postal address of the location that includes human readable information,
1275      * such as postal delivery and payments addresses. Given a postal address,
1276      * a postal service can deliver items to a premises, P.O. Box, or other
1277      * delivery location.
1278      * </pre>
1279      *
1280      * <code>.google.type.PostalAddress postal_address = 2;</code>
1281      */
getPostalAddressBuilder()1282     public com.google.type.PostalAddress.Builder getPostalAddressBuilder() {
1283       bitField0_ |= 0x00000002;
1284       onChanged();
1285       return getPostalAddressFieldBuilder().getBuilder();
1286     }
1287     /**
1288      *
1289      *
1290      * <pre>
1291      * Postal address of the location that includes human readable information,
1292      * such as postal delivery and payments addresses. Given a postal address,
1293      * a postal service can deliver items to a premises, P.O. Box, or other
1294      * delivery location.
1295      * </pre>
1296      *
1297      * <code>.google.type.PostalAddress postal_address = 2;</code>
1298      */
getPostalAddressOrBuilder()1299     public com.google.type.PostalAddressOrBuilder getPostalAddressOrBuilder() {
1300       if (postalAddressBuilder_ != null) {
1301         return postalAddressBuilder_.getMessageOrBuilder();
1302       } else {
1303         return postalAddress_ == null
1304             ? com.google.type.PostalAddress.getDefaultInstance()
1305             : postalAddress_;
1306       }
1307     }
1308     /**
1309      *
1310      *
1311      * <pre>
1312      * Postal address of the location that includes human readable information,
1313      * such as postal delivery and payments addresses. Given a postal address,
1314      * a postal service can deliver items to a premises, P.O. Box, or other
1315      * delivery location.
1316      * </pre>
1317      *
1318      * <code>.google.type.PostalAddress postal_address = 2;</code>
1319      */
1320     private com.google.protobuf.SingleFieldBuilderV3<
1321             com.google.type.PostalAddress,
1322             com.google.type.PostalAddress.Builder,
1323             com.google.type.PostalAddressOrBuilder>
getPostalAddressFieldBuilder()1324         getPostalAddressFieldBuilder() {
1325       if (postalAddressBuilder_ == null) {
1326         postalAddressBuilder_ =
1327             new com.google.protobuf.SingleFieldBuilderV3<
1328                 com.google.type.PostalAddress,
1329                 com.google.type.PostalAddress.Builder,
1330                 com.google.type.PostalAddressOrBuilder>(
1331                 getPostalAddress(), getParentForChildren(), isClean());
1332         postalAddress_ = null;
1333       }
1334       return postalAddressBuilder_;
1335     }
1336 
1337     private com.google.type.LatLng latLng_;
1338     private com.google.protobuf.SingleFieldBuilderV3<
1339             com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>
1340         latLngBuilder_;
1341     /**
1342      *
1343      *
1344      * <pre>
1345      * An object representing a latitude/longitude pair.
1346      * </pre>
1347      *
1348      * <code>.google.type.LatLng lat_lng = 3;</code>
1349      *
1350      * @return Whether the latLng field is set.
1351      */
hasLatLng()1352     public boolean hasLatLng() {
1353       return ((bitField0_ & 0x00000004) != 0);
1354     }
1355     /**
1356      *
1357      *
1358      * <pre>
1359      * An object representing a latitude/longitude pair.
1360      * </pre>
1361      *
1362      * <code>.google.type.LatLng lat_lng = 3;</code>
1363      *
1364      * @return The latLng.
1365      */
getLatLng()1366     public com.google.type.LatLng getLatLng() {
1367       if (latLngBuilder_ == null) {
1368         return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_;
1369       } else {
1370         return latLngBuilder_.getMessage();
1371       }
1372     }
1373     /**
1374      *
1375      *
1376      * <pre>
1377      * An object representing a latitude/longitude pair.
1378      * </pre>
1379      *
1380      * <code>.google.type.LatLng lat_lng = 3;</code>
1381      */
setLatLng(com.google.type.LatLng value)1382     public Builder setLatLng(com.google.type.LatLng value) {
1383       if (latLngBuilder_ == null) {
1384         if (value == null) {
1385           throw new NullPointerException();
1386         }
1387         latLng_ = value;
1388       } else {
1389         latLngBuilder_.setMessage(value);
1390       }
1391       bitField0_ |= 0x00000004;
1392       onChanged();
1393       return this;
1394     }
1395     /**
1396      *
1397      *
1398      * <pre>
1399      * An object representing a latitude/longitude pair.
1400      * </pre>
1401      *
1402      * <code>.google.type.LatLng lat_lng = 3;</code>
1403      */
setLatLng(com.google.type.LatLng.Builder builderForValue)1404     public Builder setLatLng(com.google.type.LatLng.Builder builderForValue) {
1405       if (latLngBuilder_ == null) {
1406         latLng_ = builderForValue.build();
1407       } else {
1408         latLngBuilder_.setMessage(builderForValue.build());
1409       }
1410       bitField0_ |= 0x00000004;
1411       onChanged();
1412       return this;
1413     }
1414     /**
1415      *
1416      *
1417      * <pre>
1418      * An object representing a latitude/longitude pair.
1419      * </pre>
1420      *
1421      * <code>.google.type.LatLng lat_lng = 3;</code>
1422      */
mergeLatLng(com.google.type.LatLng value)1423     public Builder mergeLatLng(com.google.type.LatLng value) {
1424       if (latLngBuilder_ == null) {
1425         if (((bitField0_ & 0x00000004) != 0)
1426             && latLng_ != null
1427             && latLng_ != com.google.type.LatLng.getDefaultInstance()) {
1428           getLatLngBuilder().mergeFrom(value);
1429         } else {
1430           latLng_ = value;
1431         }
1432       } else {
1433         latLngBuilder_.mergeFrom(value);
1434       }
1435       bitField0_ |= 0x00000004;
1436       onChanged();
1437       return this;
1438     }
1439     /**
1440      *
1441      *
1442      * <pre>
1443      * An object representing a latitude/longitude pair.
1444      * </pre>
1445      *
1446      * <code>.google.type.LatLng lat_lng = 3;</code>
1447      */
clearLatLng()1448     public Builder clearLatLng() {
1449       bitField0_ = (bitField0_ & ~0x00000004);
1450       latLng_ = null;
1451       if (latLngBuilder_ != null) {
1452         latLngBuilder_.dispose();
1453         latLngBuilder_ = null;
1454       }
1455       onChanged();
1456       return this;
1457     }
1458     /**
1459      *
1460      *
1461      * <pre>
1462      * An object representing a latitude/longitude pair.
1463      * </pre>
1464      *
1465      * <code>.google.type.LatLng lat_lng = 3;</code>
1466      */
getLatLngBuilder()1467     public com.google.type.LatLng.Builder getLatLngBuilder() {
1468       bitField0_ |= 0x00000004;
1469       onChanged();
1470       return getLatLngFieldBuilder().getBuilder();
1471     }
1472     /**
1473      *
1474      *
1475      * <pre>
1476      * An object representing a latitude/longitude pair.
1477      * </pre>
1478      *
1479      * <code>.google.type.LatLng lat_lng = 3;</code>
1480      */
getLatLngOrBuilder()1481     public com.google.type.LatLngOrBuilder getLatLngOrBuilder() {
1482       if (latLngBuilder_ != null) {
1483         return latLngBuilder_.getMessageOrBuilder();
1484       } else {
1485         return latLng_ == null ? com.google.type.LatLng.getDefaultInstance() : latLng_;
1486       }
1487     }
1488     /**
1489      *
1490      *
1491      * <pre>
1492      * An object representing a latitude/longitude pair.
1493      * </pre>
1494      *
1495      * <code>.google.type.LatLng lat_lng = 3;</code>
1496      */
1497     private com.google.protobuf.SingleFieldBuilderV3<
1498             com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>
getLatLngFieldBuilder()1499         getLatLngFieldBuilder() {
1500       if (latLngBuilder_ == null) {
1501         latLngBuilder_ =
1502             new com.google.protobuf.SingleFieldBuilderV3<
1503                 com.google.type.LatLng,
1504                 com.google.type.LatLng.Builder,
1505                 com.google.type.LatLngOrBuilder>(getLatLng(), getParentForChildren(), isClean());
1506         latLng_ = null;
1507       }
1508       return latLngBuilder_;
1509     }
1510 
1511     private double radiusMiles_;
1512     /**
1513      *
1514      *
1515      * <pre>
1516      * Radius in miles of the job location. This value is derived from the
1517      * location bounding box in which a circle with the specified radius
1518      * centered from [google.type.LatLng][google.type.LatLng] covers the area
1519      * associated with the job location. For example, currently, "Mountain View,
1520      * CA, USA" has a radius of 6.17 miles.
1521      * </pre>
1522      *
1523      * <code>double radius_miles = 4;</code>
1524      *
1525      * @return The radiusMiles.
1526      */
1527     @java.lang.Override
getRadiusMiles()1528     public double getRadiusMiles() {
1529       return radiusMiles_;
1530     }
1531     /**
1532      *
1533      *
1534      * <pre>
1535      * Radius in miles of the job location. This value is derived from the
1536      * location bounding box in which a circle with the specified radius
1537      * centered from [google.type.LatLng][google.type.LatLng] covers the area
1538      * associated with the job location. For example, currently, "Mountain View,
1539      * CA, USA" has a radius of 6.17 miles.
1540      * </pre>
1541      *
1542      * <code>double radius_miles = 4;</code>
1543      *
1544      * @param value The radiusMiles to set.
1545      * @return This builder for chaining.
1546      */
setRadiusMiles(double value)1547     public Builder setRadiusMiles(double value) {
1548 
1549       radiusMiles_ = value;
1550       bitField0_ |= 0x00000008;
1551       onChanged();
1552       return this;
1553     }
1554     /**
1555      *
1556      *
1557      * <pre>
1558      * Radius in miles of the job location. This value is derived from the
1559      * location bounding box in which a circle with the specified radius
1560      * centered from [google.type.LatLng][google.type.LatLng] covers the area
1561      * associated with the job location. For example, currently, "Mountain View,
1562      * CA, USA" has a radius of 6.17 miles.
1563      * </pre>
1564      *
1565      * <code>double radius_miles = 4;</code>
1566      *
1567      * @return This builder for chaining.
1568      */
clearRadiusMiles()1569     public Builder clearRadiusMiles() {
1570       bitField0_ = (bitField0_ & ~0x00000008);
1571       radiusMiles_ = 0D;
1572       onChanged();
1573       return this;
1574     }
1575 
1576     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1577     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1578       return super.setUnknownFields(unknownFields);
1579     }
1580 
1581     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1582     public final Builder mergeUnknownFields(
1583         final com.google.protobuf.UnknownFieldSet unknownFields) {
1584       return super.mergeUnknownFields(unknownFields);
1585     }
1586 
1587     // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4.Location)
1588   }
1589 
1590   // @@protoc_insertion_point(class_scope:google.cloud.talent.v4.Location)
1591   private static final com.google.cloud.talent.v4.Location DEFAULT_INSTANCE;
1592 
1593   static {
1594     DEFAULT_INSTANCE = new com.google.cloud.talent.v4.Location();
1595   }
1596 
getDefaultInstance()1597   public static com.google.cloud.talent.v4.Location getDefaultInstance() {
1598     return DEFAULT_INSTANCE;
1599   }
1600 
1601   private static final com.google.protobuf.Parser<Location> PARSER =
1602       new com.google.protobuf.AbstractParser<Location>() {
1603         @java.lang.Override
1604         public Location parsePartialFrom(
1605             com.google.protobuf.CodedInputStream input,
1606             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1607             throws com.google.protobuf.InvalidProtocolBufferException {
1608           Builder builder = newBuilder();
1609           try {
1610             builder.mergeFrom(input, extensionRegistry);
1611           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1612             throw e.setUnfinishedMessage(builder.buildPartial());
1613           } catch (com.google.protobuf.UninitializedMessageException e) {
1614             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1615           } catch (java.io.IOException e) {
1616             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1617                 .setUnfinishedMessage(builder.buildPartial());
1618           }
1619           return builder.buildPartial();
1620         }
1621       };
1622 
parser()1623   public static com.google.protobuf.Parser<Location> parser() {
1624     return PARSER;
1625   }
1626 
1627   @java.lang.Override
getParserForType()1628   public com.google.protobuf.Parser<Location> getParserForType() {
1629     return PARSER;
1630   }
1631 
1632   @java.lang.Override
getDefaultInstanceForType()1633   public com.google.cloud.talent.v4.Location getDefaultInstanceForType() {
1634     return DEFAULT_INSTANCE;
1635   }
1636 }
1637