package com.lanyuanxiaoyao.service.forest.service;

import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
import com.eshore.odcp.hudi.connector.entity.FlinkJob;
import com.eshore.odcp.hudi.connector.entity.SyncState;
import com.eshore.odcp.hudi.connector.entity.TableMeta;
import com.lanyuanxiaoyao.service.configuration.entity.PageResponse;
import com.lanyuanxiaoyao.service.configuration.entity.info.JobAndMetas;
import com.lanyuanxiaoyao.service.configuration.entity.info.JobIdAndAlias;
import java.util.Map;
import org.eclipse.collections.api.list.ImmutableList;

/**
 * Info 接口
 *
 * @author lanyuanxiaoyao
 * @date 2023-04-24
 */
@BaseRequest(baseURL = "http://service-info-query")
public interface InfoService {
    @Get("/info/job_id_alias")
    PageResponse<JobIdAndAlias> jobIdAndAlias(@Query Map<String, Object> queryMap);

    @Get("/info/job_metas")
    ImmutableList<JobAndMetas> jobAndMetas();

    @Get("/info/flink_job/list")
    ImmutableList<FlinkJob> flinkJobList();

    @Get("/info/flink_job/detail")
    FlinkJob flinkJobDetail(@Query("flink_job_id") Long flinkJobId);

    @Get("/info/table_meta/list")
    ImmutableList<TableMeta> tableMetaList();

    @Get("/info/table_meta/list")
    ImmutableList<TableMeta> tableMetaList(@Query("flink_job_id") Long flinkJobId);

    @Get("/info/table_meta/detail")
    TableMeta tableMetaDetail(@Query("flink_job_id") Long flinkJobId, @Query("alias") String alias);

    @Get("/info/sync_state/detail")
    SyncState syncStateDetail(@Query("flink_job_id") Long flinkJobId, @Query("alias") String alias);
}
