Package com.sap.ai.sdk.orchestration

# Class ResponseJsonSchema

java.lang.Object
com.sap.ai.sdk.orchestration.ResponseJsonSchema

public final class ResponseJsonSchema extends Object
The schema object to use for the response format parameter in `OrchestrationTemplate`.

Since:
  1.4.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `static ResponseJsonSchema`
  `fromMap(Map<String,Object> schemaMap, String name)`
  Create a new instance of `ResponseJsonSchema` with the given schema map and name.
  `static ResponseJsonSchema`
  `fromType(Type classType)`
  Create a new instance of `ResponseJsonSchema` from a given class.
  `String`
  `getDescription()`
  `String`
  `getName()`
  `Map<String,Object>`
  `getSchemaMap()`
  `Boolean`
  `getStrict()`
  ⚠️ Fields of the schema class should be annotated with `@JsonProperty(required = true)` to not fail requests if set to true.
  `int`
  `hashCode()`
  `String`
  `toString()`
  `ResponseJsonSchema`
  `withDescription(String description)`
  `ResponseJsonSchema`
  `withName(String name)`
  `ResponseJsonSchema`
  `withSchemaMap(Map<String,Object> schemaMap)`
  `ResponseJsonSchema`
  `withStrict(Boolean strict)`
  ⚠️ Fields of the schema class should be annotated with `@JsonProperty(required = true)` to not fail requests if set to true.

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

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

- ## Method Details

  - ### fromMap

    @Nonnull public static ResponseJsonSchema fromMap(@Nonnull Map<String,Object> schemaMap, @Nonnull String name)
    Create a new instance of `ResponseJsonSchema` with the given schema map and name.
    Parameters:
      `schemaMap` - The schema map
      `name` - The name of the schema
    Returns:
      The new instance of `ResponseJsonSchema`

  - ### fromType

    @Nonnull public static ResponseJsonSchema fromType(@Nonnull Type classType)
    Create a new instance of `ResponseJsonSchema` from a given class.

    ⚠️ Fields of the schema class should be annotated with `@JsonProperty(required = true)`.

    Parameters:
      `classType` - The class to generate the schema from
    Returns:
      The new instance of `ResponseJsonSchema`

  - ### getSchemaMap

    @Nonnull public Map<String,Object> getSchemaMap()

  - ### getName

    @Nonnull public String getName()

  - ### getDescription

    @Nullable public String getDescription()

  - ### getStrict

    @Nullable public Boolean getStrict()
    ⚠️ Fields of the schema class should be annotated with `@JsonProperty(required = true)` to not fail requests if set to true.

  - ### equals

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

  - ### hashCode

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

  - ### toString

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

  - ### withSchemaMap

    public ResponseJsonSchema withSchemaMap(@Nonnull Map<String,Object> schemaMap)
    Returns:
      a clone of this object, except with this updated property (returns `this` if an identical value is passed).

  - ### withName

    public ResponseJsonSchema withName(@Nonnull String name)
    Returns:
      a clone of this object, except with this updated property (returns `this` if an identical value is passed).

  - ### withDescription

    public ResponseJsonSchema withDescription(@Nullable String description)
    Returns:
      a clone of this object, except with this updated property (returns `this` if an identical value is passed).

  - ### withStrict

    public ResponseJsonSchema withStrict(@Nullable Boolean strict)
    ⚠️ Fields of the schema class should be annotated with `@JsonProperty(required = true)` to not fail requests if set to true.
    Returns:
      a clone of this object, except with this updated property (returns `this` if an identical value is passed).