package org.apache.seatunnel.connectors.seatunnel.http.config;

import lombok.Data;
import org.apache.seatunnel.connectors.seatunnel.http.enums.PageRelationType;
import org.apache.seatunnel.connectors.seatunnel.http.enums.PageType;

import java.io.Serializable;
import java.util.List;

@Data
public class PageParam implements Serializable {

    /**
     * 是否开启
     */
    private Boolean pageEnabled;
    /**
     * 分页类型：页码，偏移量，游标
     */
    private PageType pageType;
    /**
     * 分页参数名
     */
    private String paramName;
    /**
     * 限制分页取数的次数
     */
    private Integer requestMaxTimes = 100;
    /**
     * 初始值
     */
    private String currVal;
    /**
     * 增长间隔
     */
    private Integer stepVal = 1;
    /**
     * 游标方式：更新值jsonpath
     */
    private String updateFieldPath;
    /**
     * 分页结束条件关联方式
     */
    private PageRelationType endConditionRelationType = PageRelationType.AND;
    /**
     * 分页结束条件
     */
    private List<PageCondition> endConditions;
}
