public NoPathBuilder(NoPath base) { this._natureOfIssue = base.getNatureOfIssue(); this._tlvs = base.getTlvs(); this._ignore = base.isIgnore(); this._processingRule = base.isProcessingRule(); this._unsatisfiedConstraints = base.isUnsatisfiedConstraints(); if (base instanceof NoPathImpl) { NoPathImpl impl = (NoPathImpl) 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.pcrep.message.pcrep.message.replies.result.failure._case.NoPath> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.NoPath>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
@Override public void serializeObject(final Object object, final ByteBuf buffer) { Preconditions.checkArgument(object instanceof NoPath, "Wrong instance of PCEPObject. Passed %s. Needed NoPathObject.", object.getClass()); final NoPath nPObj = (NoPath) object; final ByteBuf body = Unpooled.buffer(); Preconditions.checkArgument(nPObj.getNatureOfIssue() != null, "NatureOfIssue is mandatory."); writeUnsignedByte(nPObj.getNatureOfIssue(), body); final BitArray flags = new BitArray(FLAGS_SIZE); flags.set(C_FLAG_OFFSET, nPObj.isUnsatisfiedConstraints()); flags.toByteBuf(body); body.writeZero(RESERVED_F_LENGTH); serializeTlvs(nPObj.getTlvs(), body); ObjectUtil.formatSubobject(TYPE, CLASS, object.isProcessingRule(), object.isIgnore(), body, buffer); }
if (!Objects.equals(_natureOfIssue, other.getNatureOfIssue())) { return false; if (!Objects.equals(_tlvs, other.getTlvs())) { return false; if (!Objects.equals(_ignore, other.isIgnore())) { return false; if (!Objects.equals(_processingRule, other.isProcessingRule())) { return false; if (!Objects.equals(_unsatisfiedConstraints, other.isUnsatisfiedConstraints())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;