java.lang.Object
java.lang.Record
it.auties.whatsapp.model.response.RegistrationResponse
- Record Components:
number- the number that was registeredlid- the lid of the number that was registeredstatus- the status of the registrationerrorReason- the error, if any was thrownmethod- the method used to register, if any was usedcodeLength- the expected length of the code, if a code request was sentnotifyAfter- the time in seconds after which the app would notify you to try again to registerretryAfter- the time in seconds after which the app would allow you to try again to register a smsvoiceLength- unknowncallWait- the time in seconds after which the app would allow you to try again to register using a callsmsWait- the time in seconds after which the app would allow you to try again to register using a smsflashType- unknownwhatsappWait- the last wait time in seconds before trying again, if availablesecurityCodeSet- whether 2fa is enabledimageCaptcha- the image captcha to solve, only available for business accountsaudioCaptcha- the audio captcha to solve, only available for business accountswhatsappOldEligible- if requested, whether the phone number was already registered on Whatsapp
public record RegistrationResponse(PhoneNumber number, long lid, VerificationCodeStatus status, VerificationCodeError errorReason, VerificationCodeMethod method, int codeLength, int notifyAfter, long retryAfter, long voiceLength, long callWait, long smsWait, boolean flashType, long whatsappWait, boolean securityCodeSet, String imageCaptcha, String audioCaptcha, boolean whatsappOldEligible, boolean possibleMigration, boolean autoConfigure, String wipeToken)
extends Record
A model that represents a newsletters from Whatsapp regarding the registration of a phone number
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theaudioCaptcharecord component.private final booleanThe field for theautoConfigurerecord component.private final longThe field for thecallWaitrecord component.private final intThe field for thecodeLengthrecord component.private final VerificationCodeErrorThe field for theerrorReasonrecord component.private final booleanThe field for theflashTyperecord component.private final StringThe field for theimageCaptcharecord component.private final longThe field for thelidrecord component.private final VerificationCodeMethodThe field for themethodrecord component.private final intThe field for thenotifyAfterrecord component.private final PhoneNumberThe field for thenumberrecord component.private final booleanThe field for thepossibleMigrationrecord component.private final longThe field for theretryAfterrecord component.private final booleanThe field for thesecurityCodeSetrecord component.private final longThe field for thesmsWaitrecord component.private final VerificationCodeStatusThe field for thestatusrecord component.private final longThe field for thevoiceLengthrecord component.private final booleanThe field for thewhatsappOldEligiblerecord component.private final longThe field for thewhatsappWaitrecord component.private final StringThe field for thewipeTokenrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRegistrationResponse(PhoneNumber number, long lid, VerificationCodeStatus status, VerificationCodeError errorReason, VerificationCodeMethod method, int codeLength, int notifyAfter, long retryAfter, long voiceLength, long callWait, long smsWait, boolean flashType, long whatsappWait, boolean securityCodeSet, String imageCaptcha, String audioCaptcha, boolean whatsappOldEligible, boolean possibleMigration, boolean autoConfigure, String wipeToken) Creates an instance of aRegistrationResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaudioCaptcharecord component.booleanReturns the value of theautoConfigurerecord component.longcallWait()Returns the value of thecallWaitrecord component.intReturns the value of thecodeLengthrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorReasonrecord component.booleanReturns the value of theflashTyperecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theimageCaptcharecord component.longlid()Returns the value of thelidrecord component.method()Returns the value of themethodrecord component.intReturns the value of thenotifyAfterrecord component.number()Returns the value of thenumberrecord component.booleanReturns the value of thepossibleMigrationrecord component.longReturns the value of theretryAfterrecord component.booleanReturns the value of thesecurityCodeSetrecord component.longsmsWait()Returns the value of thesmsWaitrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thevoiceLengthrecord component.booleanReturns the value of thewhatsappOldEligiblerecord component.longReturns the value of thewhatsappWaitrecord component.Returns the value of thewipeTokenrecord component.
-
Field Details
-
number
The field for thenumberrecord component. -
lid
private final long lidThe field for thelidrecord component. -
status
The field for thestatusrecord component. -
errorReason
The field for theerrorReasonrecord component. -
method
The field for themethodrecord component. -
codeLength
private final int codeLengthThe field for thecodeLengthrecord component. -
notifyAfter
private final int notifyAfterThe field for thenotifyAfterrecord component. -
retryAfter
private final long retryAfterThe field for theretryAfterrecord component. -
voiceLength
private final long voiceLengthThe field for thevoiceLengthrecord component. -
callWait
private final long callWaitThe field for thecallWaitrecord component. -
smsWait
private final long smsWaitThe field for thesmsWaitrecord component. -
flashType
private final boolean flashTypeThe field for theflashTyperecord component. -
whatsappWait
private final long whatsappWaitThe field for thewhatsappWaitrecord component. -
securityCodeSet
private final boolean securityCodeSetThe field for thesecurityCodeSetrecord component. -
imageCaptcha
The field for theimageCaptcharecord component. -
audioCaptcha
The field for theaudioCaptcharecord component. -
whatsappOldEligible
private final boolean whatsappOldEligibleThe field for thewhatsappOldEligiblerecord component. -
possibleMigration
private final boolean possibleMigrationThe field for thepossibleMigrationrecord component. -
autoConfigure
private final boolean autoConfigureThe field for theautoConfigurerecord component. -
wipeToken
The field for thewipeTokenrecord component.
-
-
Constructor Details
-
RegistrationResponse
public RegistrationResponse(PhoneNumber number, long lid, VerificationCodeStatus status, VerificationCodeError errorReason, VerificationCodeMethod method, int codeLength, int notifyAfter, long retryAfter, long voiceLength, long callWait, long smsWait, boolean flashType, long whatsappWait, boolean securityCodeSet, String imageCaptcha, String audioCaptcha, boolean whatsappOldEligible, boolean possibleMigration, boolean autoConfigure, String wipeToken) Creates an instance of aRegistrationResponserecord class.- Parameters:
number- the value for thenumberrecord componentlid- the value for thelidrecord componentstatus- the value for thestatusrecord componenterrorReason- the value for theerrorReasonrecord componentmethod- the value for themethodrecord componentcodeLength- the value for thecodeLengthrecord componentnotifyAfter- the value for thenotifyAfterrecord componentretryAfter- the value for theretryAfterrecord componentvoiceLength- the value for thevoiceLengthrecord componentcallWait- the value for thecallWaitrecord componentsmsWait- the value for thesmsWaitrecord componentflashType- the value for theflashTyperecord componentwhatsappWait- the value for thewhatsappWaitrecord componentsecurityCodeSet- the value for thesecurityCodeSetrecord componentimageCaptcha- the value for theimageCaptcharecord componentaudioCaptcha- the value for theaudioCaptcharecord componentwhatsappOldEligible- the value for thewhatsappOldEligiblerecord componentpossibleMigration- the value for thepossibleMigrationrecord componentautoConfigure- the value for theautoConfigurerecord componentwipeToken- the value for thewipeTokenrecord component
-
-
Method Details
-
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 '=='. -
number
Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
lid
public long lid()Returns the value of thelidrecord component.- Returns:
- the value of the
lidrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
errorReason
Returns the value of theerrorReasonrecord component.- Returns:
- the value of the
errorReasonrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
codeLength
public int codeLength()Returns the value of thecodeLengthrecord component.- Returns:
- the value of the
codeLengthrecord component
-
notifyAfter
public int notifyAfter()Returns the value of thenotifyAfterrecord component.- Returns:
- the value of the
notifyAfterrecord component
-
retryAfter
public long retryAfter()Returns the value of theretryAfterrecord component.- Returns:
- the value of the
retryAfterrecord component
-
voiceLength
public long voiceLength()Returns the value of thevoiceLengthrecord component.- Returns:
- the value of the
voiceLengthrecord component
-
callWait
public long callWait()Returns the value of thecallWaitrecord component.- Returns:
- the value of the
callWaitrecord component
-
smsWait
public long smsWait()Returns the value of thesmsWaitrecord component.- Returns:
- the value of the
smsWaitrecord component
-
flashType
public boolean flashType()Returns the value of theflashTyperecord component.- Returns:
- the value of the
flashTyperecord component
-
whatsappWait
public long whatsappWait()Returns the value of thewhatsappWaitrecord component.- Returns:
- the value of the
whatsappWaitrecord component
-
securityCodeSet
public boolean securityCodeSet()Returns the value of thesecurityCodeSetrecord component.- Returns:
- the value of the
securityCodeSetrecord component
-
imageCaptcha
Returns the value of theimageCaptcharecord component.- Returns:
- the value of the
imageCaptcharecord component
-
audioCaptcha
Returns the value of theaudioCaptcharecord component.- Returns:
- the value of the
audioCaptcharecord component
-
whatsappOldEligible
public boolean whatsappOldEligible()Returns the value of thewhatsappOldEligiblerecord component.- Returns:
- the value of the
whatsappOldEligiblerecord component
-
possibleMigration
public boolean possibleMigration()Returns the value of thepossibleMigrationrecord component.- Returns:
- the value of the
possibleMigrationrecord component
-
autoConfigure
public boolean autoConfigure()Returns the value of theautoConfigurerecord component.- Returns:
- the value of the
autoConfigurerecord component
-
wipeToken
Returns the value of thewipeTokenrecord component.- Returns:
- the value of the
wipeTokenrecord component
-