Package com.sap.ai.sdk.prompt.registry.model

# Class MessageToolCall

java.lang.Object
com.sap.ai.sdk.prompt.registry.model.MessageToolCall

public class MessageToolCall extends Object
MessageToolCall

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `MessageToolCall.Builder`
  Builder helper class.
  `static interface`
  `MessageToolCall.Builder1`
  Builder helper class.
  `static interface`
  `MessageToolCall.Builder2`
  Builder helper class.
  `static enum`
  `MessageToolCall.TypeEnum`
  The type of the tool.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `MessageToolCall()`
  Default constructor for MessageToolCall.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MessageToolCall.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `MessageToolCall` instance with all required arguments.
  `boolean`
  `equals(Object o)`
  `MessageToolCall`
  `function(MessageToolCallFunction function)`
  Set the function of this `MessageToolCall` instance and return the same instance.
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `MessageToolCall`.
  `MessageToolCallFunction`
  `getFunction()`
  Get function
  `String`
  `getId()`
  The ID of the tool call.
  `MessageToolCall.TypeEnum`
  `getType()`
  The type of the tool.
  `int`
  `hashCode()`
  `MessageToolCall`
  `id(String id)`
  Set the id of this `MessageToolCall` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `MessageToolCall` instance.
  `void`
  `setFunction(MessageToolCallFunction function)`
  Set the function of this `MessageToolCall` instance.
  `void`
  `setId(String id)`
  Set the id of this `MessageToolCall` instance.
  `void`
  `setType(MessageToolCall.TypeEnum type)`
  Set the type of this `MessageToolCall` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `MessageToolCall` instance including unrecognized properties.
  `String`
  `toString()`
  `MessageToolCall`
  `type(MessageToolCall.TypeEnum type)`
  Set the type of this `MessageToolCall` instance and return the same instance.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MessageToolCall

    protected MessageToolCall()
    Default constructor for MessageToolCall.

- ## Method Details

  - ### id

    @Nonnull public MessageToolCall id(@Nonnull String id)
    Set the id of this `MessageToolCall` instance and return the same instance.
    Parameters:
      `id` - The ID of the tool call.
    Returns:
      The same instance of this `MessageToolCall` class

  - ### getId

    @Nonnull public String getId()
    The ID of the tool call.
    Returns:
      id The id of this `MessageToolCall` instance.

  - ### setId

    public void setId(@Nonnull String id)
    Set the id of this `MessageToolCall` instance.
    Parameters:
      `id` - The ID of the tool call.

  - ### type

    @Nonnull public MessageToolCall type(@Nonnull MessageToolCall.TypeEnum type)
    Set the type of this `MessageToolCall` instance and return the same instance.
    Parameters:
      `type` - The type of the tool. Currently, only `function` is supported.
    Returns:
      The same instance of this `MessageToolCall` class

  - ### getType

    @Nonnull public MessageToolCall.TypeEnum getType()
    The type of the tool. Currently, only `function` is supported.
    Returns:
      type The type of this `MessageToolCall` instance.

  - ### setType

    public void setType(@Nonnull MessageToolCall.TypeEnum type)
    Set the type of this `MessageToolCall` instance.
    Parameters:
      `type` - The type of the tool. Currently, only `function` is supported.

  - ### function

    @Nonnull public MessageToolCall function(@Nonnull MessageToolCallFunction function)
    Set the function of this `MessageToolCall` instance and return the same instance.
    Parameters:
      `function` - The function of this `MessageToolCall`
    Returns:
      The same instance of this `MessageToolCall` class

  - ### getFunction

    @Nonnull public MessageToolCallFunction getFunction()
    Get function
    Returns:
      function The function of this `MessageToolCall` instance.

  - ### setFunction

    public void setFunction(@Nonnull MessageToolCallFunction function)
    Set the function of this `MessageToolCall` instance.
    Parameters:
      `function` - The function of this `MessageToolCall`

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `MessageToolCall`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `MessageToolCall` instance.
    Parameters:
      `name` - The name of the property
    Returns:
      The value of the property
    Throws:
      `NoSuchElementException` - If no property with the given name could be found.

  - ### toMap

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `MessageToolCall` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `MessageToolCall` instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
    Parameters:
      `customFieldName` - The name of the property
      `customFieldValue` - The value of the property

  - ### equals

    public boolean equals(@Nullable Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    @Nonnull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### create

    public static MessageToolCall.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `MessageToolCall` instance with all required arguments.