Search in sources :

Example 1 with AsGenerated

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.as.generated._case.AsGenerated in project bgpcep by opendaylight.

the class ASGenParser method serializeBody.

@Override
public ByteBuf serializeBody(final Esi esi, final ByteBuf body) {
    checkArgument(esi instanceof AsGeneratedCase, "Unknown esi instance. Passed %s. Needed AsGeneratedCase.", esi);
    final AsGenerated asGen = ((AsGeneratedCase) esi).getAsGenerated();
    ByteBufUtils.write(body, asGen.getAs().getValue());
    ByteBufUtils.writeOrZero(body, asGen.getLocalDiscriminator());
    return body.writeByte(0);
}
Also used : AsGeneratedCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.AsGeneratedCase) AsGenerated(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.as.generated._case.AsGenerated)

Aggregations

AsGeneratedCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.AsGeneratedCase)1 AsGenerated (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev200120.esi.esi.as.generated._case.AsGenerated)1