Class DictionaryResponse<TKey,TValue>
- java.lang.Object
-
- org.opensearch.client.transport.endpoints.DictionaryResponse<TKey,TValue>
-
- All Implemented Interfaces:
JsonpSerializable
,PlainJsonSerializable
- Direct Known Subclasses:
GetAliasResponse
,GetFieldMappingResponse
,GetIndexResponse
,GetIndicesSettingsResponse
,GetMappingResponse
,GetPipelineResponse
,GetRepositoryResponse
,GetTemplateResponse
,RecoveryResponse
,RemoteInfoResponse
public abstract class DictionaryResponse<TKey,TValue> extends java.lang.Object implements PlainJsonSerializable
Base class for dictionary responses, i.e. a series of key/value pairs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DictionaryResponse.AbstractBuilder<TKey,TValue,BuilderT extends DictionaryResponse.AbstractBuilder<TKey,TValue,BuilderT>>
-
Constructor Summary
Constructors Modifier Constructor Description protected
DictionaryResponse(DictionaryResponse.AbstractBuilder<TKey,TValue,?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TValue
get(java.lang.String key)
java.util.Map<java.lang.String,TValue>
result()
Returns the response as a map.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this value to JSON.protected void
serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static <TKey,TValue,BuilderT extends DictionaryResponse.AbstractBuilder<TKey,TValue,BuilderT>>
voidsetupDictionaryResponseDeserializer(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TKey> tKeyParser, JsonpDeserializer<TValue> tValueParser)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
-
-
-
Constructor Detail
-
DictionaryResponse
protected DictionaryResponse(DictionaryResponse.AbstractBuilder<TKey,TValue,?> builder)
-
-
Method Detail
-
result
public java.util.Map<java.lang.String,TValue> result()
Returns the response as a map.
-
get
public TValue get(java.lang.String key)
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this value to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
setupDictionaryResponseDeserializer
protected static <TKey,TValue,BuilderT extends DictionaryResponse.AbstractBuilder<TKey,TValue,BuilderT>> void setupDictionaryResponseDeserializer(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TKey> tKeyParser, JsonpDeserializer<TValue> tValueParser)
-
-