Record Class OpenAiImageApi.OpenAiImageRequest

java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiImageApi.OpenAiImageRequest
Enclosing class:
OpenAiImageApi

public static record OpenAiImageApi.OpenAiImageRequest(String prompt, String model, Integer n, String quality, String responseFormat, String size, String style, String user) extends Record
  • Constructor Details

    • OpenAiImageRequest

      public OpenAiImageRequest(String prompt, String model)
    • OpenAiImageRequest

      public OpenAiImageRequest(String prompt, String model, Integer n, String quality, String responseFormat, String size, String style, String user)
      Creates an instance of a OpenAiImageRequest record class.
      Parameters:
      prompt - the value for the prompt record component
      model - the value for the model record component
      n - the value for the n record component
      quality - the value for the quality record component
      responseFormat - the value for the responseFormat record component
      size - the value for the size record component
      style - the value for the style record component
      user - the value for the user record component
  • Method Details

    • toString

      public final String toString()
      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()
      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)
      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.
    • prompt

      public String prompt()
      Returns the value of the prompt record component.
      Returns:
      the value of the prompt record component
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • n

      public Integer n()
      Returns the value of the n record component.
      Returns:
      the value of the n record component
    • quality

      public String quality()
      Returns the value of the quality record component.
      Returns:
      the value of the quality record component
    • responseFormat

      public String responseFormat()
      Returns the value of the responseFormat record component.
      Returns:
      the value of the responseFormat record component
    • size

      public String size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • style

      public String style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component
    • user

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