Class DictionaryResponse<TKey,TValue>
- java.lang.Object
-
- org.opensearch.client.transport.endpoints.DictionaryResponse<TKey,TValue>
-
- All Implemented Interfaces:
JsonpSerializable
- Direct Known Subclasses:
GetAliasResponse,GetFieldMappingResponse,GetIndexResponse,GetIndicesSettingsResponse,GetMappingResponse,GetPipelineResponse,GetRepositoryResponse,GetTemplateResponse,RecoveryResponse,RemoteInfoResponse
public abstract class DictionaryResponse<TKey,TValue> extends java.lang.Object implements JsonpSerializable
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 classDictionaryResponse.AbstractBuilder<TKey,TValue,BuilderT extends DictionaryResponse.AbstractBuilder<TKey,TValue,BuilderT>>
-
Constructor Summary
Constructors Modifier Constructor Description protectedDictionaryResponse(DictionaryResponse.AbstractBuilder<TKey,TValue,?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TValueget(java.lang.String key)java.util.Map<java.lang.String,TValue>result()Returns the response as a map.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this value to JSON.protected voidserializeInternal(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)
-
-
-
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:
serializein 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)
-
-