Fix compilation after merging XContent changes
A backport missed these usages that had been removed. Original commit: elastic/x-pack-elasticsearch@9e47562dd1
This commit is contained in:
parent
9cfc759cfc
commit
7cb5378f82
|
@ -173,7 +173,7 @@ public class ActionWrapper implements ToXContentObject {
|
|||
builder.startObject();
|
||||
TimeValue throttlePeriod = throttler.throttlePeriod();
|
||||
if (throttlePeriod != null) {
|
||||
builder.timeValueField(ThrottlerField.THROTTLE_PERIOD.getPreferredName(),
|
||||
builder.humanReadableField(ThrottlerField.THROTTLE_PERIOD.getPreferredName(),
|
||||
ThrottlerField.THROTTLE_PERIOD_HUMAN.getPreferredName(), throttlePeriod);
|
||||
}
|
||||
if (condition != null) {
|
||||
|
|
|
@ -152,7 +152,7 @@ public class WatchSourceBuilder implements ToXContentObject {
|
|||
}
|
||||
|
||||
if (defaultThrottlePeriod != null) {
|
||||
builder.timeValueField(WatchField.THROTTLE_PERIOD.getPreferredName(),
|
||||
builder.humanReadableField(WatchField.THROTTLE_PERIOD.getPreferredName(),
|
||||
WatchField.THROTTLE_PERIOD_HUMAN.getPreferredName(), defaultThrottlePeriod);
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ public class WatchSourceBuilder implements ToXContentObject {
|
|||
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
|
||||
builder.startObject();
|
||||
if (throttlePeriod != null) {
|
||||
builder.timeValueField(ThrottlerField.THROTTLE_PERIOD.getPreferredName(),
|
||||
builder.humanReadableField(ThrottlerField.THROTTLE_PERIOD.getPreferredName(),
|
||||
ThrottlerField.THROTTLE_PERIOD_HUMAN.getPreferredName(), throttlePeriod);
|
||||
}
|
||||
if (condition != null) {
|
||||
|
|
|
@ -143,7 +143,7 @@ public class Watch implements ToXContentObject {
|
|||
builder.field(WatchField.TRANSFORM.getPreferredName()).startObject().field(transform.type(), transform, params).endObject();
|
||||
}
|
||||
if (throttlePeriod != null) {
|
||||
builder.timeValueField(WatchField.THROTTLE_PERIOD.getPreferredName(),
|
||||
builder.humanReadableField(WatchField.THROTTLE_PERIOD.getPreferredName(),
|
||||
WatchField.THROTTLE_PERIOD_HUMAN.getPreferredName(), throttlePeriod);
|
||||
}
|
||||
builder.startObject(WatchField.ACTIONS.getPreferredName());
|
||||
|
|
|
@ -110,7 +110,7 @@ public class IndexAction implements Action {
|
|||
builder.field(Field.EXECUTION_TIME_FIELD.getPreferredName(), executionTimeField);
|
||||
}
|
||||
if (timeout != null) {
|
||||
builder.timeValueField(Field.TIMEOUT.getPreferredName(), Field.TIMEOUT_HUMAN.getPreferredName(), timeout);
|
||||
builder.humanReadableField(Field.TIMEOUT.getPreferredName(), Field.TIMEOUT_HUMAN.getPreferredName(), timeout);
|
||||
}
|
||||
if (dynamicNameTimeZone != null) {
|
||||
builder.field(Field.DYNAMIC_NAME_TIMEZONE.getPreferredName(), dynamicNameTimeZone);
|
||||
|
|
|
@ -160,11 +160,11 @@ public class HttpRequest implements ToXContentObject {
|
|||
builder.field(Field.BODY.getPreferredName(), body);
|
||||
}
|
||||
if (connectionTimeout != null) {
|
||||
builder.timeValueField(HttpRequest.Field.CONNECTION_TIMEOUT.getPreferredName(),
|
||||
builder.humanReadableField(HttpRequest.Field.CONNECTION_TIMEOUT.getPreferredName(),
|
||||
HttpRequest.Field.CONNECTION_TIMEOUT_HUMAN.getPreferredName(), connectionTimeout);
|
||||
}
|
||||
if (readTimeout != null) {
|
||||
builder.timeValueField(HttpRequest.Field.READ_TIMEOUT.getPreferredName(),
|
||||
builder.humanReadableField(HttpRequest.Field.READ_TIMEOUT.getPreferredName(),
|
||||
HttpRequest.Field.READ_TIMEOUT_HUMAN.getPreferredName(), readTimeout);
|
||||
}
|
||||
if (proxy != null) {
|
||||
|
|
|
@ -192,11 +192,11 @@ public class HttpRequestTemplate implements ToXContentObject {
|
|||
builder.field(HttpRequest.Field.BODY.getPreferredName(), body, params);
|
||||
}
|
||||
if (connectionTimeout != null) {
|
||||
builder.timeValueField(HttpRequest.Field.CONNECTION_TIMEOUT.getPreferredName(),
|
||||
builder.humanReadableField(HttpRequest.Field.CONNECTION_TIMEOUT.getPreferredName(),
|
||||
HttpRequest.Field.CONNECTION_TIMEOUT_HUMAN.getPreferredName(), connectionTimeout);
|
||||
}
|
||||
if (readTimeout != null) {
|
||||
builder.timeValueField(HttpRequest.Field.READ_TIMEOUT.getPreferredName(),
|
||||
builder.humanReadableField(HttpRequest.Field.READ_TIMEOUT.getPreferredName(),
|
||||
HttpRequest.Field.READ_TIMEOUT_HUMAN.getPreferredName(), readTimeout);
|
||||
}
|
||||
if (proxy != null) {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class SearchInput implements Input {
|
|||
builder.field(Field.EXTRACT.getPreferredName(), extractKeys);
|
||||
}
|
||||
if (timeout != null) {
|
||||
builder.timeValueField(Field.TIMEOUT.getPreferredName(), Field.TIMEOUT_HUMAN.getPreferredName(), timeout);
|
||||
builder.humanReadableField(Field.TIMEOUT.getPreferredName(), Field.TIMEOUT_HUMAN.getPreferredName(), timeout);
|
||||
}
|
||||
if (dynamicNameTimeZone != null) {
|
||||
builder.field(Field.DYNAMIC_NAME_TIMEZONE.getPreferredName(), dynamicNameTimeZone);
|
||||
|
|
|
@ -79,7 +79,7 @@ public class SearchTransform implements Transform {
|
|||
builder.field(Field.REQUEST.getPreferredName(), request);
|
||||
}
|
||||
if (timeout != null) {
|
||||
builder.timeValueField(Field.TIMEOUT.getPreferredName(), Field.TIMEOUT_HUMAN.getPreferredName(), timeout);
|
||||
builder.humanReadableField(Field.TIMEOUT.getPreferredName(), Field.TIMEOUT_HUMAN.getPreferredName(), timeout);
|
||||
}
|
||||
if (dynamicNameTimeZone != null) {
|
||||
builder.field(Field.DYNAMIC_NAME_TIMEZONE.getPreferredName(), dynamicNameTimeZone);
|
||||
|
|
Loading…
Reference in New Issue