Class DatabaseConfiguration
java.lang.Object
co.elastic.clients.elasticsearch.ingest.DatabaseConfiguration
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<DatabaseConfiguration.Kind,Object>
@JsonpDeserializable
public class DatabaseConfiguration
extends Object
implements TaggedUnion<DatabaseConfiguration.Kind,Object>, JsonpSerializable
The configuration necessary to identify which IP geolocation provider to use
to download a database, as well as any provider-specific configuration
necessary for such downloading. At present, the only supported providers are
maxmind and ipinfo, and the maxmind
provider requires that an account_id (string) is configured. A
provider (either maxmind or ipinfo) must be
specified. The web and local providers can be returned as read only
configurations.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()_kind()Get the of the kind of variant held by this object.ipinfo()Get theipinfovariant value.booleanisIpinfo()Is this variant instance of kindipinfo?booleanIs this variant instance of kindmaxmind?maxmind()Get themaxmindvariant value.final Stringname()Required - The provider-assigned name of the IP geolocation database to download.static DatabaseConfigurationvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<DatabaseConfiguration.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<DatabaseConfiguration.Kind,Object>
-
of
public static DatabaseConfiguration of(Function<DatabaseConfiguration.Builder, ObjectBuilder<DatabaseConfiguration>> fn) -
name
Required - The provider-assigned name of the IP geolocation database to download.API name:
name -
isMaxmind
public boolean isMaxmind()Is this variant instance of kindmaxmind? -
maxmind
Get themaxmindvariant value.- Throws:
IllegalStateException- if the current variant is not of themaxmindkind.
-
isIpinfo
public boolean isIpinfo()Is this variant instance of kindipinfo? -
ipinfo
Get theipinfovariant value.- Throws:
IllegalStateException- if the current variant is not of theipinfokind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupDatabaseConfigurationDeserializer
protected static void setupDatabaseConfigurationDeserializer(ObjectDeserializer<DatabaseConfiguration.Builder> op)
-