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