com.byteplus.model.ApiInfo Maven / Gradle / Ivy
package com.byteplus.model;
import com.byteplus.helper.Const;
import lombok.Data;
import org.apache.http.Header;
import org.apache.http.NameValuePair;
import java.util.List;
import java.util.Map;
@Data
public class ApiInfo {
private String method;
private String path;
private List query;
private List form;
private int connectionTimeout;
private int socketTimeout;
private List header;
public ApiInfo(Map params) {
this.method = (String) params.get(Const.Method);
this.path = (String) params.get(Const.Path);
this.query = (List) params.get(Const.Query);
this.form = (List) params.get(Const.Form);
this.connectionTimeout = params.get(Const.CONNECTION_TIMEOUT) == null ? 0 : (Integer) params.get(Const.CONNECTION_TIMEOUT);
this.socketTimeout = params.get(Const.SOCKET_TIMEOUT) == null ? 0 : (Integer) params.get(Const.SOCKET_TIMEOUT);
this.header = (List) params.get(Const.Header);
}
}