Class 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 type google.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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • 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 interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.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 class com.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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
      • hasPlusCode

        public boolean hasPlusCode()
         The plus code corresponding to the `location`.
         
        .google.maps.addressvalidation.v1.PlusCode plus_code = 2;
        Specified by:
        hasPlusCode in interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        Returns:
        The plusCode.
      • hasBounds

        public boolean hasBounds()
         The bounds of the geocoded place.
         
        .google.geo.type.Viewport bounds = 4;
        Specified by:
        hasBounds in interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
      • 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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface GeocodeOrBuilder
        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 interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Geocode.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Geocode.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Geocode.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.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 interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Geocode getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder