All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lark.oapi.service.task.v2.model.InputAttachment Maven / Gradle / Ivy

Go to download

Larksuite open platform facilitates the integration of enterprise applications and larksuite, making collaboration and management more efficient

The newest version!
// 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.task.v2.model;

import com.lark.oapi.core.response.EmptyData;
import com.lark.oapi.service.task.v2.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 InputAttachment {
    /**
     * 附件归属资源的类型
     * 

示例值:task */ @SerializedName("resource_type") private String resourceType; /** * 附件要归属资源的id。例如,要给任务添加附件,这里要填入任务的全局唯一ID *

示例值:fe96108d-b004-4a47-b2f8-6886e758b3a5 */ @SerializedName("resource_id") private String resourceId; /** * 要上传的文件 *

示例值: */ @SerializedName("file") private java.io.File file; // builder 开始 public InputAttachment() { } public InputAttachment(Builder builder) { /** * 附件归属资源的类型 *

示例值:task */ this.resourceType = builder.resourceType; /** * 附件要归属资源的id。例如,要给任务添加附件,这里要填入任务的全局唯一ID *

示例值:fe96108d-b004-4a47-b2f8-6886e758b3a5 */ this.resourceId = builder.resourceId; /** * 要上传的文件 *

示例值: */ this.file = builder.file; } public static Builder newBuilder() { return new Builder(); } public String getResourceType() { return this.resourceType; } public void setResourceType(String resourceType) { this.resourceType = resourceType; } public String getResourceId() { return this.resourceId; } public void setResourceId(String resourceId) { this.resourceId = resourceId; } public java.io.File getFile() { return this.file; } public void setFile(java.io.File file) { this.file = file; } public static class Builder { /** * 附件归属资源的类型 *

示例值:task */ private String resourceType; /** * 附件要归属资源的id。例如,要给任务添加附件,这里要填入任务的全局唯一ID *

示例值:fe96108d-b004-4a47-b2f8-6886e758b3a5 */ private String resourceId; /** * 要上传的文件 *

示例值: */ private java.io.File file; /** * 附件归属资源的类型 *

示例值:task * * @param resourceType * @return */ public Builder resourceType(String resourceType) { this.resourceType = resourceType; return this; } /** * 附件要归属资源的id。例如,要给任务添加附件,这里要填入任务的全局唯一ID *

示例值:fe96108d-b004-4a47-b2f8-6886e758b3a5 * * @param resourceId * @return */ public Builder resourceId(String resourceId) { this.resourceId = resourceId; return this; } /** * 要上传的文件 *

示例值: * * @param file * @return */ public Builder file(java.io.File file) { this.file = file; return this; } public InputAttachment build() { return new InputAttachment(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy