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 theipinfo
variant value.boolean
isIpinfo()
Is this variant instance of kindipinfo
?boolean
Is this variant instance of kindmaxmind
?maxmind()
Get themaxmind
variant value.final String
name()
Required - The provider-assigned name of the IP geolocation database to download.static DatabaseConfiguration
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<DatabaseConfiguration.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in 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 themaxmind
variant value.- Throws:
IllegalStateException
- if the current variant is not of themaxmind
kind.
-
isIpinfo
public boolean isIpinfo()Is this variant instance of kindipinfo
? -
ipinfo
Get theipinfo
variant value.- Throws:
IllegalStateException
- if the current variant is not of theipinfo
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupDatabaseConfigurationDeserializer
protected static void setupDatabaseConfigurationDeserializer(ObjectDeserializer<DatabaseConfiguration.Builder> op)
-