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 classstatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()_kind()Get the of the kind of variant held by this object.booleanIs this variant instance of kindjson_text?booleanisQuery()Is this variant instance of kindquery?booleanIs this variant instance of kindtemplate?jsonText()Get thejson_textvariant value.static IndicesPrivilegesQueryquery()Get thequeryvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) template()Get thetemplatevariant value.toString()
-
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<IndicesPrivilegesQuery.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin 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 thequeryvariant value.- Throws:
IllegalStateException- if the current variant is not of thequerykind.
-
isJsonText
public boolean isJsonText()Is this variant instance of kindjson_text? -
jsonText
Get thejson_textvariant value.- Throws:
IllegalStateException- if the current variant is not of thejson_textkind.
-
isTemplate
public boolean isTemplate()Is this variant instance of kindtemplate? -
template
Get thetemplatevariant value.- Throws:
IllegalStateException- if the current variant is not of thetemplatekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-