public class PutIndexTemplateRequest extends MasterNodeRequest<PutIndexTemplateRequest> implements IndicesRequest
TransportRequest.Empty
IndicesRequest.Replaceable
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
Constructor and Description |
---|
PutIndexTemplateRequest() |
PutIndexTemplateRequest(java.lang.String name)
Constructs a new put index template request with the provided name.
|
Modifier and Type | Method and Description |
---|---|
PutIndexTemplateRequest |
alias(Alias alias)
Adds an alias that will be added when the index gets created.
|
java.util.Set<Alias> |
aliases() |
PutIndexTemplateRequest |
aliases(BytesReference source)
Sets the aliases that will be associated with the index when it gets created
|
PutIndexTemplateRequest |
aliases(java.util.Map source)
Sets the aliases that will be associated with the index when it gets created
|
PutIndexTemplateRequest |
aliases(java.lang.String source)
Sets the aliases that will be associated with the index when it gets created
|
PutIndexTemplateRequest |
aliases(XContentBuilder source)
Sets the aliases that will be associated with the index when it gets created
|
java.lang.String |
cause() |
PutIndexTemplateRequest |
cause(java.lang.String cause)
The cause for this index template creation.
|
boolean |
create() |
PutIndexTemplateRequest |
create(boolean create)
Set to true to force only creation, not an update of an index template.
|
PutIndexTemplateRequest |
custom(IndexMetaData.Custom custom) |
java.util.Map<java.lang.String,IndexMetaData.Custom> |
customs() |
java.lang.String[] |
indices()
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
PutIndexTemplateRequest |
mapping(java.lang.String type,
BytesReference source,
XContentType xContentType)
Adds mapping that will be added when the index gets created.
|
PutIndexTemplateRequest |
mapping(java.lang.String type,
java.util.Map<java.lang.String,java.lang.Object> source)
Adds mapping that will be added when the index gets created.
|
PutIndexTemplateRequest |
mapping(java.lang.String type,
java.lang.Object... source)
A specialized simplified mapping source method, takes the form of simple properties definition:
("field1", "type=string,store=true").
|
PutIndexTemplateRequest |
mapping(java.lang.String type,
java.lang.String source)
Deprecated.
|
PutIndexTemplateRequest |
mapping(java.lang.String type,
java.lang.String source,
XContentType xContentType)
Adds mapping that will be added when the index gets created.
|
PutIndexTemplateRequest |
mapping(java.lang.String type,
XContentBuilder source)
Adds mapping that will be added when the index gets created.
|
java.util.Map<java.lang.String,java.lang.String> |
mappings() |
java.lang.String |
name()
The name of the index template.
|
PutIndexTemplateRequest |
name(java.lang.String name)
Sets the name of the index template.
|
int |
order() |
PutIndexTemplateRequest |
order(int order) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
Settings |
settings() |
PutIndexTemplateRequest |
settings(java.util.Map<java.lang.String,java.lang.Object> source)
The settings to create the index template with (either json or yaml format).
|
PutIndexTemplateRequest |
settings(Settings.Builder settings)
The settings to create the index template with.
|
PutIndexTemplateRequest |
settings(Settings settings)
The settings to create the index template with.
|
PutIndexTemplateRequest |
settings(java.lang.String source)
Deprecated.
|
PutIndexTemplateRequest |
settings(java.lang.String source,
XContentType xContentType)
The settings to create the index template with (either json/yaml format).
|
PutIndexTemplateRequest |
source(byte[] source)
Deprecated.
|
PutIndexTemplateRequest |
source(byte[] source,
int offset,
int length)
Deprecated.
|
PutIndexTemplateRequest |
source(byte[] source,
int offset,
int length,
XContentType xContentType)
The template source definition.
|
PutIndexTemplateRequest |
source(byte[] source,
XContentType xContentType)
The template source definition.
|
PutIndexTemplateRequest |
source(BytesReference source)
Deprecated.
|
PutIndexTemplateRequest |
source(BytesReference source,
XContentType xContentType)
The template source definition.
|
PutIndexTemplateRequest |
source(java.util.Map templateSource)
The template source definition.
|
PutIndexTemplateRequest |
source(java.lang.String templateSource)
Deprecated.
|
PutIndexTemplateRequest |
source(java.lang.String templateSource,
XContentType xContentType)
The template source definition.
|
PutIndexTemplateRequest |
source(XContentBuilder templateBuilder)
The template source definition.
|
java.lang.String |
template() |
PutIndexTemplateRequest |
template(java.lang.String template) |
ActionRequestValidationException |
validate() |
java.lang.Integer |
version() |
PutIndexTemplateRequest |
version(java.lang.Integer version) |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
getShouldStoreResult
getParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createTask, getDescription, setParentTask
public PutIndexTemplateRequest()
public PutIndexTemplateRequest(java.lang.String name)
public ActionRequestValidationException validate()
validate
in class ActionRequest
public PutIndexTemplateRequest name(java.lang.String name)
public java.lang.String name()
public PutIndexTemplateRequest template(java.lang.String template)
public java.lang.String template()
public PutIndexTemplateRequest order(int order)
public int order()
public PutIndexTemplateRequest version(java.lang.Integer version)
public java.lang.Integer version()
public PutIndexTemplateRequest create(boolean create)
IllegalArgumentException
.public boolean create()
public PutIndexTemplateRequest settings(Settings settings)
public PutIndexTemplateRequest settings(Settings.Builder settings)
@Deprecated public PutIndexTemplateRequest settings(java.lang.String source)
settings(String, XContentType)
public PutIndexTemplateRequest settings(java.lang.String source, XContentType xContentType)
public PutIndexTemplateRequest settings(java.util.Map<java.lang.String,java.lang.Object> source)
public Settings settings()
@Deprecated public PutIndexTemplateRequest mapping(java.lang.String type, java.lang.String source)
mapping(String, String, XContentType)
type
- The mapping typesource
- The mapping sourcepublic PutIndexTemplateRequest mapping(java.lang.String type, java.lang.String source, XContentType xContentType)
type
- The mapping typesource
- The mapping sourcexContentType
- The type of content contained within the sourcepublic PutIndexTemplateRequest cause(java.lang.String cause)
public java.lang.String cause()
public PutIndexTemplateRequest mapping(java.lang.String type, XContentBuilder source)
type
- The mapping typesource
- The mapping sourcepublic PutIndexTemplateRequest mapping(java.lang.String type, BytesReference source, XContentType xContentType)
type
- The mapping typesource
- The mapping sourcexContentType
- the source content typepublic PutIndexTemplateRequest mapping(java.lang.String type, java.util.Map<java.lang.String,java.lang.Object> source)
type
- The mapping typesource
- The mapping sourcepublic PutIndexTemplateRequest mapping(java.lang.String type, java.lang.Object... source)
public java.util.Map<java.lang.String,java.lang.String> mappings()
public PutIndexTemplateRequest source(XContentBuilder templateBuilder)
public PutIndexTemplateRequest source(java.util.Map templateSource)
@Deprecated public PutIndexTemplateRequest source(java.lang.String templateSource)
source(String, XContentType)
public PutIndexTemplateRequest source(java.lang.String templateSource, XContentType xContentType)
@Deprecated public PutIndexTemplateRequest source(byte[] source)
source(byte[], XContentType)
public PutIndexTemplateRequest source(byte[] source, XContentType xContentType)
@Deprecated public PutIndexTemplateRequest source(byte[] source, int offset, int length)
source(byte[], int, int, XContentType)
public PutIndexTemplateRequest source(byte[] source, int offset, int length, XContentType xContentType)
@Deprecated public PutIndexTemplateRequest source(BytesReference source)
source(BytesReference, XContentType)
public PutIndexTemplateRequest source(BytesReference source, XContentType xContentType)
public PutIndexTemplateRequest custom(IndexMetaData.Custom custom)
public java.util.Map<java.lang.String,IndexMetaData.Custom> customs()
public java.util.Set<Alias> aliases()
public PutIndexTemplateRequest aliases(java.util.Map source)
public PutIndexTemplateRequest aliases(XContentBuilder source)
public PutIndexTemplateRequest aliases(java.lang.String source)
public PutIndexTemplateRequest aliases(BytesReference source)
public PutIndexTemplateRequest alias(Alias alias)
alias
- The metadata for the new aliaspublic java.lang.String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<PutIndexTemplateRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<PutIndexTemplateRequest>
java.io.IOException