private CreateGatewayInputImpl(CreateGatewayInputBuilder base) { this._fabricId = base.getFabricId(); this._ipAddress = base.getIpAddress(); this._logicalRouter = base.getLogicalRouter(); this._logicalSwitch = base.getLogicalSwitch(); this._network = base.getNetwork(); 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.services.rev150930.CreateGatewayInput>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.services.rev150930.CreateGatewayInput>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.services.rev150930.CreateGatewayInput>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.services.rev150930.CreateGatewayInput>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public CreateGatewayInputBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.services.rev150930.CreateGatewayInput>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.services.rev150930.CreateGatewayInput> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
CreateGatewayInputBuilder inputBuilder = new CreateGatewayInputBuilder(); FabricId fabricId = new FabricId(fId); inputBuilder.setFabricId(fabricId); inputBuilder.setLogicalRouter(new NodeId(lrId)); inputBuilder.setLogicalSwitch(new NodeId(lswId)); inputBuilder.setIpAddress(new IpAddress(gatewayIpAddr)); inputBuilder.setNetwork(new IpPrefix(ipPrefix)); Future<RpcResult<CreateGatewayOutput>> result = this.fabServiceService.createGateway(inputBuilder.build()); try { RpcResult<CreateGatewayOutput> output = result.get();
CreateGatewayInputBuilder inputBuilder = new CreateGatewayInputBuilder(); FabricId fabricId = new FabricId(fId); inputBuilder.setFabricId(fabricId); inputBuilder.setLogicalRouter(new NodeId(lrId)); inputBuilder.setLogicalSwitch(new NodeId(lswId)); inputBuilder.setIpAddress(new IpAddress(gatewayIpAddr)); inputBuilder.setNetwork(new IpPrefix(ipPrefix)); Future<RpcResult<CreateGatewayOutput>> result = this.fabServiceService.createGateway(inputBuilder.build()); try { RpcResult<CreateGatewayOutput> output = result.get();