Package org.elasticsearch.client.ml
Class GetTrainedModelsRequest
java.lang.Object
org.elasticsearch.client.ml.GetTrainedModelsRequest
- All Implemented Interfaces:
Validatable
public class GetTrainedModelsRequest extends java.lang.Object implements Validatable
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALLOW_NO_MATCHstatic java.lang.StringDECOMPRESS_DEFINITIONstatic java.lang.StringFOR_EXPORTstatic java.lang.StringINCLUDE_MODEL_DEFINITIONstatic java.lang.StringTAGS -
Constructor Summary
Constructors Constructor Description GetTrainedModelsRequest(java.lang.String... ids) -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.BooleangetAllowNoMatch()static GetTrainedModelsRequestgetAllTrainedModelConfigsRequest()Helper method to create a request that will get ALL TrainedModelConfigsjava.lang.BooleangetDecompressDefinition()java.lang.BooleangetForExport()java.util.List<java.lang.String>getIds()java.lang.BooleangetIncludeDefinition()PageParamsgetPageParams()java.util.List<java.lang.String>getTags()inthashCode()GetTrainedModelsRequestsetAllowNoMatch(boolean allowNoMatch)Whether to ignore if a wildcard expression matches no trained models.GetTrainedModelsRequestsetDecompressDefinition(java.lang.Boolean decompressDefinition)Whether or not to decompress the trained model, or keep it in its compressed string formGetTrainedModelsRequestsetForExport(java.lang.Boolean forExport)Setting this flag to `true` removes certain fields from the model definition on retrieval.GetTrainedModelsRequestsetIncludeDefinition(java.lang.Boolean includeDefinition)Whether to include the full model definition.GetTrainedModelsRequestsetPageParams(PageParams pageParams)GetTrainedModelsRequestsetTags(java.lang.String... tags)SeesetTags(List)GetTrainedModelsRequestsetTags(java.util.List<java.lang.String> tags)The tags that the trained model must match.java.util.Optional<ValidationException>validate()Perform validation.
-
Field Details
-
ALLOW_NO_MATCH
public static final java.lang.String ALLOW_NO_MATCH- See Also:
- Constant Field Values
-
INCLUDE_MODEL_DEFINITION
public static final java.lang.String INCLUDE_MODEL_DEFINITION- See Also:
- Constant Field Values
-
FOR_EXPORT
public static final java.lang.String FOR_EXPORT- See Also:
- Constant Field Values
-
DECOMPRESS_DEFINITION
public static final java.lang.String DECOMPRESS_DEFINITION- See Also:
- Constant Field Values
-
TAGS
public static final java.lang.String TAGS- See Also:
- Constant Field Values
-
-
Constructor Details
-
GetTrainedModelsRequest
public GetTrainedModelsRequest(java.lang.String... ids)
-
-
Method Details
-
getAllTrainedModelConfigsRequest
Helper method to create a request that will get ALL TrainedModelConfigs- Returns:
- new
GetTrainedModelsRequestobject for the id "_all"
-
getIds
public java.util.List<java.lang.String> getIds() -
getAllowNoMatch
public java.lang.Boolean getAllowNoMatch() -
setAllowNoMatch
Whether to ignore if a wildcard expression matches no trained models.- Parameters:
allowNoMatch- If this isfalse, then an error is returned when a wildcard (or_all) does not match any trained models
-
getPageParams
-
setPageParams
-
getIncludeDefinition
public java.lang.Boolean getIncludeDefinition() -
setIncludeDefinition
Whether to include the full model definition. The full model definition can be very large.- Parameters:
includeDefinition- Iftrue, the definition is included.
-
getDecompressDefinition
public java.lang.Boolean getDecompressDefinition() -
setDecompressDefinition
Whether or not to decompress the trained model, or keep it in its compressed string form- Parameters:
decompressDefinition- Iftrue, the definition is decompressed.
-
getTags
public java.util.List<java.lang.String> getTags() -
setTags
The tags that the trained model must match. These correspond toTrainedModelConfig.getTags(). The models returned will match ALL tags supplied. If none are provided, only the provided ids are used to find models- Parameters:
tags- The tags to match when finding models
-
setTags
SeesetTags(List) -
getForExport
public java.lang.Boolean getForExport() -
setForExport
Setting this flag to `true` removes certain fields from the model definition on retrieval. This is useful when getting the model and wanting to put it in another cluster. Default value is false.- Parameters:
forExport- Boolean value indicating if certain fields should be removed from the mode on GET
-
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.
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-