package org.lym.pom.util.github.dto;

import lombok.Data;

import static org.lym.pom.util.github.GitHubFileUtil.CDN_URL_PREFIX;

@Data
public class GithubFileInfo {
    String name;
    String path;
    String sha;
    long size;
    String url;
    String html_url;
    String git_url;
    String download_url;
    String type;
    Links _links;

    String getCdnDownloadUrl() {
        return CDN_URL_PREFIX + path;
    }

    @Data
    public static class Links {
        String self;
        String git;
        String html;
    }
}