Class GetTrainedModelsRequest

java.lang.Object
org.elasticsearch.client.ml.GetTrainedModelsRequest
All Implemented Interfaces:
Validatable

public class GetTrainedModelsRequest
extends java.lang.Object
implements Validatable
  • Field Details

  • Constructor Details

    • GetTrainedModelsRequest

      public GetTrainedModelsRequest​(java.lang.String... ids)
  • Method Details

    • getAllTrainedModelConfigsRequest

      public static GetTrainedModelsRequest getAllTrainedModelConfigsRequest()
      Helper method to create a request that will get ALL TrainedModelConfigs
      Returns:
      new GetTrainedModelsRequest object for the id "_all"
    • getIds

      public java.util.List<java.lang.String> getIds()
    • getAllowNoMatch

      public java.lang.Boolean getAllowNoMatch()
    • setAllowNoMatch

      public GetTrainedModelsRequest setAllowNoMatch​(boolean allowNoMatch)
      Whether to ignore if a wildcard expression matches no trained models.
      Parameters:
      allowNoMatch - If this is false, then an error is returned when a wildcard (or _all) does not match any trained models
    • getPageParams

      public PageParams getPageParams()
    • setPageParams

      public GetTrainedModelsRequest setPageParams​(@Nullable PageParams pageParams)
    • getIncludes

      public java.util.Set<java.lang.String> getIncludes()
    • includeDefinition

      public GetTrainedModelsRequest includeDefinition()
    • includeTotalFeatureImportance

      public GetTrainedModelsRequest includeTotalFeatureImportance()
    • includeFeatureImportanceBaseline

      public GetTrainedModelsRequest includeFeatureImportanceBaseline()
    • setIncludeDefinition

      @Deprecated public GetTrainedModelsRequest setIncludeDefinition​(java.lang.Boolean includeDefinition)
      Deprecated.
      Whether to include the full model definition. The full model definition can be very large.
      Parameters:
      includeDefinition - If true, the definition is included.
    • getDecompressDefinition

      public java.lang.Boolean getDecompressDefinition()
    • setDecompressDefinition

      public GetTrainedModelsRequest setDecompressDefinition​(java.lang.Boolean decompressDefinition)
      Whether or not to decompress the trained model, or keep it in its compressed string form
      Parameters:
      decompressDefinition - If true, the definition is decompressed.
    • getTags

      public java.util.List<java.lang.String> getTags()
    • setTags

      public GetTrainedModelsRequest setTags​(java.util.List<java.lang.String> tags)
      The tags that the trained model must match. These correspond to TrainedModelConfig.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

      public GetTrainedModelsRequest setTags​(java.lang.String... tags)
    • getExcludeGenerated

      public java.lang.Boolean getExcludeGenerated()
    • setExcludeGenerated

      public GetTrainedModelsRequest setExcludeGenerated​(java.lang.Boolean excludeGenerated)
      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:
      excludeGenerated - Boolean value indicating if certain fields should be removed from the mode on GET
    • validate

      public java.util.Optional<ValidationException> validate()
      Description copied from interface: Validatable
      Perform 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. A ValidationException that is not null is assumed to contain validation errors and will be thrown.
      Specified by:
      validate in interface Validatable
      Returns:
      An Optional ValidationException that contains a list of validation errors.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object