public class GetIndexedScriptRequest extends ActionRequest<GetIndexedScriptRequest> implements IndicesRequest
scriptLang(String)
and id(String)
to be set.GetIndexedScriptResponse
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
id |
protected java.lang.String |
scriptLang |
Constructor and Description |
---|
GetIndexedScriptRequest()
Constructs a new get request against the script index.
|
GetIndexedScriptRequest(java.lang.String scriptLang,
java.lang.String id)
Constructs a new get request against the script index with the type and id.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
id() |
GetIndexedScriptRequest |
id(java.lang.String id)
Sets the id of the script to fetch.
|
java.lang.String[] |
indices()
Returns the array of indices that the action relates to
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
java.lang.String |
scriptLang() |
GetIndexedScriptRequest |
scriptLang(java.lang.String type)
Sets the language of the script to fetch.
|
java.lang.String |
toString() |
ActionRequestValidationException |
validate() |
long |
version()
Sets the version, which will cause the get operation to only be performed if a matching
version exists and no changes happened on the doc since then.
|
GetIndexedScriptRequest |
version(long version) |
VersionType |
versionType() |
GetIndexedScriptRequest |
versionType(VersionType versionType)
Sets the versioning type.
|
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
createTask, getDescription
remoteAddress, remoteAddress
public GetIndexedScriptRequest()
scriptLang(String)
and id(String)
must be set.public GetIndexedScriptRequest(java.lang.String scriptLang, java.lang.String id)
scriptLang
- The language of the scriptid
- The id of the scriptpublic ActionRequestValidationException validate()
validate
in class ActionRequest<GetIndexedScriptRequest>
public java.lang.String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public GetIndexedScriptRequest scriptLang(@Nullable java.lang.String type)
public GetIndexedScriptRequest id(java.lang.String id)
public java.lang.String scriptLang()
public java.lang.String id()
public long version()
public GetIndexedScriptRequest version(long version)
public GetIndexedScriptRequest versionType(VersionType versionType)
VersionType.INTERNAL
.public VersionType versionType()
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class ActionRequest<GetIndexedScriptRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class ActionRequest<GetIndexedScriptRequest>
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object