public AddMeterOutputBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
@Override public RpcResult<AddMeterOutput> apply(final RpcResult<UpdateMeterOutput> input) { UpdateMeterOutput updateMeterOutput = input.getResult(); AddMeterOutputBuilder addMeterOutput = new AddMeterOutputBuilder(); addMeterOutput.setTransactionId(updateMeterOutput.getTransactionId()); AddMeterOutput result = addMeterOutput.build(); RpcResult<AddMeterOutput> rpcResult = assembleRpcResult(input, result); LOG.debug("Returning the Add Meter RPC result to MD-SAL"); return rpcResult; } };
private AddMeterOutputImpl(AddMeterOutputBuilder base) { this._transactionId = base.getTransactionId(); 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.meter.service.rev130918.AddMeterOutput>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.AddMeterOutput>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }