Record Class VerificationCodeResponse

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.response.VerificationCodeResponse
Record Components:
number - the number that was registered
lid - the lid of the number that was registered
status - the status of the registration
errorReason - the error, if any was thrown
method - the method used to register, if any was used
codeLength - the expected length of the code, if a code request was sent
notifyAfter - the time in seconds after which the app would notify you to try again to register
retryAfter - the time in seconds after which the app would allow you to try again to register a sms
voiceLength - unknown
callWait - the time in seconds after which the app would allow you to try again to register using a call
smsWait - the time in seconds after which the app would allow you to try again to register using a sms
flashType - unknown
whatsappWait - the last wait time in seconds before trying again, if available
securityCodeSet - whether 2fa is enabled
imageCaptcha - the image captcha to solve, only available for business accounts
audioCaptcha - the audio captcha to solve, only available for business accounts
whatsappOldEligible - if requested, whether the phone number was already registered on Whatsapp

public record VerificationCodeResponse(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 autoConfigure) extends Record
A model that represents a newsletters from Whatsapp regarding the registration of a phone number
  • Field Details

    • number

      private final PhoneNumber number
      The field for the number record component.
    • lid

      private final long lid
      The field for the lid record component.
    • status

      private final VerificationCodeStatus status
      The field for the status record component.
    • errorReason

      private final VerificationCodeError errorReason
      The field for the errorReason record component.
    • method

      private final VerificationCodeMethod method
      The field for the method record component.
    • codeLength

      private final int codeLength
      The field for the codeLength record component.
    • notifyAfter

      private final int notifyAfter
      The field for the notifyAfter record component.
    • retryAfter

      private final long retryAfter
      The field for the retryAfter record component.
    • voiceLength

      private final long voiceLength
      The field for the voiceLength record component.
    • callWait

      private final long callWait
      The field for the callWait record component.
    • smsWait

      private final long smsWait
      The field for the smsWait record component.
    • flashType

      private final boolean flashType
      The field for the flashType record component.
    • whatsappWait

      private final long whatsappWait
      The field for the whatsappWait record component.
    • securityCodeSet

      private final boolean securityCodeSet
      The field for the securityCodeSet record component.
    • imageCaptcha

      private final String imageCaptcha
      The field for the imageCaptcha record component.
    • audioCaptcha

      private final String audioCaptcha
      The field for the audioCaptcha record component.
    • whatsappOldEligible

      private final boolean whatsappOldEligible
      The field for the whatsappOldEligible record component.
    • autoConfigure

      private final boolean autoConfigure
      The field for the autoConfigure record component.
  • Constructor Details

    • VerificationCodeResponse

      public VerificationCodeResponse(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 autoConfigure)
      Creates an instance of a VerificationCodeResponse record class.
      Parameters:
      number - the value for the number record component
      lid - the value for the lid record component
      status - the value for the status record component
      errorReason - the value for the errorReason record component
      method - the value for the method record component
      codeLength - the value for the codeLength record component
      notifyAfter - the value for the notifyAfter record component
      retryAfter - the value for the retryAfter record component
      voiceLength - the value for the voiceLength record component
      callWait - the value for the callWait record component
      smsWait - the value for the smsWait record component
      flashType - the value for the flashType record component
      whatsappWait - the value for the whatsappWait record component
      securityCodeSet - the value for the securityCodeSet record component
      imageCaptcha - the value for the imageCaptcha record component
      audioCaptcha - the value for the audioCaptcha record component
      whatsappOldEligible - the value for the whatsappOldEligible record component
      autoConfigure - the value for the autoConfigure record component
  • Method Details

    • toString

      public final 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • number

      public PhoneNumber number()
      Returns the value of the number record component.
      Returns:
      the value of the number record component
    • lid

      public long lid()
      Returns the value of the lid record component.
      Returns:
      the value of the lid record component
    • status

      public VerificationCodeStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • errorReason

      public VerificationCodeError errorReason()
      Returns the value of the errorReason record component.
      Returns:
      the value of the errorReason record component
    • method

      public VerificationCodeMethod method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • codeLength

      public int codeLength()
      Returns the value of the codeLength record component.
      Returns:
      the value of the codeLength record component
    • notifyAfter

      public int notifyAfter()
      Returns the value of the notifyAfter record component.
      Returns:
      the value of the notifyAfter record component
    • retryAfter

      public long retryAfter()
      Returns the value of the retryAfter record component.
      Returns:
      the value of the retryAfter record component
    • voiceLength

      public long voiceLength()
      Returns the value of the voiceLength record component.
      Returns:
      the value of the voiceLength record component
    • callWait

      public long callWait()
      Returns the value of the callWait record component.
      Returns:
      the value of the callWait record component
    • smsWait

      public long smsWait()
      Returns the value of the smsWait record component.
      Returns:
      the value of the smsWait record component
    • flashType

      public boolean flashType()
      Returns the value of the flashType record component.
      Returns:
      the value of the flashType record component
    • whatsappWait

      public long whatsappWait()
      Returns the value of the whatsappWait record component.
      Returns:
      the value of the whatsappWait record component
    • securityCodeSet

      public boolean securityCodeSet()
      Returns the value of the securityCodeSet record component.
      Returns:
      the value of the securityCodeSet record component
    • imageCaptcha

      public String imageCaptcha()
      Returns the value of the imageCaptcha record component.
      Returns:
      the value of the imageCaptcha record component
    • audioCaptcha

      public String audioCaptcha()
      Returns the value of the audioCaptcha record component.
      Returns:
      the value of the audioCaptcha record component
    • whatsappOldEligible

      public boolean whatsappOldEligible()
      Returns the value of the whatsappOldEligible record component.
      Returns:
      the value of the whatsappOldEligible record component
    • autoConfigure

      public boolean autoConfigure()
      Returns the value of the autoConfigure record component.
      Returns:
      the value of the autoConfigure record component