Package org.openhab.core.voice
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder forDialogContextAllows to describe a dialog context without requiring the involved services to be loaded -
Constructor Summary
ConstructorsConstructorDescriptionDialogContext(@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 aDialogContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedialogGrouprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hlis()Returns the value of thehlisrecord component.@Nullable Stringkeyword()Returns the value of thekeywordrecord component.@Nullable KSServiceks()Returns the value of theksrecord component.@Nullable StringReturns the value of thelisteningItemrecord component.@Nullable StringReturns the value of thelisteningMelodyrecord component.locale()Returns the value of thelocalerecord component.@Nullable StringReturns the value of thelocationItemrecord component.sink()Returns the value of thesinkrecord component.source()Returns the value of thesourcerecord component.stt()Returns the value of thesttrecord component.final StringtoString()Returns a string representation of this record class.tts()Returns the value of thettsrecord component.@Nullable Voicevoice()Returns the value of thevoicerecord component.
-
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 aDialogContextrecord class.- Parameters:
ks- the value for theksrecord componentkeyword- the value for thekeywordrecord componentstt- the value for thesttrecord componenttts- the value for thettsrecord componentvoice- the value for thevoicerecord componenthlis- the value for thehlisrecord componentsource- the value for thesourcerecord componentsink- the value for thesinkrecord componentlocale- the value for thelocalerecord componentdialogGroup- the value for thedialogGrouprecord componentlocationItem- the value for thelocationItemrecord componentlisteningItem- the value for thelisteningItemrecord componentlisteningMelody- the value for thelisteningMelodyrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
ks
Returns the value of theksrecord component.- Returns:
- the value of the
ksrecord component
-
keyword
Returns the value of thekeywordrecord component.- Returns:
- the value of the
keywordrecord component
-
stt
Returns the value of thesttrecord component.- Returns:
- the value of the
sttrecord component
-
tts
Returns the value of thettsrecord component.- Returns:
- the value of the
ttsrecord component
-
voice
Returns the value of thevoicerecord component.- Returns:
- the value of the
voicerecord component
-
hlis
Returns the value of thehlisrecord component.- Returns:
- the value of the
hlisrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
sink
Returns the value of thesinkrecord component.- Returns:
- the value of the
sinkrecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-
dialogGroup
Returns the value of thedialogGrouprecord component.- Returns:
- the value of the
dialogGrouprecord component
-
locationItem
Returns the value of thelocationItemrecord component.- Returns:
- the value of the
locationItemrecord component
-
listeningItem
Returns the value of thelisteningItemrecord component.- Returns:
- the value of the
listeningItemrecord component
-
listeningMelody
Returns the value of thelisteningMelodyrecord component.- Returns:
- the value of the
listeningMelodyrecord component
-