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
Modifier and TypeClassDescriptionstatic class
Builder forDialogContext
Allows to describe a dialog context without requiring the involved services to be loaded -
Constructor Summary
ConstructorDescriptionDialogContext
(@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 aDialogContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedialogGroup
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.hlis()
Returns the value of thehlis
record component.@Nullable String
keyword()
Returns the value of thekeyword
record component.@Nullable KSService
ks()
Returns the value of theks
record component.@Nullable String
Returns the value of thelisteningItem
record component.@Nullable String
Returns the value of thelisteningMelody
record component.locale()
Returns the value of thelocale
record component.@Nullable String
Returns the value of thelocationItem
record component.sink()
Returns the value of thesink
record component.source()
Returns the value of thesource
record component.stt()
Returns the value of thestt
record component.final String
toString()
Returns a string representation of this record class.tts()
Returns the value of thetts
record component.@Nullable Voice
voice()
Returns the value of thevoice
record 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 aDialogContext
record class.- Parameters:
ks
- the value for theks
record componentkeyword
- the value for thekeyword
record componentstt
- the value for thestt
record componenttts
- the value for thetts
record componentvoice
- the value for thevoice
record componenthlis
- the value for thehlis
record componentsource
- the value for thesource
record componentsink
- the value for thesink
record componentlocale
- the value for thelocale
record componentdialogGroup
- the value for thedialogGroup
record componentlocationItem
- the value for thelocationItem
record componentlisteningItem
- the value for thelisteningItem
record componentlisteningMelody
- the value for thelisteningMelody
record 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 theks
record component.- Returns:
- the value of the
ks
record component
-
keyword
Returns the value of thekeyword
record component.- Returns:
- the value of the
keyword
record component
-
stt
Returns the value of thestt
record component.- Returns:
- the value of the
stt
record component
-
tts
Returns the value of thetts
record component.- Returns:
- the value of the
tts
record component
-
voice
Returns the value of thevoice
record component.- Returns:
- the value of the
voice
record component
-
hlis
Returns the value of thehlis
record component.- Returns:
- the value of the
hlis
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
sink
Returns the value of thesink
record component.- Returns:
- the value of the
sink
record component
-
locale
Returns the value of thelocale
record component.- Returns:
- the value of the
locale
record component
-
dialogGroup
Returns the value of thedialogGroup
record component.- Returns:
- the value of the
dialogGroup
record component
-
locationItem
Returns the value of thelocationItem
record component.- Returns:
- the value of the
locationItem
record component
-
listeningItem
Returns the value of thelisteningItem
record component.- Returns:
- the value of the
listeningItem
record component
-
listeningMelody
Returns the value of thelisteningMelody
record component.- Returns:
- the value of the
listeningMelody
record component
-