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 class
Geocode.Builder
Contains 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 int
BOUNDS_FIELD_NUMBER
static int
FEATURE_SIZE_METERS_FIELD_NUMBER
static int
LOCATION_FIELD_NUMBER
static int
PLACE_ID_FIELD_NUMBER
static int
PLACE_TYPES_FIELD_NUMBER
static int
PLUS_CODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
com.google.geo.type.Viewport
getBounds()
The bounds of the geocoded place.com.google.geo.type.ViewportOrBuilder
getBoundsOrBuilder()
The bounds of the geocoded place.static Geocode
getDefaultInstance()
Geocode
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
float
getFeatureSizeMeters()
The size of the geocoded place, in meters.com.google.type.LatLng
getLocation()
The geocoded location of the input.com.google.type.LatLngOrBuilder
getLocationOrBuilder()
The geocoded location of the input.com.google.protobuf.Parser<Geocode>
getParserForType()
String
getPlaceId()
The PlaceID of the place this input geocodes to.com.google.protobuf.ByteString
getPlaceIdBytes()
The PlaceID of the place this input geocodes to.String
getPlaceTypes(int index)
The type(s) of place that the input geocoded to.com.google.protobuf.ByteString
getPlaceTypesBytes(int index)
The type(s) of place that the input geocoded to.int
getPlaceTypesCount()
The type(s) of place that the input geocoded to.com.google.protobuf.ProtocolStringList
getPlaceTypesList()
The type(s) of place that the input geocoded to.PlusCode
getPlusCode()
The plus code corresponding to the `location`.PlusCodeOrBuilder
getPlusCodeOrBuilder()
The plus code corresponding to the `location`.int
getSerializedSize()
boolean
hasBounds()
The bounds of the geocoded place.int
hashCode()
boolean
hasLocation()
The geocoded location of the input.boolean
hasPlusCode()
The plus code corresponding to the `location`.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Geocode.Builder
newBuilder()
static Geocode.Builder
newBuilder(Geocode prototype)
Geocode.Builder
newBuilderForType()
protected Geocode.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Geocode
parseDelimitedFrom(InputStream input)
static Geocode
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Geocode
parseFrom(byte[] data)
static Geocode
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Geocode
parseFrom(com.google.protobuf.ByteString data)
static Geocode
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Geocode
parseFrom(com.google.protobuf.CodedInputStream input)
static Geocode
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Geocode
parseFrom(InputStream input)
static Geocode
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Geocode
parseFrom(ByteBuffer data)
static Geocode
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Geocode>
parser()
Geocode.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
hasLocation
in 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:
getLocation
in 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:
getLocationOrBuilder
in interfaceGeocodeOrBuilder
-
hasPlusCode
public boolean hasPlusCode()
The plus code corresponding to the `location`.
.google.maps.addressvalidation.v1.PlusCode plus_code = 2;
- Specified by:
hasPlusCode
in 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:
getPlusCode
in 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:
getPlusCodeOrBuilder
in interfaceGeocodeOrBuilder
-
hasBounds
public boolean hasBounds()
The bounds of the geocoded place.
.google.geo.type.Viewport bounds = 4;
- Specified by:
hasBounds
in 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:
getBounds
in 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:
getBoundsOrBuilder
in 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:
getFeatureSizeMeters
in 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:
getPlaceId
in 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:
getPlaceIdBytes
in 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:
getPlaceTypesList
in 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:
getPlaceTypesCount
in 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:
getPlaceTypes
in 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:
getPlaceTypesBytes
in 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:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Geocode.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Geocode getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-