com.alibaba.dashscope.common.GeneralGetParam Maven / Gradle / Ivy
The newest version!
package com.alibaba.dashscope.common;
import com.alibaba.dashscope.base.HalfDuplexParamBase;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.google.gson.JsonObject;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
public class GeneralGetParam extends HalfDuplexParamBase {
@Override
public String getModel() {
throw new UnsupportedOperationException("Unimplemented method 'getModel'");
}
@Override
public Map getParameters() {
Map params = new HashMap<>();
params.putAll(this.parameters);
return params;
}
@Override
public void validate() throws InputRequiredException {}
@Override
public Object getResources() {
return null;
}
@Override
public Map getHeaders() {
Map res = new HashMap<>();
for (Map.Entry entry : headers.entrySet()) {
String key = entry.getKey();
String value = entry.getValue().toString();
res.put(key, value);
}
return res;
}
@Override
public JsonObject getHttpBody() {
return null;
}
@Override
public Object getInput() {
throw new UnsupportedOperationException("Unimplemented method 'getInput'");
}
@Override
public ByteBuffer getBinaryData() {
throw new UnsupportedOperationException("Unimplemented method 'getBinaryData'");
}
}