All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.auties.whatsapp.model.mobile.VerificationCodeStatus Maven / Gradle / Ivy

The newest version!
package it.auties.whatsapp.model.mobile;

import com.fasterxml.jackson.annotation.JsonCreator;

import java.util.Arrays;

public enum VerificationCodeStatus {
    OK,
    SENT,
    ERROR;

    @JsonCreator
    public static VerificationCodeStatus of(String name) {
        return Arrays.stream(values()).filter(entry -> entry.name().equalsIgnoreCase(name)).findFirst().orElse(ERROR);
    }

    public boolean isSuccessful() {
        return this == OK || this == SENT;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy