Class IndicesPrivilegesQuery
java.lang.Object
co.elastic.clients.elasticsearch.security.IndicesPrivilegesQuery
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<IndicesPrivilegesQuery.Kind,
Object>
@JsonpDeserializable
public class IndicesPrivilegesQuery
extends Object
implements TaggedUnion<IndicesPrivilegesQuery.Kind,Object>, JsonpSerializable
While creating or updating a role you can provide either a JSON structure or
a string to the API. However, the response provided by Elasticsearch will
only be string with a json-as-text content.
Since this is embedded in IndicesPrivileges
, the same structure
is used for clarity in both contexts.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
_kind()
Get the of the kind of variant held by this object.boolean
Is this variant instance of kindjson_text
?boolean
isQuery()
Is this variant instance of kindquery
?boolean
Is this variant instance of kindtemplate
?jsonText()
Get thejson_text
variant value.static IndicesPrivilegesQuery
query()
Get thequery
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) template()
Get thetemplate
variant value.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<IndicesPrivilegesQuery.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<IndicesPrivilegesQuery.Kind,
Object>
-
of
public static IndicesPrivilegesQuery of(Function<IndicesPrivilegesQuery.Builder, ObjectBuilder<IndicesPrivilegesQuery>> fn) -
isQuery
public boolean isQuery()Is this variant instance of kindquery
? -
query
Get thequery
variant value.- Throws:
IllegalStateException
- if the current variant is not of thequery
kind.
-
isJsonText
public boolean isJsonText()Is this variant instance of kindjson_text
? -
jsonText
Get thejson_text
variant value.- Throws:
IllegalStateException
- if the current variant is not of thejson_text
kind.
-
isTemplate
public boolean isTemplate()Is this variant instance of kindtemplate
? -
template
Get thetemplate
variant value.- Throws:
IllegalStateException
- if the current variant is not of thetemplate
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-