java.lang.Object
java.lang.Record
it.auties.whatsapp.model.companion.CompanionDevice
- Record Components:
model- the non-null model of the devicemanufacturer- the non-null manufacturer of the deviceplatform- the non-null os of the deviceappVersion- the version of the app, or emptyosVersion- the non-null os version of the device
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject
public record CompanionDevice(String model, String manufacturer, UserAgent.PlatformType platform, Optional<Version> appVersion, Version osVersion)
extends Record
implements it.auties.protobuf.model.ProtobufMessage
A model for a mobile companion
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theappVersionrecord component.private final StringThe field for themanufacturerrecord component.private final StringThe field for themodelrecord component.private final VersionThe field for theosVersionrecord component.private final UserAgent.PlatformTypeThe field for theplatformrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCompanionDevice(String model, String manufacturer, UserAgent.PlatformType platform, Optional<Version> appVersion, Version osVersion) Creates an instance of aCompanionDevicerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompanionDeviceandroid(boolean business) static CompanionDeviceReturns the value of theappVersionrecord component.private Stringprivate Stringfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CompanionDeviceios(boolean business) static CompanionDevicestatic CompanionDevicekaiOs()static CompanionDeviceReturns the value of themanufacturerrecord component.model()Returns the value of themodelrecord component.Returns the value of theosVersionrecord component.platform()Returns the value of theplatformrecord component.private Stringfinal StringtoString()Returns a string representation of this record class.toUserAgent(Version appVersion) static CompanionDeviceweb()static CompanionDevice
-
Field Details
-
model
The field for themodelrecord component. -
manufacturer
The field for themanufacturerrecord component. -
platform
The field for theplatformrecord component. -
appVersion
The field for theappVersionrecord component. -
osVersion
The field for theosVersionrecord component. -
IPHONES
-
-
Constructor Details
-
CompanionDevice
public CompanionDevice(String model, String manufacturer, UserAgent.PlatformType platform, Optional<Version> appVersion, Version osVersion) Creates an instance of aCompanionDevicerecord class.- Parameters:
model- the value for themodelrecord componentmanufacturer- the value for themanufacturerrecord componentplatform- the value for theplatformrecord componentappVersion- the value for theappVersionrecord componentosVersion- the value for theosVersionrecord component
-
-
Method Details
-
web
-
web
-
ios
-
ios
-
android
-
android
-
kaiOs
-
kaiOs
-
toUserAgent
-
toPersonal
-
toBusiness
-
deviceVersion
-
deviceName
-
platformName
-
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). -
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
manufacturer
Returns the value of themanufacturerrecord component.- Returns:
- the value of the
manufacturerrecord component
-
platform
Returns the value of theplatformrecord component.- Returns:
- the value of the
platformrecord component
-
appVersion
Returns the value of theappVersionrecord component.- Returns:
- the value of the
appVersionrecord component
-
osVersion
Returns the value of theosVersionrecord component.- Returns:
- the value of the
osVersionrecord component
-