Package org.opensearch.client.indices
Class PutComponentTemplateRequest
- java.lang.Object
-
- org.opensearch.client.TimedRequest
-
- org.opensearch.client.indices.PutComponentTemplateRequest
-
- All Implemented Interfaces:
Validatable,org.opensearch.common.xcontent.ToXContent,org.opensearch.common.xcontent.ToXContentObject
public class PutComponentTemplateRequest extends TimedRequest implements org.opensearch.common.xcontent.ToXContentObject
A request to create an component template.
-
-
Field Summary
-
Fields inherited from class org.opensearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT
-
Fields inherited from interface org.opensearch.client.Validatable
EMPTY
-
-
Constructor Summary
Constructors Constructor Description PutComponentTemplateRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcause()PutComponentTemplateRequestcause(java.lang.String cause)The cause for this component template creation.PutComponentTemplateRequestcomponentTemplate(org.opensearch.cluster.metadata.ComponentTemplate componentTemplate)The component template to create.booleancreate()PutComponentTemplateRequestcreate(boolean create)Set totrueto force only creation, not an update of an component template.java.lang.Stringname()The name of the component template.PutComponentTemplateRequestname(java.lang.String name)Sets the name of the component template.org.opensearch.common.xcontent.XContentBuildertoXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params)-
Methods inherited from class org.opensearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout
-
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.Validatable
validate
-
-
-
-
Method Detail
-
name
public PutComponentTemplateRequest name(java.lang.String name)
Sets the name of the component template.
-
name
public java.lang.String name()
The name of the component template.
-
create
public PutComponentTemplateRequest create(boolean create)
Set totrueto force only creation, not an update of an component template. If it already exists, it will fail with anIllegalArgumentException.
-
create
public boolean create()
-
componentTemplate
public PutComponentTemplateRequest componentTemplate(org.opensearch.cluster.metadata.ComponentTemplate componentTemplate)
The component template to create.
-
cause
public PutComponentTemplateRequest cause(java.lang.String cause)
The cause for this component template creation.
-
cause
public java.lang.String cause()
-
toXContent
public org.opensearch.common.xcontent.XContentBuilder toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.opensearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
-