
com.lark.oapi.service.im.v1.model.Widget Maven / Gradle / Ivy
// 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.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 Widget {
/**
* 小组件ID
* 示例值:7117116451961487361
*/
@SerializedName("widget_id")
private String widgetId;
/**
* 小组件类型
*
示例值:URL
*/
@SerializedName("widget_type")
private String widgetType;
/**
* 小组件链接,必须以http开头
*
示例值:
*/
@SerializedName("widget_url")
private WidgetUrl widgetUrl;
// builder 开始
public Widget() {
}
public Widget(Builder builder) {
/**
* 小组件ID
*
示例值:7117116451961487361
*/
this.widgetId = builder.widgetId;
/**
* 小组件类型
*
示例值:URL
*/
this.widgetType = builder.widgetType;
/**
* 小组件链接,必须以http开头
*
示例值:
*/
this.widgetUrl = builder.widgetUrl;
}
public static Builder newBuilder() {
return new Builder();
}
public String getWidgetId() {
return this.widgetId;
}
public void setWidgetId(String widgetId) {
this.widgetId = widgetId;
}
public String getWidgetType() {
return this.widgetType;
}
public void setWidgetType(String widgetType) {
this.widgetType = widgetType;
}
public WidgetUrl getWidgetUrl() {
return this.widgetUrl;
}
public void setWidgetUrl(WidgetUrl widgetUrl) {
this.widgetUrl = widgetUrl;
}
public static class Builder {
/**
* 小组件ID
*
示例值:7117116451961487361
*/
private String widgetId;
/**
* 小组件类型
*
示例值:URL
*/
private String widgetType;
/**
* 小组件链接,必须以http开头
*
示例值:
*/
private WidgetUrl widgetUrl;
/**
* 小组件ID
*
示例值:7117116451961487361
*
* @param widgetId
* @return
*/
public Builder widgetId(String widgetId) {
this.widgetId = widgetId;
return this;
}
/**
* 小组件类型
*
示例值:URL
*
* @param widgetType
* @return
*/
public Builder widgetType(String widgetType) {
this.widgetType = widgetType;
return this;
}
/**
* 小组件类型
*
示例值:URL
*
* @param widgetType {@link com.lark.oapi.service.im.v1.enums.WidgetWidgetTypeEnum}
* @return
*/
public Builder widgetType(com.lark.oapi.service.im.v1.enums.WidgetWidgetTypeEnum widgetType) {
this.widgetType = widgetType.getValue();
return this;
}
/**
* 小组件链接,必须以http开头
*
示例值:
*
* @param widgetUrl
* @return
*/
public Builder widgetUrl(WidgetUrl widgetUrl) {
this.widgetUrl = widgetUrl;
return this;
}
public Widget build() {
return new Widget(this);
}
}
}