com.alipay.api.request.AlipayOpenMiniCloudFileUploadRequest Maven / Gradle / Ivy
package com.alipay.api.request;
import java.util.HashMap;
import java.util.Map;
import com.alipay.api.FileItem;
import com.alipay.api.AlipayUploadRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayOpenMiniCloudFileUploadResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.open.mini.cloud.file.upload request
*
* @author auto create
* @since 1.0, 2023-09-20 14:16:44
*/
public class AlipayOpenMiniCloudFileUploadRequest implements AlipayUploadRequest {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 云环境ID,在云托管平台获取
*/
private String cloudId;
/**
* 文件信息,文件二进制字节流,最大为100M。WIDGET应用上传的图片最大为200K
*/
private FileItem fileContent;
/**
* 文件名称,type为File时,填写文件名称。type为Directory时,填写目录名称
*/
private String fileName;
/**
* 文件路径,必须以/开头,根目录/
*/
private String path;
/**
* 类型,File:文件类型,Directory:目录类型
*/
private String type;
public void setCloudId(String cloudId) {
this.cloudId = cloudId;
}
public String getCloudId() {
return this.cloudId;
}
public void setFileContent(FileItem fileContent) {
this.fileContent = fileContent;
}
public FileItem getFileContent() {
return this.fileContent;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileName() {
return this.fileName;
}
public void setPath(String path) {
this.path = path;
}
public String getPath() {
return this.path;
}
public void setType(String type) {
this.type = type;
}
public String getType() {
return this.type;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public String getProdCode() {
return this.prodCode;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getApiMethodName() {
return "alipay.open.mini.cloud.file.upload";
}
public Map getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("cloud_id", this.cloudId);
txtParams.put("file_name", this.fileName);
txtParams.put("path", this.path);
txtParams.put("type", this.type);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Map getFileParams() {
Map params = new HashMap();
params.put("file_content", this.fileContent);
return params;
}
public Class getResponseClass() {
return AlipayOpenMiniCloudFileUploadResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy