Record Class FileValidationResponse

java.lang.Object
java.lang.Record
com.digicert.validation.methods.file.validate.FileValidationResponse
Record Components:
isValid - Indicates whether the validation is successful.
domain - The domain associated with the validation.
fileUrl - The URL of the file used for validation.
challengeType - The type of challenge used in the validation (RANDOM_VALUE or REQUEST_TOKEN).
validRandomValue - The valid random value used in the validation (null if not RANDOM_VALUE).
validRequestToken - The valid request token used in the validation (null if not REQUEST_TOKEN).
errors - The errors found during the validation process (null if no errors).

public record FileValidationResponse(boolean isValid, String domain, String fileUrl, ChallengeType challengeType, String validRandomValue, String validRequestToken, Set<DcvError> errors) extends Record
Represents the response of a file validation process.

This record encapsulates the outcome of a file validation request, including the validation success, domain, file URL, challenge type, and any errors encountered.

  • Field Details

    • isValid

      private final boolean isValid
      The field for the isValid record component.
    • domain

      private final String domain
      The field for the domain record component.
    • fileUrl

      private final String fileUrl
      The field for the fileUrl record component.
    • challengeType

      private final ChallengeType challengeType
      The field for the challengeType record component.
    • validRandomValue

      private final String validRandomValue
      The field for the validRandomValue record component.
    • validRequestToken

      private final String validRequestToken
      The field for the validRequestToken record component.
    • errors

      private final Set<DcvError> errors
      The field for the errors record component.
  • Constructor Details

    • FileValidationResponse

      public FileValidationResponse(boolean isValid, String domain, String fileUrl, ChallengeType challengeType, String validRandomValue, String validRequestToken, Set<DcvError> errors)
      Creates an instance of a FileValidationResponse record class.
      Parameters:
      isValid - the value for the isValid record component
      domain - the value for the domain record component
      fileUrl - the value for the fileUrl record component
      challengeType - the value for the challengeType record component
      validRandomValue - the value for the validRandomValue record component
      validRequestToken - the value for the validRequestToken record component
      errors - the value for the errors 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.
    • isValid

      public boolean isValid()
      Returns the value of the isValid record component.
      Returns:
      the value of the isValid record component
    • domain

      public String domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • fileUrl

      public String fileUrl()
      Returns the value of the fileUrl record component.
      Returns:
      the value of the fileUrl record component
    • challengeType

      public ChallengeType challengeType()
      Returns the value of the challengeType record component.
      Returns:
      the value of the challengeType record component
    • validRandomValue

      public String validRandomValue()
      Returns the value of the validRandomValue record component.
      Returns:
      the value of the validRandomValue record component
    • validRequestToken

      public String validRequestToken()
      Returns the value of the validRequestToken record component.
      Returns:
      the value of the validRequestToken record component
    • errors

      public Set<DcvError> errors()
      Returns the value of the errors record component.
      Returns:
      the value of the errors record component