Class Geocode
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.maps.addressvalidation.v1.Geocode
-
- All Implemented Interfaces:
GeocodeOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class Geocode extends com.google.protobuf.GeneratedMessageV3 implements GeocodeOrBuilder
Contains information about the place the input was geocoded to.
Protobuf typegoogle.maps.addressvalidation.v1.Geocode- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeocode.BuilderContains information about the place the input was geocoded to.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intBOUNDS_FIELD_NUMBERstatic intFEATURE_SIZE_METERS_FIELD_NUMBERstatic intLOCATION_FIELD_NUMBERstatic intPLACE_ID_FIELD_NUMBERstatic intPLACE_TYPES_FIELD_NUMBERstatic intPLUS_CODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)com.google.geo.type.ViewportgetBounds()The bounds of the geocoded place.com.google.geo.type.ViewportOrBuildergetBoundsOrBuilder()The bounds of the geocoded place.static GeocodegetDefaultInstance()GeocodegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()floatgetFeatureSizeMeters()The size of the geocoded place, in meters.com.google.type.LatLnggetLocation()The geocoded location of the input.com.google.type.LatLngOrBuildergetLocationOrBuilder()The geocoded location of the input.com.google.protobuf.Parser<Geocode>getParserForType()StringgetPlaceId()The PlaceID of the place this input geocodes to.com.google.protobuf.ByteStringgetPlaceIdBytes()The PlaceID of the place this input geocodes to.StringgetPlaceTypes(int index)The type(s) of place that the input geocoded to.com.google.protobuf.ByteStringgetPlaceTypesBytes(int index)The type(s) of place that the input geocoded to.intgetPlaceTypesCount()The type(s) of place that the input geocoded to.com.google.protobuf.ProtocolStringListgetPlaceTypesList()The type(s) of place that the input geocoded to.PlusCodegetPlusCode()The plus code corresponding to the `location`.PlusCodeOrBuildergetPlusCodeOrBuilder()The plus code corresponding to the `location`.intgetSerializedSize()booleanhasBounds()The bounds of the geocoded place.inthashCode()booleanhasLocation()The geocoded location of the input.booleanhasPlusCode()The plus code corresponding to the `location`.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Geocode.BuildernewBuilder()static Geocode.BuildernewBuilder(Geocode prototype)Geocode.BuildernewBuilderForType()protected Geocode.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static GeocodeparseDelimitedFrom(InputStream input)static GeocodeparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GeocodeparseFrom(byte[] data)static GeocodeparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GeocodeparseFrom(com.google.protobuf.ByteString data)static GeocodeparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GeocodeparseFrom(com.google.protobuf.CodedInputStream input)static GeocodeparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GeocodeparseFrom(InputStream input)static GeocodeparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static GeocodeparseFrom(ByteBuffer data)static GeocodeparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Geocode>parser()Geocode.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
LOCATION_FIELD_NUMBER
public static final int LOCATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PLUS_CODE_FIELD_NUMBER
public static final int PLUS_CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BOUNDS_FIELD_NUMBER
public static final int BOUNDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FEATURE_SIZE_METERS_FIELD_NUMBER
public static final int FEATURE_SIZE_METERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PLACE_ID_FIELD_NUMBER
public static final int PLACE_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PLACE_TYPES_FIELD_NUMBER
public static final int PLACE_TYPES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasLocation
public boolean hasLocation()
The geocoded location of the input. Using place IDs is preferred over using addresses, latitude/longitude coordinates, or plus codes. Using coordinates when routing or calculating driving directions will always result in the point being snapped to the road nearest to those coordinates. This may not be a road that will quickly or safely lead to the destination and may not be near an access point to the property. Additionally, when a location is reverse geocoded, there is no guarantee that the returned address will match the original.
.google.type.LatLng location = 1;- Specified by:
hasLocationin interfaceGeocodeOrBuilder- Returns:
- Whether the location field is set.
-
getLocation
public com.google.type.LatLng getLocation()
The geocoded location of the input. Using place IDs is preferred over using addresses, latitude/longitude coordinates, or plus codes. Using coordinates when routing or calculating driving directions will always result in the point being snapped to the road nearest to those coordinates. This may not be a road that will quickly or safely lead to the destination and may not be near an access point to the property. Additionally, when a location is reverse geocoded, there is no guarantee that the returned address will match the original.
.google.type.LatLng location = 1;- Specified by:
getLocationin interfaceGeocodeOrBuilder- Returns:
- The location.
-
getLocationOrBuilder
public com.google.type.LatLngOrBuilder getLocationOrBuilder()
The geocoded location of the input. Using place IDs is preferred over using addresses, latitude/longitude coordinates, or plus codes. Using coordinates when routing or calculating driving directions will always result in the point being snapped to the road nearest to those coordinates. This may not be a road that will quickly or safely lead to the destination and may not be near an access point to the property. Additionally, when a location is reverse geocoded, there is no guarantee that the returned address will match the original.
.google.type.LatLng location = 1;- Specified by:
getLocationOrBuilderin interfaceGeocodeOrBuilder
-
hasPlusCode
public boolean hasPlusCode()
The plus code corresponding to the `location`.
.google.maps.addressvalidation.v1.PlusCode plus_code = 2;- Specified by:
hasPlusCodein interfaceGeocodeOrBuilder- Returns:
- Whether the plusCode field is set.
-
getPlusCode
public PlusCode getPlusCode()
The plus code corresponding to the `location`.
.google.maps.addressvalidation.v1.PlusCode plus_code = 2;- Specified by:
getPlusCodein interfaceGeocodeOrBuilder- Returns:
- The plusCode.
-
getPlusCodeOrBuilder
public PlusCodeOrBuilder getPlusCodeOrBuilder()
The plus code corresponding to the `location`.
.google.maps.addressvalidation.v1.PlusCode plus_code = 2;- Specified by:
getPlusCodeOrBuilderin interfaceGeocodeOrBuilder
-
hasBounds
public boolean hasBounds()
The bounds of the geocoded place.
.google.geo.type.Viewport bounds = 4;- Specified by:
hasBoundsin interfaceGeocodeOrBuilder- Returns:
- Whether the bounds field is set.
-
getBounds
public com.google.geo.type.Viewport getBounds()
The bounds of the geocoded place.
.google.geo.type.Viewport bounds = 4;- Specified by:
getBoundsin interfaceGeocodeOrBuilder- Returns:
- The bounds.
-
getBoundsOrBuilder
public com.google.geo.type.ViewportOrBuilder getBoundsOrBuilder()
The bounds of the geocoded place.
.google.geo.type.Viewport bounds = 4;- Specified by:
getBoundsOrBuilderin interfaceGeocodeOrBuilder
-
getFeatureSizeMeters
public float getFeatureSizeMeters()
The size of the geocoded place, in meters. This is another measure of the coarseness of the geocoded location, but in physical size rather than in semantic meaning.
float feature_size_meters = 5;- Specified by:
getFeatureSizeMetersin interfaceGeocodeOrBuilder- Returns:
- The featureSizeMeters.
-
getPlaceId
public String getPlaceId()
The PlaceID of the place this input geocodes to. For more information about Place IDs see [here](https://developers.google.com/maps/documentation/places/web-service/place-id).
string place_id = 6;- Specified by:
getPlaceIdin interfaceGeocodeOrBuilder- Returns:
- The placeId.
-
getPlaceIdBytes
public com.google.protobuf.ByteString getPlaceIdBytes()
The PlaceID of the place this input geocodes to. For more information about Place IDs see [here](https://developers.google.com/maps/documentation/places/web-service/place-id).
string place_id = 6;- Specified by:
getPlaceIdBytesin interfaceGeocodeOrBuilder- Returns:
- The bytes for placeId.
-
getPlaceTypesList
public com.google.protobuf.ProtocolStringList getPlaceTypesList()
The type(s) of place that the input geocoded to. For example, `['locality', 'political']`. The full list of types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
repeated string place_types = 7;- Specified by:
getPlaceTypesListin interfaceGeocodeOrBuilder- Returns:
- A list containing the placeTypes.
-
getPlaceTypesCount
public int getPlaceTypesCount()
The type(s) of place that the input geocoded to. For example, `['locality', 'political']`. The full list of types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
repeated string place_types = 7;- Specified by:
getPlaceTypesCountin interfaceGeocodeOrBuilder- Returns:
- The count of placeTypes.
-
getPlaceTypes
public String getPlaceTypes(int index)
The type(s) of place that the input geocoded to. For example, `['locality', 'political']`. The full list of types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
repeated string place_types = 7;- Specified by:
getPlaceTypesin interfaceGeocodeOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The placeTypes at the given index.
-
getPlaceTypesBytes
public com.google.protobuf.ByteString getPlaceTypesBytes(int index)
The type(s) of place that the input geocoded to. For example, `['locality', 'political']`. The full list of types can be found [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
repeated string place_types = 7;- Specified by:
getPlaceTypesBytesin interfaceGeocodeOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the placeTypes at the given index.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Geocode parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Geocode parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Geocode parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Geocode parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Geocode parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Geocode parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Geocode parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Geocode parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Geocode parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Geocode parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Geocode parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Geocode parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Geocode.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Geocode.Builder newBuilder()
-
newBuilder
public static Geocode.Builder newBuilder(Geocode prototype)
-
toBuilder
public Geocode.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Geocode.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Geocode getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Geocode> parser()
-
getParserForType
public com.google.protobuf.Parser<Geocode> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Geocode getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-