Tidy up GetSourceRequest class: (#51916)
* No need to implement ToXContentObject * Made index and id fields immutable.
This commit is contained in:
parent
3edadfefd0
commit
44ea1efd26
|
@ -21,13 +21,9 @@ package org.elasticsearch.client.core;
|
|||
|
||||
import org.elasticsearch.action.get.GetRequest;
|
||||
import org.elasticsearch.client.Validatable;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class GetSourceRequest implements Validatable, ToXContentObject {
|
||||
public final class GetSourceRequest implements Validatable {
|
||||
private String routing;
|
||||
private String preference;
|
||||
|
||||
|
@ -36,9 +32,9 @@ public final class GetSourceRequest implements Validatable, ToXContentObject {
|
|||
|
||||
private FetchSourceContext fetchSourceContext;
|
||||
|
||||
private String index;
|
||||
private final String index;
|
||||
private String type;
|
||||
private String id;
|
||||
private final String id;
|
||||
|
||||
public GetSourceRequest(String index, String id) {
|
||||
this.index = index;
|
||||
|
@ -102,11 +98,6 @@ public final class GetSourceRequest implements Validatable, ToXContentObject {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String index() {
|
||||
return index;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue