summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfacesstate/ip/dump/check/AddressDumpCheck.java
blob: d6ab28db0ee1f961e0f744fcfcc4e88bf58bc6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package io.fd.honeycomb.translate.v3po.interfacesstate.ip.dump.check;

import io.fd.honeycomb.translate.util.read.cache.EntityDumpNonEmptyCheck;
import io.fd.honeycomb.translate.util.read.cache.exceptions.check.DumpCheckFailedException;
import io.fd.honeycomb.translate.util.read.cache.exceptions.check.i.DumpEmptyException;
import org.openvpp.jvpp.core.dto.IpAddressDetailsReplyDump;

public class AddressDumpCheck implements EntityDumpNonEmptyCheck<IpAddressDetailsReplyDump> {

    @Override
    public void assertNotEmpty(final IpAddressDetailsReplyDump data) throws DumpCheckFailedException {
        if (data == null || data.ipAddressDetails == null) {
            throw new DumpEmptyException("Invalid data dumped");
        }
    }
}