private LogicalLocationImpl(LogicalLocationBuilder base) { this._nodeId = base.getNodeId(); this._tpId = base.getTpId(); 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.faas.fabric.endpoint.rev150930.endpoint.attributes.LogicalLocation>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.endpoint.rev150930.endpoint.attributes.LogicalLocation>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.endpoint.rev150930.endpoint.attributes.LogicalLocation>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.endpoint.rev150930.endpoint.attributes.LogicalLocation>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public LogicalLocationBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.endpoint.rev150930.endpoint.attributes.LogicalLocation>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.endpoint.rev150930.endpoint.attributes.LogicalLocation> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
epInputBuilder.setOwnFabric(fabricId); LogicalLocationBuilder llb = new LogicalLocationBuilder(); llb.setNodeId(lswId); llb.setTpId(lswLogicalPortId); epInputBuilder.setLogicalLocation(llb.build()); epInputBuilder.setOwnFabric(fabricId); LogicalLocationBuilder llb = new LogicalLocationBuilder(); llb.setNodeId(lswId); llb.setTpId(lswLogicalPortId); epInputBuilder.setLogicalLocation(llb.build());