com.lark.oapi.service.calendar.v4.model.CalendarAclEvent 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.calendar.v4.model;
import com.lark.oapi.core.response.EmptyData;
import com.lark.oapi.service.calendar.v4.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 CalendarAclEvent {
/**
* acl资源ID
* 示例值:user_xxxxx
*/
@SerializedName("acl_id")
private String aclId;
/**
* 对日历的访问权限
*
示例值:unknown
*/
@SerializedName("role")
private String role;
/**
* 权限范围
*
示例值:
*/
@SerializedName("scope")
private AclScopeEvent scope;
/**
* 需要推送事件的用户列表
*
示例值:
*/
@SerializedName("user_id_list")
private UserId[] userIdList;
// builder 开始
public CalendarAclEvent() {
}
public CalendarAclEvent(Builder builder) {
/**
* acl资源ID
*
示例值:user_xxxxx
*/
this.aclId = builder.aclId;
/**
* 对日历的访问权限
*
示例值:unknown
*/
this.role = builder.role;
/**
* 权限范围
*
示例值:
*/
this.scope = builder.scope;
/**
* 需要推送事件的用户列表
*
示例值:
*/
this.userIdList = builder.userIdList;
}
public static Builder newBuilder() {
return new Builder();
}
public String getAclId() {
return this.aclId;
}
public void setAclId(String aclId) {
this.aclId = aclId;
}
public String getRole() {
return this.role;
}
public void setRole(String role) {
this.role = role;
}
public AclScopeEvent getScope() {
return this.scope;
}
public void setScope(AclScopeEvent scope) {
this.scope = scope;
}
public UserId[] getUserIdList() {
return this.userIdList;
}
public void setUserIdList(UserId[] userIdList) {
this.userIdList = userIdList;
}
public static class Builder {
/**
* acl资源ID
*
示例值:user_xxxxx
*/
private String aclId;
/**
* 对日历的访问权限
*
示例值:unknown
*/
private String role;
/**
* 权限范围
*
示例值:
*/
private AclScopeEvent scope;
/**
* 需要推送事件的用户列表
*
示例值:
*/
private UserId[] userIdList;
/**
* acl资源ID
*
示例值:user_xxxxx
*
* @param aclId
* @return
*/
public Builder aclId(String aclId) {
this.aclId = aclId;
return this;
}
/**
* 对日历的访问权限
*
示例值:unknown
*
* @param role
* @return
*/
public Builder role(String role) {
this.role = role;
return this;
}
/**
* 对日历的访问权限
*
示例值:unknown
*
* @param role {@link com.lark.oapi.service.calendar.v4.enums.CalendarAclEventCalendarAccessRoleEnum}
* @return
*/
public Builder role(com.lark.oapi.service.calendar.v4.enums.CalendarAclEventCalendarAccessRoleEnum role) {
this.role = role.getValue();
return this;
}
/**
* 权限范围
*
示例值:
*
* @param scope
* @return
*/
public Builder scope(AclScopeEvent scope) {
this.scope = scope;
return this;
}
/**
* 需要推送事件的用户列表
*
示例值:
*
* @param userIdList
* @return
*/
public Builder userIdList(UserId[] userIdList) {
this.userIdList = userIdList;
return this;
}
public CalendarAclEvent build() {
return new CalendarAclEvent(this);
}
}
}