it.auties.whatsapp.model.response.UserChosenNameResponse Maven / Gradle / Ivy
package it.auties.whatsapp.model.response;
import com.fasterxml.jackson.core.type.TypeReference;
import it.auties.whatsapp.util.Json;
import java.util.List;
import java.util.Map;
import java.util.Optional;
public record UserChosenNameResponse(Optional name) {
@SuppressWarnings("unchecked")
public static Optional ofJson(String json) {
try {
var parsedJson = Json.readValue(json, new TypeReference