com.lark.oapi.service.im.v1.model.ForwardThreadReq 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.im.v1.model;
import com.lark.oapi.core.response.EmptyData;
import com.lark.oapi.service.im.v1.enums.*;
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 ForwardThreadReq {
/**
* 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id
* 示例值:
*/
@Query
@SerializedName("receive_id_type")
private String receiveIdType;
/**
* 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。
*
示例值:b13g2t38-1jd2-458b-8djf-dtbca5104204
*/
@Query
@SerializedName("uuid")
private String uuid;
/**
* 要转发的话题ID
*
示例值:ot_dc13264520392913993dd051dba21dcf
*/
@Path
@SerializedName("thread_id")
private String threadId;
@Body
private ForwardThreadReqBody body;
// builder 开始
public ForwardThreadReq() {
}
public ForwardThreadReq(Builder builder) {
/**
* 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id
*
示例值:
*/
this.receiveIdType = builder.receiveIdType;
/**
* 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。
*
示例值:b13g2t38-1jd2-458b-8djf-dtbca5104204
*/
this.uuid = builder.uuid;
/**
* 要转发的话题ID
*
示例值:ot_dc13264520392913993dd051dba21dcf
*/
this.threadId = builder.threadId;
this.body = builder.body;
}
public static Builder newBuilder() {
return new Builder();
}
public String getReceiveIdType() {
return this.receiveIdType;
}
public void setReceiveIdType(String receiveIdType) {
this.receiveIdType = receiveIdType;
}
public String getUuid() {
return this.uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getThreadId() {
return this.threadId;
}
public void setThreadId(String threadId) {
this.threadId = threadId;
}
public ForwardThreadReqBody getForwardThreadReqBody() {
return this.body;
}
public void setForwardThreadReqBody(ForwardThreadReqBody body) {
this.body = body;
}
public static class Builder {
private String receiveIdType; // 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id
private String uuid; // 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。
private String threadId; // 要转发的话题ID
private ForwardThreadReqBody body;
/**
* 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id
*
示例值:
*
* @param receiveIdType
* @return
*/
public Builder receiveIdType(String receiveIdType) {
this.receiveIdType = receiveIdType;
return this;
}
/**
* 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id
*
示例值:
*
* @param receiveIdType {@link com.lark.oapi.service.im.v1.enums.ForwardThreadReceiveIdTypeEnum}
* @return
*/
public Builder receiveIdType(com.lark.oapi.service.im.v1.enums.ForwardThreadReceiveIdTypeEnum receiveIdType) {
this.receiveIdType = receiveIdType.getValue();
return this;
}
/**
* 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。
*
示例值:b13g2t38-1jd2-458b-8djf-dtbca5104204
*
* @param uuid
* @return
*/
public Builder uuid(String uuid) {
this.uuid = uuid;
return this;
}
/**
* 要转发的话题ID
*
示例值:ot_dc13264520392913993dd051dba21dcf
*
* @param threadId
* @return
*/
public Builder threadId(String threadId) {
this.threadId = threadId;
return this;
}
public ForwardThreadReqBody getForwardThreadReqBody() {
return this.body;
}
/**
* body
*
* @param body
* @return
*/
public Builder forwardThreadReqBody(ForwardThreadReqBody body) {
this.body = body;
return this;
}
public ForwardThreadReq build() {
return new ForwardThreadReq(this);
}
}
}