Class TermsGroupConfig
- java.lang.Object
-
- org.elasticsearch.client.rollup.job.config.TermsGroupConfig
-
- All Implemented Interfaces:
Validatable,ToXContent,ToXContentObject
public class TermsGroupConfig extends Object implements Validatable, ToXContentObject
The configuration object for the histograms in the rollup config { "groups": [ "terms": { "fields" : [ "foo", "bar" ] } ] }
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
-
Constructor Summary
Constructors Constructor Description TermsGroupConfig(String... fields)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)static TermsGroupConfigfromXContent(XContentParser parser)String[]getFields()inthashCode()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)Optional<ValidationException>validate()Perform validation.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
TermsGroupConfig
public TermsGroupConfig(String... fields)
-
-
Method Detail
-
validate
public Optional<ValidationException> validate()
Description copied from interface:ValidatablePerform validation. This method does not have to be overridden in the event that no validation needs to be done, or the validation was done during object construction time. AValidationExceptionthat is not null is assumed to contain validation errors and will be thrown.- Specified by:
validatein interfaceValidatable- Returns:
- An
OptionalValidationExceptionthat contains a list of validation errors.
-
getFields
public String[] getFields()
- Returns:
- the names of the fields. Never
null.
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
public static TermsGroupConfig fromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
-