Class Completion

java.lang.Object
org.apache.juneau.bean.mcp.v20250618.Completion

@Marshalled public class Completion extends Object
Completion values for a "completion/complete" request.

This is a lossless wire carrier. It does not itself enforce the protocol's 100-value cap or any other server policy; dispatch is responsible for capping, ordering, and validating values before construction.

  • Constructor Details

  • Method Details

    • getValues

      public List<String> getValues()
      Candidate completion values.
      Returns:
      The values list, or null if not set.
    • setValues

      public Completion setValues(List<String> value)
      Sets the candidate completion values.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • setValues

      public Completion setValues(String... value)
      Sets the candidate completion values.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • addValues

      public Completion addValues(String... value)
      Appends to the candidate completion values.
      Parameters:
      value - The values to append.
      Returns:
      This object (for method chaining).
    • addValues

      Appends to the candidate completion values.
      Parameters:
      value - The values to append.
      Returns:
      This object (for method chaining).
    • getTotal

      public Integer getTotal()
      Optional total number of matches, which may exceed getValues() when truncated.
      Returns:
      The total, or null if not set.
    • setTotal

      public Completion setTotal(Integer value)
      Sets the total number of matches.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • getHasMore

      public Boolean getHasMore()
      Optional flag indicating additional values exist beyond getValues().
      Returns:
      The flag, or null if not set.
    • setHasMore

      public Completion setHasMore(Boolean value)
      Sets the has-more flag.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).