public NodeErrorNotificationBuilder setCode(final java.lang.Integer value) { if (value != null) { checkCodeRange(value); } this._code = value; return this; }
private NodeErrorNotificationImpl(NodeErrorNotificationBuilder base) { this._code = base.getCode(); this._data = base.getData(); this._node = base.getNode(); this._objectReference = base.getObjectReference(); this._transactionId = base.getTransactionId(); this._transactionUri = base.getTransactionUri(); this._type = base.getType(); switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
/** * @param message error message * @param errorType error type * @param node reference to node, that sent the error message * @return translated error message of general type (OF-1.0) */ @Override public org.opendaylight.yang.gen.v1.urn.opendaylight.flow.errors.rev131116.ErrorMessage getGranularNodeErrors(ErrorMessage message, ErrorType errorType, NodeRef node){ NodeErrorNotificationBuilder nodeErrBuilder = new NodeErrorNotificationBuilder(); nodeErrBuilder.setTransactionId(new TransactionId(BigInteger.valueOf(message.getXid()))); nodeErrBuilder.setType(errorType); nodeErrBuilder.setCode(message.getCode()); nodeErrBuilder.setNode(node); if (message.getData() != null) { nodeErrBuilder.setData(new String(message.getData())); } return nodeErrBuilder.build(); }