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

it.auties.whatsapp.model.response.NewsletterLeaveResponse Maven / Gradle / Ivy

package it.auties.whatsapp.model.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import it.auties.whatsapp.model.jid.Jid;
import it.auties.whatsapp.util.Json;

import java.util.Optional;

public record NewsletterLeaveResponse(@JsonProperty("id") Jid jid) {
    public static Optional ofJson(String json) {
        return Json.readValue(json, JsonResponse.class)
                .data()
                .map(JsonData::response);
    }

    private record JsonResponse(Optional data) {

    }

    private record JsonData(@JsonProperty("xwa2_notify_newsletter_on_leave") NewsletterLeaveResponse response) {

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy