package com.yunfeiyun.agmp.common.core.domain.model;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class RunParam implements IBaseRunParam{
    private String level;
    private String  name;
    private List<String>  key;
    private List<String>  value;


    public static RunParam build(String level ,String name , String[] key ,String[] value){
        RunParam param = new RunParam();
        param.level = level != null ? level : "post";
        param.name =  name != null ? name : "";
        param.key = key != null ? Arrays.asList(key) : new ArrayList<>();
        param.value = value != null ? Arrays.asList(value) : new ArrayList<>();
        return param;
    }

    @Override
    public String getLevel() {
        return this.level;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public List<String> getKey() {
        return this.key;
    }

    @Override
    public List<String> getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return "RunParam{" +
                "level='" + level + '\'' +
                ", name=" + name +
                ", key=" + key +
                ", value=" + value +
                '}';
    }
}
