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);
}
Aggregations