private LogicalRouterImpl(LogicalRouterBuilder base) { if (base.getKey() == null) { this._key = new LogicalRouterKey( base.getUuid() ); this._uuid = base.getUuid(); } else { this._key = base.getKey(); this._uuid = _key.getUuid(); } this._description = base.getDescription(); this._name = base.getName(); this._port = base.getPort(); this._status = base.getStatus(); this._tenantId = base.getTenantId(); this._adminStateUp = base.isAdminStateUp(); this._public = base.isPublic(); 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.logical.faas.logical.routers.rev151013.logical.routers.container.logical.routers.LogicalRouter>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.logical.routers.rev151013.logical.routers.container.logical.routers.LogicalRouter>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.logical.routers.rev151013.logical.routers.container.logical.routers.LogicalRouter>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.logical.routers.rev151013.logical.routers.container.logical.routers.LogicalRouter>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public static InstanceIdentifier<LogicalRouter> logicalRouterIid(Uuid tenantId, Uuid routerId) { return InstanceIdentifier.builder(TenantLogicalNetworks.class) .child(TenantLogicalNetwork.class, new TenantLogicalNetworkKey(tenantId)) .child(LogicalRouters.class) .child(LogicalRouter.class, new LogicalRouterKey(routerId)) .build(); }
public LogicalRouterBuilder(LogicalRouter base) { if (base.getKey() == null) { this._key = new LogicalRouterKey( base.getUuid() ); this._uuid = base.getUuid(); } else { this._key = base.getKey(); this._uuid = _key.getUuid(); } this._description = base.getDescription(); this._name = base.getName(); this._port = base.getPort(); this._status = base.getStatus(); this._tenantId = base.getTenantId(); this._adminStateUp = base.isAdminStateUp(); this._public = base.isPublic(); if (base instanceof LogicalRouterImpl) { LogicalRouterImpl impl = (LogicalRouterImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.logical.routers.rev151013.logical.routers.container.logical.routers.LogicalRouter> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.logical.faas.logical.routers.rev151013.logical.routers.container.logical.routers.LogicalRouter>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }