it.auties.whatsapp.model.info.BusinessIdentityInfoVerifiedLevelSpec Maven / Gradle / Ivy
package it.auties.whatsapp.model.info;
import it.auties.whatsapp.model.info.BusinessIdentityInfo.VerifiedLevel;
import java.util.Arrays;
import java.util.Optional;
public class BusinessIdentityInfoVerifiedLevelSpec {
public static Integer encode(VerifiedLevel protoInputObject) {
if(protoInputObject == null) {
return null;
}
return protoInputObject.index;
}
public static Optional decode(int index) {
return Arrays.stream(VerifiedLevel.values())
.filter(entry -> entry.index == index)
.findFirst();
}
}