if (!Objects.equals(_cNotification, other.getCNotification())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
public NotificationsBuilder(Notifications base) { this._cNotification = base.getCNotification(); if (base instanceof NotificationsImpl) { NotificationsImpl impl = (NotificationsImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcntf.message.pcntf.message.notifications.Notifications> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcntf.message.pcntf.message.notifications.Notifications>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
@Override public void serializeMessage(final Message message, final ByteBuf out) { Preconditions.checkArgument(message instanceof PcntfMessage, "Wrong instance of Message. Passed instance of %s. Need PcntfMessage.", message.getClass()); final ByteBuf buffer = Unpooled.buffer(); for (final Notifications n : ((PcntfMessage) message).getPcntfMessage().getNotifications()) { if (n.getRps() != null) { for (final Rps rps : n.getRps()) { serializeObject(rps.getRp(), buffer); } } Preconditions.checkArgument(n.getNotifications() != null && !n.getNotifications().isEmpty(), "Message must contain at least one notification object"); for (final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcntf.message.pcntf.message.notifications.Notifications not : n.getNotifications()) { serializeObject(not.getCNotification(), buffer); } } MessageUtil.formatMessage(TYPE, buffer, out); }