class OrganizationInfo {

    @Schema(description = "机构(部门ID)")
    private String id;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "上级ID")
    private String parentId;

    @Schema(description = "序号")
    private long sortIndex;

    public static OrganizationInfo of(Dimension dimension) {<FILL_FUNCTION_BODY>}
}

        OrganizationInfo info = new OrganizationInfo();
        info.setId(dimension.getId());
        info.setName(dimension.getName());

        dimension.getOption("parentId")
                 .map(String::valueOf)
                 .ifPresent(info::setParentId);

        dimension.getOption("code")
                 .map(String::valueOf)
                 .ifPresent(info::setCode);
        dimension.getOption("sortIndex")
                 .map(sortIndex -> CastUtils.castNumber(sortIndex).longValue())
                 .ifPresent(info::setSortIndex);

        return info;
    
<no_super_class>