Module it.auties.cobalt
Record Class LocationMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.standard.LocationMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,HighlyStructuredFourRowTemplateTitle,HydratedFourRowTemplateTitle,ButtonsMessageHeader,ContextualMessage,Message
public record LocationMessage(double latitude, double longitude, Optional<String> name, Optional<String> address, Optional<String> url, boolean live, int accuracy, float speed, int magneticNorthOffset, Optional<String> caption, Optional<byte[]> thumbnail, Optional<ContextInfo> contextInfo)
extends Record
implements ContextualMessage, ButtonsMessageHeader, HighlyStructuredFourRowTemplateTitle, HydratedFourRowTemplateTitle
A model class that represents a message holding a location inside
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.auties.whatsapp.model.message.button.ButtonsMessageHeader
ButtonsMessageHeader.TypeNested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hsm.HighlyStructuredFourRowTemplateTitle
HighlyStructuredFourRowTemplateTitle.TypeNested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplateTitle
HydratedFourRowTemplateTitle.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theaccuracyrecord component.The field for theaddressrecord component.The field for thecaptionrecord component.private final Optional<ContextInfo> The field for thecontextInforecord component.private final doubleThe field for thelatituderecord component.private final booleanThe field for theliverecord component.private final doubleThe field for thelongituderecord component.private final intThe field for themagneticNorthOffsetrecord component.The field for thenamerecord component.private final floatThe field for thespeedrecord component.private final Optional<byte[]> The field for thethumbnailrecord component.The field for theurlrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLocationMessage(double latitude, double longitude, Optional<String> name, Optional<String> address, Optional<String> url, boolean live, int accuracy, float speed, int magneticNorthOffset, Optional<String> caption, Optional<byte[]> thumbnail, Optional<ContextInfo> contextInfo) Creates an instance of aLocationMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintaccuracy()Returns the value of theaccuracyrecord component.address()Returns the value of theaddressrecord component.caption()Returns the value of thecaptionrecord component.category()Return message categoryReturns the value of thecontextInforecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Return the type of this titledoublelatitude()Returns the value of thelatituderecord component.booleanlive()Returns the value of theliverecord component.doubleReturns the value of thelongituderecord component.intReturns the value of themagneticNorthOffsetrecord component.name()Returns the value of thenamerecord component.floatspeed()Returns the value of thespeedrecord component.Optional<byte[]> Returns the value of thethumbnailrecord component.Return the type of this titlefinal StringtoString()Returns a string representation of this record class.type()Return message typeurl()Returns the value of theurlrecord component.
-
Field Details
-
latitude
private final double latitudeThe field for thelatituderecord component. -
longitude
private final double longitudeThe field for thelongituderecord component. -
name
The field for thenamerecord component. -
address
The field for theaddressrecord component. -
url
The field for theurlrecord component. -
live
private final boolean liveThe field for theliverecord component. -
accuracy
private final int accuracyThe field for theaccuracyrecord component. -
speed
private final float speedThe field for thespeedrecord component. -
magneticNorthOffset
private final int magneticNorthOffsetThe field for themagneticNorthOffsetrecord component. -
caption
The field for thecaptionrecord component. -
thumbnail
The field for thethumbnailrecord component. -
contextInfo
The field for thecontextInforecord component.
-
-
Constructor Details
-
LocationMessage
public LocationMessage(double latitude, double longitude, Optional<String> name, Optional<String> address, Optional<String> url, boolean live, int accuracy, float speed, int magneticNorthOffset, Optional<String> caption, Optional<byte[]> thumbnail, Optional<ContextInfo> contextInfo) Creates an instance of aLocationMessagerecord class.- Parameters:
latitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componentname- the value for thenamerecord componentaddress- the value for theaddressrecord componenturl- the value for theurlrecord componentlive- the value for theliverecord componentaccuracy- the value for theaccuracyrecord componentspeed- the value for thespeedrecord componentmagneticNorthOffset- the value for themagneticNorthOffsetrecord componentcaption- the value for thecaptionrecord componentthumbnail- the value for thethumbnailrecord componentcontextInfo- the value for thecontextInforecord component
-
-
Method Details
-
type
Description copied from interface:MessageReturn message type -
category
Description copied from interface:MessageReturn message category -
titleType
Description copied from interface:HighlyStructuredFourRowTemplateTitleReturn the type of this title- Specified by:
titleTypein interfaceHighlyStructuredFourRowTemplateTitle- Returns:
- a non-null type
-
hydratedTitleType
Description copied from interface:HydratedFourRowTemplateTitleReturn the type of this title- Specified by:
hydratedTitleTypein interfaceHydratedFourRowTemplateTitle- Returns:
- a non-null type
-
buttonHeaderType
- Specified by:
buttonHeaderTypein interfaceButtonsMessageHeader
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
latitude
public double latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
public double longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
live
public boolean live()Returns the value of theliverecord component.- Returns:
- the value of the
liverecord component
-
accuracy
public int accuracy()Returns the value of theaccuracyrecord component.- Returns:
- the value of the
accuracyrecord component
-
speed
public float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
magneticNorthOffset
public int magneticNorthOffset()Returns the value of themagneticNorthOffsetrecord component.- Returns:
- the value of the
magneticNorthOffsetrecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
contextInfo
Returns the value of thecontextInforecord component.- Specified by:
contextInfoin interfaceContextualMessage- Returns:
- the value of the
contextInforecord component
-