Package org.elasticsearch.client.indices
Class PutComponentTemplateRequest
java.lang.Object
org.elasticsearch.client.TimedRequest
org.elasticsearch.client.indices.PutComponentTemplateRequest
- All Implemented Interfaces:
Validatable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class PutComponentTemplateRequest
extends TimedRequest
implements org.elasticsearch.xcontent.ToXContentObject
A request to create an component template.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
Fields inherited from class org.elasticsearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUTFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMSFields inherited from interface org.elasticsearch.client.Validatable
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncause()The cause for this component template creation.componentTemplate(org.elasticsearch.cluster.metadata.ComponentTemplate componentTemplate) The component template to create.booleancreate()create(boolean create) Set totrueto force only creation, not an update of an component template.name()The name of the component template.Sets the name of the component template.org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class org.elasticsearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.client.Validatable
validate
-
Constructor Details
-
PutComponentTemplateRequest
public PutComponentTemplateRequest()
-
-
Method Details
-
name
Sets the name of the component template. -
name
The name of the component template. -
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.elasticsearch.cluster.metadata.ComponentTemplate componentTemplate) The component template to create. -
cause
The cause for this component template creation. -
cause
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-