public static class GeolocationParams.GeolocationParamsBuilder extends Object
GeolocationParamsBuilder
class is a builder pattern for constructing GeolocationParams
objects with various parameters.Modifier and Type | Method and Description |
---|---|
GeolocationParams |
build()
Constructs a new
GeolocationParams object using the builder's parameters. |
GeolocationParams.GeolocationParamsBuilder |
includeHostname()
Sets whether to include hostname information in the response.
|
GeolocationParams.GeolocationParamsBuilder |
includeHostnameFallbackLive()
Sets whether to include fallback live hostname information in the response.
|
GeolocationParams.GeolocationParamsBuilder |
includeLiveHostname()
Sets whether to include live hostname information in the response.
|
GeolocationParams.GeolocationParamsBuilder |
includeSecurity()
Specifies to include security information in the response.
|
GeolocationParams.GeolocationParamsBuilder |
includeUserAgentDetail()
Specifies to include user agent detail in the response.
|
GeolocationParams.GeolocationParamsBuilder |
withExcludes(String excludes)
Sets the fields to exclude from the response.
|
GeolocationParams.GeolocationParamsBuilder |
withFields(String fields)
Sets the fields to include in the response.
|
GeolocationParams.GeolocationParamsBuilder |
withIPAddress(String ipAddress)
Sets the IPv4, IPv6 address or domain name for which geolocation information will be retrieved.
|
GeolocationParams.GeolocationParamsBuilder |
withLang(String lang)
Sets the language for the response.
|
public GeolocationParams.GeolocationParamsBuilder withIPAddress(String ipAddress)
ipAddress
- The IPv4, IPv6 address or domain name as a String
.GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder withLang(String lang)
en
.lang
- The language as a String
.GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder withFields(String fields)
fields
- The fields as a String
like "geo,time_zone,currency".GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder withExcludes(String excludes)
excludes
- The excluded fields as a String
.GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder includeHostname()
This method enables the IPGeolocation API to lookup hostname from our IP-Hostname database and returns the same IP address if there is no hostname found for the queried IP address. Lookup through the IP-Hostname database is faster than other options but is experimental and under process and can produce unwanted output.
Note: use one of includeHostname
, includeLiveHostname
or includeHostnameFallbackLive
GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder includeLiveHostname()
This method enables the IPGeolocation API to lookup hostname from live sources. Lookup through live sources is accurate but can introduce more latency to your query to IPGeolocation API.
Note: use one of includeHostname
, includeLiveHostname
or includeHostnameFallbackLive
GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder includeHostnameFallbackLive()
This method enables the IPGeolocation API to lookup hostname from our IP-Hostname database and if there is no hostname found for the queried IP address, then lookup through the live sources. This option has been introduced for faster and accurate lookup.
Note: use one of includeHostname
, includeLiveHostname
or includeHostnameFallbackLive
GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder includeSecurity()
GeolocationParamsBuilder
instance for method chaining.public GeolocationParams.GeolocationParamsBuilder includeUserAgentDetail()
GeolocationParamsBuilder
instance for method chaining.public GeolocationParams build()
GeolocationParams
object using the builder's parameters.GeolocationParams
object.Copyright © 2024. All rights reserved.