java.lang.Object
java.lang.Record
it.auties.whatsapp.model.action.ContactAction
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,Action
public record ContactAction(Optional<String> fullName, Optional<String> firstName, Optional<String> lidJid)
extends Record
implements Action
A model clas that represents a new contact push name
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe type of this actionintThe version of this actionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.fullName()Returns the value of thefullNamerecord component.final inthashCode()Returns a hash code value for this object.The name of this actionlidJid()Returns the value of thelidJidrecord component.name()Returns the name of this contactfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
fullName
The field for thefullNamerecord component. -
firstName
The field for thefirstNamerecord component. -
lidJid
The field for thelidJidrecord component.
-
-
Constructor Details
-
ContactAction
public ContactAction(Optional<String> fullName, Optional<String> firstName, Optional<String> lidJid) Creates an instance of aContactActionrecord class.- Parameters:
fullName- the value for thefullNamerecord componentfirstName- the value for thefirstNamerecord componentlidJid- the value for thelidJidrecord component
-
-
Method Details
-
name
Returns the name of this contact- Returns:
- an optional
-
indexName
The name of this action -
actionVersion
public int actionVersion()The version of this action- Specified by:
actionVersionin interfaceAction- Returns:
- a non-null string
-
actionType
The type of this action- Specified by:
actionTypein interfaceAction- Returns:
- a non-null string
-
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). -
fullName
Returns the value of thefullNamerecord component.- Returns:
- the value of the
fullNamerecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lidJid
Returns the value of thelidJidrecord component.- Returns:
- the value of the
lidJidrecord component
-