package ru.kirillius.pf.sdn.core.Networking;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import ru.kirillius.json.JSONMapProperty;
import ru.kirillius.json.JSONProperty;
import ru.kirillius.json.JSONSerializable;

import java.time.Instant;
import java.util.HashMap;
import java.util.Map;

@JSONSerializable
@Getter
@Setter
@NoArgsConstructor
public class ResolverCacheEntry {
    @JSONProperty
    private Instant lastUpdate = Instant.now();
    @JSONMapProperty(keyType = IPv4Subnet.class, valueType = Instant.class)
    private Map<IPv4Subnet, Instant> addresses = new HashMap<>();
}
