private UpdateMeterOutputImpl(UpdateMeterOutputBuilder 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.UpdateMeterOutput>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public UpdateMeterOutputBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.UpdateMeterOutput> 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<UpdateMeterOutput> apply(final RpcResult<Void> inputArg) { UpdateMeterOutputBuilder meterModOutput = new UpdateMeterOutputBuilder(); BigInteger bigIntXid = BigInteger.valueOf(input.getXid()); meterModOutput.setTransactionId(new TransactionId(bigIntXid)); UpdateMeterOutput result = meterModOutput.build(); RpcResult<UpdateMeterOutput> rpcResult = RpcResultBuilder .<UpdateMeterOutput>status(inputArg.isSuccessful()).withResult(result) .withRpcErrors(inputArg.getErrors()).build(); return rpcResult; } });