Class OpenRtb.BidRequest.Geo.Builder

  • All Implemented Interfaces:
    OpenRtb.BidRequest.GeoOrBuilder, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.BidRequest.Geo>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    OpenRtb.BidRequest.Geo

    public static final class OpenRtb.BidRequest.Geo.Builder
    extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<OpenRtb.BidRequest.Geo,​OpenRtb.BidRequest.Geo.Builder>
    implements OpenRtb.BidRequest.GeoOrBuilder
     OpenRTB 2.0: This object encapsulates various methods for specifying a
     geographic location. When subordinate to a Device object, it indicates the
     location of the device which can also be interpreted as the user's current
     location. When subordinate to a User object, it indicates the location of
     the user's home base (i.e., not necessarily their current location).
     The lat/lon attributes should only be passed if they conform to the
     accuracy depicted in the type attribute. For example, the centroid of a
     geographic region such as postal code should not be passed.
     
    Protobuf type com.google.openrtb.BidRequest.Geo
    • 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<OpenRtb.BidRequest.Geo.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<OpenRtb.BidRequest.Geo.Builder>
      • getDefaultInstanceForType

        public OpenRtb.BidRequest.Geo getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<OpenRtb.BidRequest.Geo>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

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

        public OpenRtb.BidRequest.Geo.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<OpenRtb.BidRequest.Geo.Builder>
      • clearOneof

        public OpenRtb.BidRequest.Geo.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<OpenRtb.BidRequest.Geo.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<OpenRtb.BidRequest.Geo,​OpenRtb.BidRequest.Geo.Builder>
      • mergeFrom

        public OpenRtb.BidRequest.Geo.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<OpenRtb.BidRequest.Geo.Builder>
        Throws:
        IOException
      • hasLat

        public boolean hasLat()
         Latitude from -90.0 to +90.0, where negative is south.
         
        optional double lat = 1;
        Specified by:
        hasLat in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the lat field is set.
      • getLat

        public double getLat()
         Latitude from -90.0 to +90.0, where negative is south.
         
        optional double lat = 1;
        Specified by:
        getLat in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The lat.
      • setLat

        public OpenRtb.BidRequest.Geo.Builder setLat​(double value)
         Latitude from -90.0 to +90.0, where negative is south.
         
        optional double lat = 1;
        Parameters:
        value - The lat to set.
        Returns:
        This builder for chaining.
      • clearLat

        public OpenRtb.BidRequest.Geo.Builder clearLat()
         Latitude from -90.0 to +90.0, where negative is south.
         
        optional double lat = 1;
        Returns:
        This builder for chaining.
      • hasLon

        public boolean hasLon()
         Longitude from -180.0 to +180.0, where negative is west.
         
        optional double lon = 2;
        Specified by:
        hasLon in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the lon field is set.
      • getLon

        public double getLon()
         Longitude from -180.0 to +180.0, where negative is west.
         
        optional double lon = 2;
        Specified by:
        getLon in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The lon.
      • setLon

        public OpenRtb.BidRequest.Geo.Builder setLon​(double value)
         Longitude from -180.0 to +180.0, where negative is west.
         
        optional double lon = 2;
        Parameters:
        value - The lon to set.
        Returns:
        This builder for chaining.
      • clearLon

        public OpenRtb.BidRequest.Geo.Builder clearLon()
         Longitude from -180.0 to +180.0, where negative is west.
         
        optional double lon = 2;
        Returns:
        This builder for chaining.
      • hasCountry

        public boolean hasCountry()
         Country using ISO-3166-1 Alpha-3.
         
        optional string country = 3;
        Specified by:
        hasCountry in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the country field is set.
      • getCountryBytes

        public com.google.protobuf.ByteString getCountryBytes()
         Country using ISO-3166-1 Alpha-3.
         
        optional string country = 3;
        Specified by:
        getCountryBytes in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The bytes for country.
      • setCountry

        public OpenRtb.BidRequest.Geo.Builder setCountry​(String value)
         Country using ISO-3166-1 Alpha-3.
         
        optional string country = 3;
        Parameters:
        value - The country to set.
        Returns:
        This builder for chaining.
      • clearCountry

        public OpenRtb.BidRequest.Geo.Builder clearCountry()
         Country using ISO-3166-1 Alpha-3.
         
        optional string country = 3;
        Returns:
        This builder for chaining.
      • setCountryBytes

        public OpenRtb.BidRequest.Geo.Builder setCountryBytes​(com.google.protobuf.ByteString value)
         Country using ISO-3166-1 Alpha-3.
         
        optional string country = 3;
        Parameters:
        value - The bytes for country to set.
        Returns:
        This builder for chaining.
      • hasRegion

        public boolean hasRegion()
         Region code using ISO-3166-2; 2-letter state code if USA.
         
        optional string region = 4;
        Specified by:
        hasRegion in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the region field is set.
      • getRegionBytes

        public com.google.protobuf.ByteString getRegionBytes()
         Region code using ISO-3166-2; 2-letter state code if USA.
         
        optional string region = 4;
        Specified by:
        getRegionBytes in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The bytes for region.
      • setRegion

        public OpenRtb.BidRequest.Geo.Builder setRegion​(String value)
         Region code using ISO-3166-2; 2-letter state code if USA.
         
        optional string region = 4;
        Parameters:
        value - The region to set.
        Returns:
        This builder for chaining.
      • clearRegion

        public OpenRtb.BidRequest.Geo.Builder clearRegion()
         Region code using ISO-3166-2; 2-letter state code if USA.
         
        optional string region = 4;
        Returns:
        This builder for chaining.
      • setRegionBytes

        public OpenRtb.BidRequest.Geo.Builder setRegionBytes​(com.google.protobuf.ByteString value)
         Region code using ISO-3166-2; 2-letter state code if USA.
         
        optional string region = 4;
        Parameters:
        value - The bytes for region to set.
        Returns:
        This builder for chaining.
      • hasRegionfips104

        public boolean hasRegionfips104()
         Region of a country using FIPS 10-4 notation. While OpenRTB supports
         this attribute, it has been withdrawn by NIST in 2008.
         
        optional string regionfips104 = 5;
        Specified by:
        hasRegionfips104 in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the regionfips104 field is set.
      • getRegionfips104

        public String getRegionfips104()
         Region of a country using FIPS 10-4 notation. While OpenRTB supports
         this attribute, it has been withdrawn by NIST in 2008.
         
        optional string regionfips104 = 5;
        Specified by:
        getRegionfips104 in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The regionfips104.
      • getRegionfips104Bytes

        public com.google.protobuf.ByteString getRegionfips104Bytes()
         Region of a country using FIPS 10-4 notation. While OpenRTB supports
         this attribute, it has been withdrawn by NIST in 2008.
         
        optional string regionfips104 = 5;
        Specified by:
        getRegionfips104Bytes in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The bytes for regionfips104.
      • setRegionfips104

        public OpenRtb.BidRequest.Geo.Builder setRegionfips104​(String value)
         Region of a country using FIPS 10-4 notation. While OpenRTB supports
         this attribute, it has been withdrawn by NIST in 2008.
         
        optional string regionfips104 = 5;
        Parameters:
        value - The regionfips104 to set.
        Returns:
        This builder for chaining.
      • clearRegionfips104

        public OpenRtb.BidRequest.Geo.Builder clearRegionfips104()
         Region of a country using FIPS 10-4 notation. While OpenRTB supports
         this attribute, it has been withdrawn by NIST in 2008.
         
        optional string regionfips104 = 5;
        Returns:
        This builder for chaining.
      • setRegionfips104Bytes

        public OpenRtb.BidRequest.Geo.Builder setRegionfips104Bytes​(com.google.protobuf.ByteString value)
         Region of a country using FIPS 10-4 notation. While OpenRTB supports
         this attribute, it has been withdrawn by NIST in 2008.
         
        optional string regionfips104 = 5;
        Parameters:
        value - The bytes for regionfips104 to set.
        Returns:
        This builder for chaining.
      • hasMetro

        public boolean hasMetro()
         Google metro code; similar to but not exactly Nielsen DMAs.
         See Appendix A for a link to the codes.
         (http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         
        optional string metro = 6;
        Specified by:
        hasMetro in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the metro field is set.
      • getMetro

        public String getMetro()
         Google metro code; similar to but not exactly Nielsen DMAs.
         See Appendix A for a link to the codes.
         (http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         
        optional string metro = 6;
        Specified by:
        getMetro in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The metro.
      • getMetroBytes

        public com.google.protobuf.ByteString getMetroBytes()
         Google metro code; similar to but not exactly Nielsen DMAs.
         See Appendix A for a link to the codes.
         (http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         
        optional string metro = 6;
        Specified by:
        getMetroBytes in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The bytes for metro.
      • setMetro

        public OpenRtb.BidRequest.Geo.Builder setMetro​(String value)
         Google metro code; similar to but not exactly Nielsen DMAs.
         See Appendix A for a link to the codes.
         (http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         
        optional string metro = 6;
        Parameters:
        value - The metro to set.
        Returns:
        This builder for chaining.
      • clearMetro

        public OpenRtb.BidRequest.Geo.Builder clearMetro()
         Google metro code; similar to but not exactly Nielsen DMAs.
         See Appendix A for a link to the codes.
         (http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         
        optional string metro = 6;
        Returns:
        This builder for chaining.
      • setMetroBytes

        public OpenRtb.BidRequest.Geo.Builder setMetroBytes​(com.google.protobuf.ByteString value)
         Google metro code; similar to but not exactly Nielsen DMAs.
         See Appendix A for a link to the codes.
         (http://code.google.com/apis/adwords/docs/appendix/metrocodes.html).
         
        optional string metro = 6;
        Parameters:
        value - The bytes for metro to set.
        Returns:
        This builder for chaining.
      • hasCity

        public boolean hasCity()
         City using United Nations Code for Trade & Transport Locations.
         See Appendix A for a link to the codes.
         (http://www.unece.org/cefact/locode/service/location.htm).
         
        optional string city = 7;
        Specified by:
        hasCity in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the city field is set.
      • getCity

        public String getCity()
         City using United Nations Code for Trade & Transport Locations.
         See Appendix A for a link to the codes.
         (http://www.unece.org/cefact/locode/service/location.htm).
         
        optional string city = 7;
        Specified by:
        getCity in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The city.
      • getCityBytes

        public com.google.protobuf.ByteString getCityBytes()
         City using United Nations Code for Trade & Transport Locations.
         See Appendix A for a link to the codes.
         (http://www.unece.org/cefact/locode/service/location.htm).
         
        optional string city = 7;
        Specified by:
        getCityBytes in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The bytes for city.
      • setCity

        public OpenRtb.BidRequest.Geo.Builder setCity​(String value)
         City using United Nations Code for Trade & Transport Locations.
         See Appendix A for a link to the codes.
         (http://www.unece.org/cefact/locode/service/location.htm).
         
        optional string city = 7;
        Parameters:
        value - The city to set.
        Returns:
        This builder for chaining.
      • clearCity

        public OpenRtb.BidRequest.Geo.Builder clearCity()
         City using United Nations Code for Trade & Transport Locations.
         See Appendix A for a link to the codes.
         (http://www.unece.org/cefact/locode/service/location.htm).
         
        optional string city = 7;
        Returns:
        This builder for chaining.
      • setCityBytes

        public OpenRtb.BidRequest.Geo.Builder setCityBytes​(com.google.protobuf.ByteString value)
         City using United Nations Code for Trade & Transport Locations.
         See Appendix A for a link to the codes.
         (http://www.unece.org/cefact/locode/service/location.htm).
         
        optional string city = 7;
        Parameters:
        value - The bytes for city to set.
        Returns:
        This builder for chaining.
      • getZipBytes

        public com.google.protobuf.ByteString getZipBytes()
         Zip/postal code.
         
        optional string zip = 8;
        Specified by:
        getZipBytes in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The bytes for zip.
      • setZip

        public OpenRtb.BidRequest.Geo.Builder setZip​(String value)
         Zip/postal code.
         
        optional string zip = 8;
        Parameters:
        value - The zip to set.
        Returns:
        This builder for chaining.
      • setZipBytes

        public OpenRtb.BidRequest.Geo.Builder setZipBytes​(com.google.protobuf.ByteString value)
         Zip/postal code.
         
        optional string zip = 8;
        Parameters:
        value - The bytes for zip to set.
        Returns:
        This builder for chaining.
      • hasType

        public boolean hasType()
         Source of location data; recommended when passing lat/lon.
         
        optional .com.google.openrtb.LocationType type = 9;
        Specified by:
        hasType in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the type field is set.
      • setType

        public OpenRtb.BidRequest.Geo.Builder setType​(OpenRtb.LocationType value)
         Source of location data; recommended when passing lat/lon.
         
        optional .com.google.openrtb.LocationType type = 9;
        Parameters:
        value - The type to set.
        Returns:
        This builder for chaining.
      • clearType

        public OpenRtb.BidRequest.Geo.Builder clearType()
         Source of location data; recommended when passing lat/lon.
         
        optional .com.google.openrtb.LocationType type = 9;
        Returns:
        This builder for chaining.
      • hasAccuracy

        public boolean hasAccuracy()
         Estimated location accuracy in meters; recommended when lat/lon
         are specified and derived from a device's location services
         (i.e., type = 1). Note that this is the accuracy as reported
         from the device. Consult OS specific documentation
         (e.g., Android, iOS) for exact interpretation.
         
        optional int32 accuracy = 11;
        Specified by:
        hasAccuracy in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the accuracy field is set.
      • getAccuracy

        public int getAccuracy()
         Estimated location accuracy in meters; recommended when lat/lon
         are specified and derived from a device's location services
         (i.e., type = 1). Note that this is the accuracy as reported
         from the device. Consult OS specific documentation
         (e.g., Android, iOS) for exact interpretation.
         
        optional int32 accuracy = 11;
        Specified by:
        getAccuracy in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The accuracy.
      • setAccuracy

        public OpenRtb.BidRequest.Geo.Builder setAccuracy​(int value)
         Estimated location accuracy in meters; recommended when lat/lon
         are specified and derived from a device's location services
         (i.e., type = 1). Note that this is the accuracy as reported
         from the device. Consult OS specific documentation
         (e.g., Android, iOS) for exact interpretation.
         
        optional int32 accuracy = 11;
        Parameters:
        value - The accuracy to set.
        Returns:
        This builder for chaining.
      • clearAccuracy

        public OpenRtb.BidRequest.Geo.Builder clearAccuracy()
         Estimated location accuracy in meters; recommended when lat/lon
         are specified and derived from a device's location services
         (i.e., type = 1). Note that this is the accuracy as reported
         from the device. Consult OS specific documentation
         (e.g., Android, iOS) for exact interpretation.
         
        optional int32 accuracy = 11;
        Returns:
        This builder for chaining.
      • hasLastfix

        public boolean hasLastfix()
         Number of seconds since this geolocation fix was established.
         Note that devices may cache location data across multiple fetches.
         Ideally, this value should be from the time the actual fix was taken.
         
        optional int32 lastfix = 12;
        Specified by:
        hasLastfix in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the lastfix field is set.
      • getLastfix

        public int getLastfix()
         Number of seconds since this geolocation fix was established.
         Note that devices may cache location data across multiple fetches.
         Ideally, this value should be from the time the actual fix was taken.
         
        optional int32 lastfix = 12;
        Specified by:
        getLastfix in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The lastfix.
      • setLastfix

        public OpenRtb.BidRequest.Geo.Builder setLastfix​(int value)
         Number of seconds since this geolocation fix was established.
         Note that devices may cache location data across multiple fetches.
         Ideally, this value should be from the time the actual fix was taken.
         
        optional int32 lastfix = 12;
        Parameters:
        value - The lastfix to set.
        Returns:
        This builder for chaining.
      • clearLastfix

        public OpenRtb.BidRequest.Geo.Builder clearLastfix()
         Number of seconds since this geolocation fix was established.
         Note that devices may cache location data across multiple fetches.
         Ideally, this value should be from the time the actual fix was taken.
         
        optional int32 lastfix = 12;
        Returns:
        This builder for chaining.
      • hasIpservice

        public boolean hasIpservice()
         Service or provider used to determine geolocation from IP
         address if applicable (i.e., type = 2).
         
        optional .com.google.openrtb.LocationService ipservice = 13;
        Specified by:
        hasIpservice in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the ipservice field is set.
      • setIpservice

        public OpenRtb.BidRequest.Geo.Builder setIpservice​(OpenRtb.LocationService value)
         Service or provider used to determine geolocation from IP
         address if applicable (i.e., type = 2).
         
        optional .com.google.openrtb.LocationService ipservice = 13;
        Parameters:
        value - The ipservice to set.
        Returns:
        This builder for chaining.
      • clearIpservice

        public OpenRtb.BidRequest.Geo.Builder clearIpservice()
         Service or provider used to determine geolocation from IP
         address if applicable (i.e., type = 2).
         
        optional .com.google.openrtb.LocationService ipservice = 13;
        Returns:
        This builder for chaining.
      • hasUtcoffset

        public boolean hasUtcoffset()
         Local time as the number +/- of minutes from UTC.
         
        optional int32 utcoffset = 10;
        Specified by:
        hasUtcoffset in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        Whether the utcoffset field is set.
      • getUtcoffset

        public int getUtcoffset()
         Local time as the number +/- of minutes from UTC.
         
        optional int32 utcoffset = 10;
        Specified by:
        getUtcoffset in interface OpenRtb.BidRequest.GeoOrBuilder
        Returns:
        The utcoffset.
      • setUtcoffset

        public OpenRtb.BidRequest.Geo.Builder setUtcoffset​(int value)
         Local time as the number +/- of minutes from UTC.
         
        optional int32 utcoffset = 10;
        Parameters:
        value - The utcoffset to set.
        Returns:
        This builder for chaining.
      • clearUtcoffset

        public OpenRtb.BidRequest.Geo.Builder clearUtcoffset()
         Local time as the number +/- of minutes from UTC.
         
        optional int32 utcoffset = 10;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final OpenRtb.BidRequest.Geo.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<OpenRtb.BidRequest.Geo.Builder>
      • mergeUnknownFields

        public final OpenRtb.BidRequest.Geo.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<OpenRtb.BidRequest.Geo.Builder>