package com.ruoyi.rocketmq.snmp.dto;

import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 采集结果类
 */
@Data
public class CollectionResult {
    String switchIp;
    String deviceType;
    List<Map<String, String>> data;
    long timestamp;
    boolean success;
    String errorMessage;

    public CollectionResult(){}
    public CollectionResult(String switchIp, String deviceType,
                            List<Map<String, String>> data, boolean success) {
        this.switchIp = switchIp;
        this.deviceType = deviceType;
        this.data = data;
        this.timestamp = System.currentTimeMillis();
        this.success = success;
    }

    public CollectionResult(String switchIp, String deviceType, String errorMessage) {
        this.switchIp = switchIp;
        this.deviceType = deviceType;
        this.errorMessage = errorMessage;
        this.success = false;
        this.timestamp = System.currentTimeMillis();
    }
}