public AggregateFlowStatisticsUpdateBuilder setByteCount(Counter64 value) { if (value != null) { BigInteger _constraint = value.getValue(); boolean isValidRange = false; for (Range<BigInteger> r : _byteCount_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _byteCount_range)); } } this._byteCount = value; return this; } public static List<Range<BigInteger>> _byteCount_range() {
public AggregateFlowStatisticsUpdateBuilder setFlowCount(Counter32 value) { if (value != null) { BigInteger _constraint = BigInteger.valueOf(value.getValue()); boolean isValidRange = false; for (Range<BigInteger> r : _flowCount_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _flowCount_range)); } } this._flowCount = value; return this; } public static List<Range<BigInteger>> _flowCount_range() {
public AggregateFlowStatisticsUpdateBuilder setPacketCount(Counter64 value) { if (value != null) { BigInteger _constraint = value.getValue(); boolean isValidRange = false; for (Range<BigInteger> r : _packetCount_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _packetCount_range)); } } this._packetCount = value; return this; } public static List<Range<BigInteger>> _packetCount_range() {
private AggregateFlowStatisticsUpdateImpl(AggregateFlowStatisticsUpdateBuilder base) { this._byteCount = base.getByteCount(); this._flowCount = base.getFlowCount(); this._id = base.getId(); this._nodeConnector = base.getNodeConnector(); this._packetCount = base.getPacketCount(); this._transactionId = base.getTransactionId(); this._moreReplies = base.isMoreReplies(); 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.statistics.rev130819.AggregateFlowStatisticsUpdate>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.AggregateFlowStatisticsUpdate>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.AggregateFlowStatisticsUpdate>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.AggregateFlowStatisticsUpdate>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
AggregateFlowStatisticsUpdateBuilder message = new AggregateFlowStatisticsUpdateBuilder(); message.setId(node); message.setMoreReplies(mpReply.getFlags().isOFPMPFREQMORE()); message.setTransactionId(generateTransactionId(mpReply.getXid())); message.setByteCount(new Counter64(replyBody.getByteCount())); message.setPacketCount(new Counter64(replyBody.getPacketCount())); message.setFlowCount(new Counter32(replyBody.getFlowCount())); logger.debug("Converted aggregate flow statistics : {}",message.build().toString()); listDataObject.add(message.build()); return listDataObject;
public AggregateFlowStatisticsUpdateBuilder setTransactionId(TransactionId value) { if (value != null) { BigInteger _constraint = value.getValue(); boolean isValidRange = false; for (Range<BigInteger> r : _transactionId_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _transactionId_range)); } } this._transactionId = value; return this; } public static List<Range<BigInteger>> _transactionId_range() {