com.lark.oapi.service.bitable.v1.model.Attachment Maven / Gradle / Ivy
Show all versions of oapi-sdk Show documentation
// Code generated by lark suite oapi sdk gen
/*
* MIT License
*
* Copyright (c) 2022 Lark Technologies Pte. Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.lark.oapi.service.bitable.v1.model;
import com.lark.oapi.core.response.EmptyData;
import com.lark.oapi.service.bitable.v1.enums.*;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.SerializedName;
import com.lark.oapi.core.annotation.Body;
import com.lark.oapi.core.annotation.Path;
import com.lark.oapi.core.annotation.Query;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import com.lark.oapi.core.utils.Strings;
import com.lark.oapi.core.response.BaseResponse;
public class Attachment {
/**
* attachment token
* 示例值:
*/
@SerializedName("file_token")
private String fileToken;
/**
* attachment name
*
示例值:
*/
@SerializedName("name")
private String name;
/**
* attachment type
*
示例值:
*/
@SerializedName("type")
private String type;
/**
* attachment size
*
示例值:
*/
@SerializedName("size")
private Integer size;
/**
* download url
*
示例值:
*/
@SerializedName("url")
private String url;
/**
* temporary download url
*
示例值:
*/
@SerializedName("tmp_url")
private String tmpUrl;
// builder 开始
public Attachment() {
}
public Attachment(Builder builder) {
/**
* attachment token
*
示例值:
*/
this.fileToken = builder.fileToken;
/**
* attachment name
*
示例值:
*/
this.name = builder.name;
/**
* attachment type
*
示例值:
*/
this.type = builder.type;
/**
* attachment size
*
示例值:
*/
this.size = builder.size;
/**
* download url
*
示例值:
*/
this.url = builder.url;
/**
* temporary download url
*
示例值:
*/
this.tmpUrl = builder.tmpUrl;
}
public static Builder newBuilder() {
return new Builder();
}
public String getFileToken() {
return this.fileToken;
}
public void setFileToken(String fileToken) {
this.fileToken = fileToken;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public Integer getSize() {
return this.size;
}
public void setSize(Integer size) {
this.size = size;
}
public String getUrl() {
return this.url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTmpUrl() {
return this.tmpUrl;
}
public void setTmpUrl(String tmpUrl) {
this.tmpUrl = tmpUrl;
}
public static class Builder {
/**
* attachment token
*
示例值:
*/
private String fileToken;
/**
* attachment name
*
示例值:
*/
private String name;
/**
* attachment type
*
示例值:
*/
private String type;
/**
* attachment size
*
示例值:
*/
private Integer size;
/**
* download url
*
示例值:
*/
private String url;
/**
* temporary download url
*
示例值:
*/
private String tmpUrl;
/**
* attachment token
*
示例值:
*
* @param fileToken
* @return
*/
public Builder fileToken(String fileToken) {
this.fileToken = fileToken;
return this;
}
/**
* attachment name
*
示例值:
*
* @param name
* @return
*/
public Builder name(String name) {
this.name = name;
return this;
}
/**
* attachment type
*
示例值:
*
* @param type
* @return
*/
public Builder type(String type) {
this.type = type;
return this;
}
/**
* attachment size
*
示例值:
*
* @param size
* @return
*/
public Builder size(Integer size) {
this.size = size;
return this;
}
/**
* download url
*
示例值:
*
* @param url
* @return
*/
public Builder url(String url) {
this.url = url;
return this;
}
/**
* temporary download url
*
示例值:
*
* @param tmpUrl
* @return
*/
public Builder tmpUrl(String tmpUrl) {
this.tmpUrl = tmpUrl;
return this;
}
public Attachment build() {
return new Attachment(this);
}
}
}