Class Geocode.Builder

  • All Implemented Interfaces:
    GeocodeOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Geocode

    public static final class Geocode.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
    implements GeocodeOrBuilder
     Contains information about the place the input was geocoded to.
     
    Protobuf type google.maps.addressvalidation.v1.Geocode
    • Method Detail

      • 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.Builder<Geocode.Builder>
      • clear

        public Geocode.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • getDefaultInstanceForType

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

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

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

        public Geocode.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • setField

        public Geocode.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                        Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • clearField

        public Geocode.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • clearOneof

        public Geocode.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • setRepeatedField

        public Geocode.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                int index,
                                                Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • addRepeatedField

        public Geocode.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • mergeFrom

        public Geocode.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Geocode.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • mergeFrom

        public Geocode.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Geocode.Builder>
        Throws:
        IOException
      • 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.
      • setLocation

        public Geocode.Builder setLocation​(com.google.type.LatLng value)
         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;
      • setLocation

        public Geocode.Builder setLocation​(com.google.type.LatLng.Builder builderForValue)
         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;
      • mergeLocation

        public Geocode.Builder mergeLocation​(com.google.type.LatLng value)
         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;
      • clearLocation

        public Geocode.Builder clearLocation()
         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;
      • getLocationBuilder

        public com.google.type.LatLng.Builder getLocationBuilder()
         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;
      • 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.
      • setPlusCode

        public Geocode.Builder setPlusCode​(PlusCode value)
         The plus code corresponding to the `location`.
         
        .google.maps.addressvalidation.v1.PlusCode plus_code = 2;
      • setPlusCode

        public Geocode.Builder setPlusCode​(PlusCode.Builder builderForValue)
         The plus code corresponding to the `location`.
         
        .google.maps.addressvalidation.v1.PlusCode plus_code = 2;
      • mergePlusCode

        public Geocode.Builder mergePlusCode​(PlusCode value)
         The plus code corresponding to the `location`.
         
        .google.maps.addressvalidation.v1.PlusCode plus_code = 2;
      • clearPlusCode

        public Geocode.Builder clearPlusCode()
         The plus code corresponding to the `location`.
         
        .google.maps.addressvalidation.v1.PlusCode plus_code = 2;
      • getPlusCodeBuilder

        public PlusCode.Builder getPlusCodeBuilder()
         The plus code corresponding to the `location`.
         
        .google.maps.addressvalidation.v1.PlusCode plus_code = 2;
      • 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.
      • setBounds

        public Geocode.Builder setBounds​(com.google.geo.type.Viewport value)
         The bounds of the geocoded place.
         
        .google.geo.type.Viewport bounds = 4;
      • setBounds

        public Geocode.Builder setBounds​(com.google.geo.type.Viewport.Builder builderForValue)
         The bounds of the geocoded place.
         
        .google.geo.type.Viewport bounds = 4;
      • mergeBounds

        public Geocode.Builder mergeBounds​(com.google.geo.type.Viewport value)
         The bounds of the geocoded place.
         
        .google.geo.type.Viewport bounds = 4;
      • clearBounds

        public Geocode.Builder clearBounds()
         The bounds of the geocoded place.
         
        .google.geo.type.Viewport bounds = 4;
      • getBoundsBuilder

        public com.google.geo.type.Viewport.Builder getBoundsBuilder()
         The bounds of the geocoded place.
         
        .google.geo.type.Viewport bounds = 4;
      • 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.
      • setFeatureSizeMeters

        public Geocode.Builder setFeatureSizeMeters​(float value)
         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;
        Parameters:
        value - The featureSizeMeters to set.
        Returns:
        This builder for chaining.
      • clearFeatureSizeMeters

        public Geocode.Builder clearFeatureSizeMeters()
         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;
        Returns:
        This builder for chaining.
      • 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.
      • setPlaceId

        public Geocode.Builder setPlaceId​(String value)
         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;
        Parameters:
        value - The placeId to set.
        Returns:
        This builder for chaining.
      • clearPlaceId

        public Geocode.Builder clearPlaceId()
         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;
        Returns:
        This builder for chaining.
      • setPlaceIdBytes

        public Geocode.Builder setPlaceIdBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for placeId to set.
        Returns:
        This builder for chaining.
      • 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.
      • setPlaceTypes

        public Geocode.Builder setPlaceTypes​(int index,
                                             String value)
         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;
        Parameters:
        index - The index to set the value at.
        value - The placeTypes to set.
        Returns:
        This builder for chaining.
      • addPlaceTypes

        public Geocode.Builder addPlaceTypes​(String value)
         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;
        Parameters:
        value - The placeTypes to add.
        Returns:
        This builder for chaining.
      • addAllPlaceTypes

        public Geocode.Builder addAllPlaceTypes​(Iterable<String> values)
         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;
        Parameters:
        values - The placeTypes to add.
        Returns:
        This builder for chaining.
      • clearPlaceTypes

        public Geocode.Builder clearPlaceTypes()
         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;
        Returns:
        This builder for chaining.
      • addPlaceTypesBytes

        public Geocode.Builder addPlaceTypesBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes of the placeTypes to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Geocode.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>
      • mergeUnknownFields

        public final Geocode.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Geocode.Builder>