Record Class McpSchema.LegacyTitledEnumSchema

java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.LegacyTitledEnumSchema
Record Components:
title - Optional title for the enum field
description - Optional description for the enum field
enumValues - Array of enum values to choose from
enumNames - Optional display names for enum values (non-standard per JSON Schema 2020-12)
defaultValue - Optional default value
Enclosing class:
McpSchema

@Deprecated public static record McpSchema.LegacyTitledEnumSchema(String title, String description, List<String> enumValues, List<String> enumNames, String defaultValue) extends Record
Legacy enum schema with optional display names via the non-standard enumNames property. Use McpSchema.TitledSingleSelectEnumSchema instead.
  • Constructor Details

    • LegacyTitledEnumSchema

      public LegacyTitledEnumSchema(String title, String description, List<String> enumValues, List<String> enumNames, String defaultValue)
      Deprecated.
      Creates an instance of a LegacyTitledEnumSchema record class.
      Parameters:
      title - the value for the title record component
      description - the value for the description record component
      enumValues - the value for the enumValues record component
      enumNames - the value for the enumNames record component
      defaultValue - the value for the defaultValue record component
  • Method Details

    • type

      public String type()
      Deprecated.
    • builder

      Deprecated.
    • toString

      public final String toString()
      Deprecated.
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Deprecated.
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Deprecated.
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • title

      public String title()
      Deprecated.
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • description

      public String description()
      Deprecated.
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • enumValues

      public List<String> enumValues()
      Deprecated.
      Returns the value of the enumValues record component.
      Returns:
      the value of the enumValues record component
    • enumNames

      public List<String> enumNames()
      Deprecated.
      Returns the value of the enumNames record component.
      Returns:
      the value of the enumNames record component
    • defaultValue

      public String defaultValue()
      Deprecated.
      Returns the value of the defaultValue record component.
      Returns:
      the value of the defaultValue record component