package com.fjhx.params.IotData;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 华为云推送数据
 *
 * @author zlj
 */
@Data
public class MessageBody {

    private String resource;
    private String event;
    private String requestId;
    private Date eventTime;
    private NotifyData notifyData;

    @Data
    public static class NotifyData {
        private Header header;
        private Body body;
    }

    @Data
    public static class Header {
        private String deviceId;
        private String productId;
        private String appId;
        private String gatewayId;
        private String nodeId;
    }

    @Data
    public static class Body {
        private List<Service> services;
    }

    @Data
    public static class Service {
        private String serviceId;
        private JSONObject properties;
        private Date eventTime;
    }

}
