Record Class SpeechRequest.Builder

java.lang.Object
java.lang.Record
bg.codexio.ai.openai.api.payload.voice.request.SpeechRequest.Builder
Enclosing class:
SpeechRequest

public static record SpeechRequest.Builder(String model, String input, String voice, String responseFormat, Double speed) extends Record
  • Constructor Details

    • Builder

      public Builder(String model, String input, String voice, String responseFormat, Double speed)
      Creates an instance of a Builder record class.
      Parameters:
      model - the value for the model record component
      input - the value for the input record component
      voice - the value for the voice record component
      responseFormat - the value for the responseFormat record component
      speed - the value for the speed record component
  • Method Details

    • withModel

      public SpeechRequest.Builder withModel(String model)
    • withInput

      public SpeechRequest.Builder withInput(String input)
    • withVoice

      public SpeechRequest.Builder withVoice(String voice)
    • withFormat

      public SpeechRequest.Builder withFormat(String responseFormat)
    • withSpeed

      public SpeechRequest.Builder withSpeed(Double speed)
    • build

      public SpeechRequest build()
    • 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.
    • model

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

      public String input()
      Returns the value of the input record component.
      Returns:
      the value of the input record component
    • voice

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

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

      public Double speed()
      Returns the value of the speed record component.
      Returns:
      the value of the speed record component