Class Error

java.lang.Object
com.sap.ai.sdk.orchestration.model.Error

public class Error extends Object
Error
  • Constructor Details

    • Error

      protected Error()
      Default constructor for Error.
  • Method Details

    • requestId

      @Nonnull public Error requestId(@Nonnull String requestId)
      Set the requestId of this Error instance and return the same instance.
      Parameters:
      requestId - The requestId of this Error
      Returns:
      The same instance of this Error class
    • getRequestId

      @Nonnull public String getRequestId()
      Get requestId
      Returns:
      requestId The requestId of this Error instance.
    • setRequestId

      public void setRequestId(@Nonnull String requestId)
      Set the requestId of this Error instance.
      Parameters:
      requestId - The requestId of this Error
    • code

      @Nonnull public Error code(@Nonnull Integer code)
      Set the code of this Error instance and return the same instance.
      Parameters:
      code - The code of this Error
      Returns:
      The same instance of this Error class
    • getCode

      @Nonnull public Integer getCode()
      Get code
      Returns:
      code The code of this Error instance.
    • setCode

      public void setCode(@Nonnull Integer code)
      Set the code of this Error instance.
      Parameters:
      code - The code of this Error
    • message

      @Nonnull public Error message(@Nonnull String message)
      Set the message of this Error instance and return the same instance.
      Parameters:
      message - The message of this Error
      Returns:
      The same instance of this Error class
    • getMessage

      @Nonnull public String getMessage()
      Get message
      Returns:
      message The message of this Error instance.
    • setMessage

      public void setMessage(@Nonnull String message)
      Set the message of this Error instance.
      Parameters:
      message - The message of this Error
    • location

      @Nonnull public Error location(@Nonnull String location)
      Set the location of this Error instance and return the same instance.
      Parameters:
      location - Where the error occurred
      Returns:
      The same instance of this Error class
    • getLocation

      @Nonnull public String getLocation()
      Where the error occurred
      Returns:
      location The location of this Error instance.
    • setLocation

      public void setLocation(@Nonnull String location)
      Set the location of this Error instance.
      Parameters:
      location - Where the error occurred
    • intermediateResults

      @Nonnull public Error intermediateResults(@Nullable ModuleResults intermediateResults)
      Set the intermediateResults of this Error instance and return the same instance.
      Parameters:
      intermediateResults - The intermediateResults of this Error
      Returns:
      The same instance of this Error class
    • getIntermediateResults

      @Nonnull public ModuleResults getIntermediateResults()
      Get intermediateResults
      Returns:
      intermediateResults The intermediateResults of this Error instance.
    • setIntermediateResults

      public void setIntermediateResults(@Nullable ModuleResults intermediateResults)
      Set the intermediateResults of this Error instance.
      Parameters:
      intermediateResults - The intermediateResults of this Error
    • headers

      @Nonnull public Error headers(@Nullable Map<String,String> headers)
      Set the headers of this Error instance and return the same instance.
      Parameters:
      headers - HTTP headers returned from the failed request attempt
      Returns:
      The same instance of this Error class
    • putheadersItem

      @Nonnull public Error putheadersItem(@Nonnull String key, @Nonnull String headersItem)
      Put one headers instance to this Error instance.
      Parameters:
      key - The String key of this headers instance
      headersItem - The headers that should be added under the given key
      Returns:
      The same instance of type Error
    • getHeaders

      @Nonnull public Map<String,String> getHeaders()
      HTTP headers returned from the failed request attempt
      Returns:
      headers The headers of this Error instance.
    • setHeaders

      public void setHeaders(@Nullable Map<String,String> headers)
      Set the headers of this Error instance.
      Parameters:
      headers - HTTP headers returned from the failed request attempt
    • getCustomFieldNames

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