Module it.auties.cobalt
Record Class HighlyStructuredMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,HighlyStructuredFourRowTemplateTitle,ButtonMessage,Message
public record HighlyStructuredMessage(String namespace, String elementName, List<String> params, Optional<String> fallbackLg, Optional<String> fallbackLc, List<HighlyStructuredLocalizableParameter> localizableParameters, Optional<String> deterministicLg, Optional<String> deterministicLc, TemplateMessage templateMessage)
extends Record
implements ButtonMessage, HighlyStructuredFourRowTemplateTitle
A model class that represents a message that contains a highly structured message inside. Not
really clear how this could be used, contributions are welcomed.
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hsm.HighlyStructuredFourRowTemplateTitle
HighlyStructuredFourRowTemplateTitle.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thedeterministicLcrecord component.The field for thedeterministicLgrecord component.private final StringThe field for theelementNamerecord component.The field for thefallbackLcrecord component.The field for thefallbackLgrecord component.private final List<HighlyStructuredLocalizableParameter> The field for thelocalizableParametersrecord component.private final StringThe field for thenamespacerecord component.The field for theparamsrecord component.private final TemplateMessageThe field for thetemplateMessagerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHighlyStructuredMessage(String namespace, String elementName, List<String> params, Optional<String> fallbackLg, Optional<String> fallbackLc, List<HighlyStructuredLocalizableParameter> localizableParameters, Optional<String> deterministicLg, Optional<String> deterministicLc, TemplateMessage templateMessage) Creates an instance of aHighlyStructuredMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeterministicLcrecord component.Returns the value of thedeterministicLgrecord component.Returns the value of theelementNamerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallbackLcrecord component.Returns the value of thefallbackLgrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelocalizableParametersrecord component.Returns the value of thenamespacerecord component.params()Returns the value of theparamsrecord component.Returns the value of thetemplateMessagerecord component.Return the type of this titlefinal StringtoString()Returns a string representation of this record class.type()Return message typeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.ButtonMessage
category
-
Field Details
-
namespace
The field for thenamespacerecord component. -
elementName
The field for theelementNamerecord component. -
params
The field for theparamsrecord component. -
fallbackLg
The field for thefallbackLgrecord component. -
fallbackLc
The field for thefallbackLcrecord component. -
localizableParameters
The field for thelocalizableParametersrecord component. -
deterministicLg
The field for thedeterministicLgrecord component. -
deterministicLc
The field for thedeterministicLcrecord component. -
templateMessage
The field for thetemplateMessagerecord component.
-
-
Constructor Details
-
HighlyStructuredMessage
public HighlyStructuredMessage(String namespace, String elementName, List<String> params, Optional<String> fallbackLg, Optional<String> fallbackLc, List<HighlyStructuredLocalizableParameter> localizableParameters, Optional<String> deterministicLg, Optional<String> deterministicLc, TemplateMessage templateMessage) Creates an instance of aHighlyStructuredMessagerecord class.- Parameters:
namespace- the value for thenamespacerecord componentelementName- the value for theelementNamerecord componentparams- the value for theparamsrecord componentfallbackLg- the value for thefallbackLgrecord componentfallbackLc- the value for thefallbackLcrecord componentlocalizableParameters- the value for thelocalizableParametersrecord componentdeterministicLg- the value for thedeterministicLgrecord componentdeterministicLc- the value for thedeterministicLcrecord componenttemplateMessage- the value for thetemplateMessagerecord component
-
-
Method Details
-
type
Description copied from interface:MessageReturn message type -
titleType
Description copied from interface:HighlyStructuredFourRowTemplateTitleReturn the type of this title- Specified by:
titleTypein interfaceHighlyStructuredFourRowTemplateTitle- Returns:
- a non-null type
-
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). -
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
elementName
Returns the value of theelementNamerecord component.- Returns:
- the value of the
elementNamerecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-
fallbackLg
Returns the value of thefallbackLgrecord component.- Returns:
- the value of the
fallbackLgrecord component
-
fallbackLc
Returns the value of thefallbackLcrecord component.- Returns:
- the value of the
fallbackLcrecord component
-
localizableParameters
Returns the value of thelocalizableParametersrecord component.- Returns:
- the value of the
localizableParametersrecord component
-
deterministicLg
Returns the value of thedeterministicLgrecord component.- Returns:
- the value of the
deterministicLgrecord component
-
deterministicLc
Returns the value of thedeterministicLcrecord component.- Returns:
- the value of the
deterministicLcrecord component
-
templateMessage
Returns the value of thetemplateMessagerecord component.- Returns:
- the value of the
templateMessagerecord component
-