class GatewayDeviceInfo {

    private String id;

    private String name;

    private String description;

    private DeviceState state;

    private List<ChildrenDeviceInfo> children;


    public static GatewayDeviceInfo of(DeviceInstanceEntity gateway, List<DeviceInstanceEntity> children) {<FILL_FUNCTION_BODY>}
}


        GatewayDeviceInfo info = new GatewayDeviceInfo();
        info.setId(gateway.getId());
        info.setName(gateway.getName());
        info.setDescription(gateway.getDescribe());
        info.setState(gateway.getState());
        info.setChildren(children.stream().map(ChildrenDeviceInfo::of).collect(Collectors.toList()));

        return info;
    
<no_super_class>