Module it.auties.cobalt
Record Class HydratedFourRowTemplate
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplate
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,TemplateFormatter
public record HydratedFourRowTemplate(Optional<DocumentMessage> titleDocument, Optional<HydratedFourRowTemplateTextTitle> titleText, Optional<ImageMessage> titleImage, Optional<VideoOrGifMessage> titleVideo, Optional<LocationMessage> titleLocation, String body, Optional<String> footer, List<HydratedTemplateButton> hydratedButtons, String templateId)
extends Record
implements TemplateFormatter
A model class that represents a hydrated four row template
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.TemplateFormatter
TemplateFormatter.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thebodyrecord component.The field for thefooterrecord component.private final List<HydratedTemplateButton> The field for thehydratedButtonsrecord component.private final StringThe field for thetemplateIdrecord component.private final Optional<DocumentMessage> The field for thetitleDocumentrecord component.private final Optional<ImageMessage> The field for thetitleImagerecord component.private final Optional<LocationMessage> The field for thetitleLocationrecord component.private final Optional<HydratedFourRowTemplateTextTitle> The field for thetitleTextrecord component.private final Optional<VideoOrGifMessage> The field for thetitleVideorecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHydratedFourRowTemplate(Optional<DocumentMessage> titleDocument, Optional<HydratedFourRowTemplateTextTitle> titleText, Optional<ImageMessage> titleImage, Optional<VideoOrGifMessage> titleVideo, Optional<LocationMessage> titleLocation, String body, Optional<String> footer, List<HydratedTemplateButton> hydratedButtons, String templateId) Creates an instance of aHydratedFourRowTemplaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbody()Returns the value of thebodyrecord component.(package private) static HydratedFourRowTemplatecustomBuilder(HydratedFourRowTemplateTitle title, String body, String footer, List<HydratedTemplateButton> buttons, String templateId) final booleanIndicates whether some other object is "equal to" this one.footer()Returns the value of thefooterrecord component.private static List<HydratedTemplateButton> getIndexedButtons(List<HydratedTemplateButton> buttons) final inthashCode()Returns a hash code value for this object.Returns the value of thehydratedButtonsrecord component.Returns the value of thetemplateIdrecord component.Returns the type of this formatterOptional<? extends HydratedFourRowTemplateTitle> title()Returns the title of this templateReturns the value of thetitleDocumentrecord component.Returns the value of thetitleImagerecord component.Returns the value of thetitleLocationrecord component.Returns the value of thetitleTextrecord component.Returns the type of title that this template wrapsReturns the value of thetitleVideorecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
titleDocument
The field for thetitleDocumentrecord component. -
titleText
The field for thetitleTextrecord component. -
titleImage
The field for thetitleImagerecord component. -
titleVideo
The field for thetitleVideorecord component. -
titleLocation
The field for thetitleLocationrecord component. -
body
The field for thebodyrecord component. -
hydratedButtons
The field for thehydratedButtonsrecord component. -
templateId
The field for thetemplateIdrecord component.
-
-
Constructor Details
-
HydratedFourRowTemplate
public HydratedFourRowTemplate(Optional<DocumentMessage> titleDocument, Optional<HydratedFourRowTemplateTextTitle> titleText, Optional<ImageMessage> titleImage, Optional<VideoOrGifMessage> titleVideo, Optional<LocationMessage> titleLocation, String body, Optional<String> footer, List<HydratedTemplateButton> hydratedButtons, String templateId) Creates an instance of aHydratedFourRowTemplaterecord class.- Parameters:
titleDocument- the value for thetitleDocumentrecord componenttitleText- the value for thetitleTextrecord componenttitleImage- the value for thetitleImagerecord componenttitleVideo- the value for thetitleVideorecord componenttitleLocation- the value for thetitleLocationrecord componentbody- the value for thebodyrecord componentfooter- the value for thefooterrecord componenthydratedButtons- the value for thehydratedButtonsrecord componenttemplateId- the value for thetemplateIdrecord component
-
-
Method Details
-
customBuilder
static HydratedFourRowTemplate customBuilder(HydratedFourRowTemplateTitle title, String body, String footer, List<HydratedTemplateButton> buttons, String templateId) -
getIndexedButtons
-
titleType
Returns the type of title that this template wraps- Returns:
- a non-null title type
-
title
Returns the title of this template- Returns:
- an optional
-
templateType
Description copied from interface:TemplateFormatterReturns the type of this formatter- Specified by:
templateTypein interfaceTemplateFormatter- 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). -
titleDocument
Returns the value of thetitleDocumentrecord component.- Returns:
- the value of the
titleDocumentrecord component
-
titleText
Returns the value of thetitleTextrecord component.- Returns:
- the value of the
titleTextrecord component
-
titleImage
Returns the value of thetitleImagerecord component.- Returns:
- the value of the
titleImagerecord component
-
titleVideo
Returns the value of thetitleVideorecord component.- Returns:
- the value of the
titleVideorecord component
-
titleLocation
Returns the value of thetitleLocationrecord component.- Returns:
- the value of the
titleLocationrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
hydratedButtons
Returns the value of thehydratedButtonsrecord component.- Returns:
- the value of the
hydratedButtonsrecord component
-
templateId
Returns the value of thetemplateIdrecord component.- Returns:
- the value of the
templateIdrecord component
-