@Override public Initialized<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap> init( @Nonnull final InstanceIdentifier<NshMap> id, @Nonnull final NshMap readValue, @Nonnull final ReadContext ctx) { return Initialized.create( InstanceIdentifier.create(VppNsh.class).child( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.NshMaps.class).child( org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMap.class, new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapKey(id.firstKeyOf(NshMap.class).getName())), new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev170315.vpp.nsh.nsh.maps.NshMapBuilder(readValue).setName(readValue.getName()).build()); } }
public NshMapBuilder(NshMap base) { if (base.key() == null) { this.key = new NshMapKey( base.getName() ); this._name = base.getName(); } else { this.key = base.key(); this._name = key.getName(); } this._encapIfName = base.getEncapIfName(); this._encapType = base.getEncapType(); this._mappedNsi = base.getMappedNsi(); this._mappedNsp = base.getMappedNsp(); this._nshAction = base.getNshAction(); this._nsi = base.getNsi(); this._nsp = base.getNsp(); if (base instanceof NshMapImpl) { NshMapImpl impl = (NshMapImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<NshMap> casted =(AugmentationHolder<NshMap>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
private NshMapImpl(NshMapBuilder base) { if (base.key() == null) { this.key = new NshMapKey( base.getName() ); this._name = base.getName(); } else { this.key = base.key(); this._name = key.getName(); } this._encapIfName = base.getEncapIfName(); this._encapType = base.getEncapType(); this._mappedNsi = base.getMappedNsi(); this._mappedNsp = base.getMappedNsp(); this._nshAction = base.getNshAction(); this._nsi = base.getNsi(); this._nsp = base.getNsp(); this.augmentation = ImmutableMap.copyOf(base.augmentation); }