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

# Class ResponseFormatJsonSchema

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

All Implemented Interfaces:
  `PromptTemplateSpecResponseFormat`, `TemplateResponseFormat`

public class ResponseFormatJsonSchema extends Object implements PromptTemplateSpecResponseFormat, TemplateResponseFormat
ResponseFormatJsonSchema

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `ResponseFormatJsonSchema.Builder`
  Builder helper class.
  `static interface`
  `ResponseFormatJsonSchema.Builder1`
  Builder helper class.
  `static enum`
  `ResponseFormatJsonSchema.TypeEnum`
  The type of response format being defined: `json_schema`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ResponseFormatJsonSchema.Builder`
  `create()`
  Create a type-safe, fluent-api builder object to construct a new `ResponseFormatJsonSchema` instance with all required arguments.
  `boolean`
  `equals(Object o)`
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `ResponseFormatJsonSchema`.
  `ResponseFormatJsonSchemaJsonSchema`
  `getJsonSchema()`
  Get jsonSchema
  `ResponseFormatJsonSchema.TypeEnum`
  `getType()`
  The type of response format being defined: `json_schema`
  `int`
  `hashCode()`
  `ResponseFormatJsonSchema`
  `jsonSchema(ResponseFormatJsonSchemaJsonSchema jsonSchema)`
  Set the jsonSchema of this `ResponseFormatJsonSchema` instance and return the same instance.
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `ResponseFormatJsonSchema` instance.
  `void`
  `setJsonSchema(ResponseFormatJsonSchemaJsonSchema jsonSchema)`
  Set the jsonSchema of this `ResponseFormatJsonSchema` instance.
  `void`
  `setType(ResponseFormatJsonSchema.TypeEnum type)`
  Set the type of this `ResponseFormatJsonSchema` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `ResponseFormatJsonSchema` instance including unrecognized properties.
  `String`
  `toString()`
  `ResponseFormatJsonSchema`
  `type(ResponseFormatJsonSchema.TypeEnum type)`
  Set the type of this `ResponseFormatJsonSchema` instance and return the same instance.

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

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

- ## Constructor Details

  - ### ResponseFormatJsonSchema

    protected ResponseFormatJsonSchema()
    Default constructor for ResponseFormatJsonSchema.

- ## Method Details

  - ### type

    @Nonnull public ResponseFormatJsonSchema type(@Nonnull ResponseFormatJsonSchema.TypeEnum type)
    Set the type of this `ResponseFormatJsonSchema` instance and return the same instance.
    Parameters:
      `type` - The type of response format being defined: `json_schema`
    Returns:
      The same instance of this `ResponseFormatJsonSchema` class

  - ### getType

    @Nonnull public ResponseFormatJsonSchema.TypeEnum getType()
    The type of response format being defined: `json_schema`
    Returns:
      type The type of this `ResponseFormatJsonSchema` instance.

  - ### setType

    public void setType(@Nonnull ResponseFormatJsonSchema.TypeEnum type)
    Set the type of this `ResponseFormatJsonSchema` instance.
    Parameters:
      `type` - The type of response format being defined: `json_schema`

  - ### jsonSchema

    @Nonnull public ResponseFormatJsonSchema jsonSchema(@Nonnull ResponseFormatJsonSchemaJsonSchema jsonSchema)
    Set the jsonSchema of this `ResponseFormatJsonSchema` instance and return the same instance.
    Parameters:
      `jsonSchema` - The jsonSchema of this `ResponseFormatJsonSchema`
    Returns:
      The same instance of this `ResponseFormatJsonSchema` class

  - ### getJsonSchema

    @Nonnull public ResponseFormatJsonSchemaJsonSchema getJsonSchema()
    Get jsonSchema
    Returns:
      jsonSchema The jsonSchema of this `ResponseFormatJsonSchema` instance.

  - ### setJsonSchema

    public void setJsonSchema(@Nonnull ResponseFormatJsonSchemaJsonSchema jsonSchema)
    Set the jsonSchema of this `ResponseFormatJsonSchema` instance.
    Parameters:
      `jsonSchema` - The jsonSchema of this `ResponseFormatJsonSchema`

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `ResponseFormatJsonSchema`.
    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 `ResponseFormatJsonSchema` 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 `ResponseFormatJsonSchema` 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 `ResponseFormatJsonSchema` 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 ResponseFormatJsonSchema.Builder create()
    Create a type-safe, fluent-api builder object to construct a new `ResponseFormatJsonSchema` instance with all required arguments.