Record Class DialogContext

java.lang.Object
java.lang.Record
org.openhab.core.voice.DialogContext

@NonNullByDefault public record DialogContext(@Nullable KSService ks, @Nullable String keyword, STTService stt, TTSService tts, @Nullable Voice voice, List<HumanLanguageInterpreter> hlis, AudioSource source, AudioSink sink, Locale locale, String dialogGroup, @Nullable String locationItem, @Nullable String listeningItem, @Nullable String listeningMelody) extends Record
Describes dialog configured services and options.
Author:
Miguel Álvarez - Initial contribution
  • Constructor Details

    • DialogContext

      public DialogContext(@Nullable KSService ks, @Nullable String keyword, STTService stt, TTSService tts, @Nullable Voice voice, List<HumanLanguageInterpreter> hlis, AudioSource source, AudioSink sink, Locale locale, String dialogGroup, @Nullable String locationItem, @Nullable String listeningItem, @Nullable String listeningMelody)
      Creates an instance of a DialogContext record class.
      Parameters:
      ks - the value for the ks record component
      keyword - the value for the keyword record component
      stt - the value for the stt record component
      tts - the value for the tts record component
      voice - the value for the voice record component
      hlis - the value for the hlis record component
      source - the value for the source record component
      sink - the value for the sink record component
      locale - the value for the locale record component
      dialogGroup - the value for the dialogGroup record component
      locationItem - the value for the locationItem record component
      listeningItem - the value for the listeningItem record component
      listeningMelody - the value for the listeningMelody 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.
    • ks

      public @Nullable KSService ks()
      Returns the value of the ks record component.
      Returns:
      the value of the ks record component
    • keyword

      public @Nullable String keyword()
      Returns the value of the keyword record component.
      Returns:
      the value of the keyword record component
    • stt

      public STTService stt()
      Returns the value of the stt record component.
      Returns:
      the value of the stt record component
    • tts

      public TTSService tts()
      Returns the value of the tts record component.
      Returns:
      the value of the tts record component
    • voice

      public @Nullable Voice voice()
      Returns the value of the voice record component.
      Returns:
      the value of the voice record component
    • hlis

      Returns the value of the hlis record component.
      Returns:
      the value of the hlis record component
    • source

      public AudioSource source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • sink

      public AudioSink sink()
      Returns the value of the sink record component.
      Returns:
      the value of the sink record component
    • locale

      public Locale locale()
      Returns the value of the locale record component.
      Returns:
      the value of the locale record component
    • dialogGroup

      public String dialogGroup()
      Returns the value of the dialogGroup record component.
      Returns:
      the value of the dialogGroup record component
    • locationItem

      public @Nullable String locationItem()
      Returns the value of the locationItem record component.
      Returns:
      the value of the locationItem record component
    • listeningItem

      public @Nullable String listeningItem()
      Returns the value of the listeningItem record component.
      Returns:
      the value of the listeningItem record component
    • listeningMelody

      public @Nullable String listeningMelody()
      Returns the value of the listeningMelody record component.
      Returns:
      the value of the listeningMelody record component