public AggregateFlowStatisticsBuilder 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 AggregateFlowStatisticsBuilder 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 AggregateFlowStatisticsBuilder 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 AggregateFlowStatisticsImpl(AggregateFlowStatisticsBuilder base) { this._byteCount = base.getByteCount(); this._flowCount = base.getFlowCount(); this._packetCount = base.getPacketCount(); 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.aggregate.flow.statistics.AggregateFlowStatistics>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.aggregate.flow.statistics.AggregateFlowStatistics>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.aggregate.flow.statistics.AggregateFlowStatistics>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.aggregate.flow.statistics.AggregateFlowStatistics>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
if (notif instanceof AggregateFlowStatisticsUpdate) { final AggregateFlowStatisticsData stats = new AggregateFlowStatisticsDataBuilder() .setAggregateFlowStatistics(new AggregateFlowStatisticsBuilder(notification).build()).build(); final InstanceIdentifier<FlowCapableNode> fNodeIdent = InstanceIdentifier.create(Nodes.class) .child(Node.class, new NodeKey(nodeId)).augmentation(FlowCapableNode.class);
if (notif instanceof AggregateFlowStatisticsUpdate) { final AggregateFlowStatisticsData stats = new AggregateFlowStatisticsDataBuilder() .setAggregateFlowStatistics(new AggregateFlowStatisticsBuilder(notification).build()).build(); final InstanceIdentifier<FlowCapableNode> fNodeIdent = InstanceIdentifier.create(Nodes.class) .child(Node.class, new NodeKey(nodeId)).augmentation(FlowCapableNode.class);