package io.wdd.pusher.beans;


import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder(toBuilder = true)
public class NtfySendMessage {

    @JsonProperty("id")
    private String id;
    @JsonProperty("time")
    private Integer time;
    @JsonProperty("expires")
    private Integer expires;
    @JsonProperty("event")
    private String event;
    @JsonProperty("topic")
    private String topic;
    @JsonProperty("priority")
    private Integer priority;
    @JsonProperty("tags")
    private List<String> tags;
    @JsonProperty("click")
    private String click;
    @JsonProperty("attachment")
    private AttachmentDTO attachment;
    @JsonProperty("title")
    private String title;
    @JsonProperty("message")
    private String message;

    @NoArgsConstructor
    @Data
    public static class AttachmentDTO {
        @JsonProperty("name")
        private String name;
        @JsonProperty("type")
        private String type;
        @JsonProperty("size")
        private Integer size;
        @JsonProperty("expires")
        private Integer expires;
        @JsonProperty("url")
        private String url;
    }
}
