com.larksuite.oapi.service.drive_permission.v1.DrivePermissionService Maven / Gradle / Ivy
// Code generated by lark suite oapi sdk gen
package com.larksuite.oapi.service.drive_permission.v1;
import com.larksuite.oapi.core.api.AccessTokenType;
import com.larksuite.oapi.core.api.Api;
import com.larksuite.oapi.core.api.ReqCaller;
import com.larksuite.oapi.core.api.request.*;
import com.larksuite.oapi.core.api.response.*;
import com.larksuite.oapi.core.Config;
import com.larksuite.oapi.service.drive_permission.v1.model.*;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
public class DrivePermissionService {
private final Config config;
private final Members members;
private final Publics publics;
public DrivePermissionService(Config config) {
this.config = config;
this.members = new Members(this);
this.publics = new Publics(this);
}
public Members getMembers() {
return members;
}
public static class Members {
private final DrivePermissionService service;
public Members(DrivePermissionService service) {
this.service = service;
}
public MemberCreateReqCall create(MemberCreateReqBody body, RequestOptFn... optFns) {
return new MemberCreateReqCall(this, body, optFns);
}
public MemberDeleteReqCall delete(MemberDeleteReqBody body, RequestOptFn... optFns) {
return new MemberDeleteReqCall(this, body, optFns);
}
public MemberListReqCall list(MemberListReqBody body, RequestOptFn... optFns) {
return new MemberListReqCall(this, body, optFns);
}
public MemberPermittedReqCall permitted(MemberPermittedReqBody body, RequestOptFn... optFns) {
return new MemberPermittedReqCall(this, body, optFns);
}
public MemberTransferReqCall transfer(MemberTransferReqBody body, RequestOptFn... optFns) {
return new MemberTransferReqCall(this, body, optFns);
}
public MemberUpdateReqCall update(MemberUpdateReqBody body, RequestOptFn... optFns) {
return new MemberUpdateReqCall(this, body, optFns);
}
}
public static class MemberCreateReqCall extends ReqCaller {
private final Members members;
private final MemberCreateReqBody body;
private final List optFns;
private MemberCreateResult result;
private MemberCreateReqCall(Members members, MemberCreateReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new MemberCreateResult();
this.members = members;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/member/create", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.members.service.config, request);
}
}
public static class MemberDeleteReqCall extends ReqCaller {
private final Members members;
private final MemberDeleteReqBody body;
private final List optFns;
private MemberDeleteResult result;
private MemberDeleteReqCall(Members members, MemberDeleteReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new MemberDeleteResult();
this.members = members;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/member/delete", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.members.service.config, request);
}
}
public static class MemberListReqCall extends ReqCaller {
private final Members members;
private final MemberListReqBody body;
private final List optFns;
private MemberListResult result;
private MemberListReqCall(Members members, MemberListReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new MemberListResult();
this.members = members;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/member/list", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.members.service.config, request);
}
}
public static class MemberPermittedReqCall extends ReqCaller {
private final Members members;
private final MemberPermittedReqBody body;
private final List optFns;
private MemberPermittedResult result;
private MemberPermittedReqCall(Members members, MemberPermittedReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new MemberPermittedResult();
this.members = members;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/member/permitted", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.members.service.config, request);
}
}
public static class MemberTransferReqCall extends ReqCaller {
private final Members members;
private final MemberTransferReqBody body;
private final List optFns;
private MemberTransferResult result;
private MemberTransferReqCall(Members members, MemberTransferReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new MemberTransferResult();
this.members = members;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/member/transfer", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.members.service.config, request);
}
}
public static class MemberUpdateReqCall extends ReqCaller {
private final Members members;
private final MemberUpdateReqBody body;
private final List optFns;
private MemberUpdateResult result;
private MemberUpdateReqCall(Members members, MemberUpdateReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new MemberUpdateResult();
this.members = members;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/member/update", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.members.service.config, request);
}
}
public Publics getPublics() {
return publics;
}
public static class Publics {
private final DrivePermissionService service;
public Publics(DrivePermissionService service) {
this.service = service;
}
public PublicUpdateReqCall update(PublicUpdateReqBody body, RequestOptFn... optFns) {
return new PublicUpdateReqCall(this, body, optFns);
}
}
public static class PublicUpdateReqCall extends ReqCaller {
private final Publics publics;
private final PublicUpdateReqBody body;
private final List optFns;
private PublicUpdateResult result;
private PublicUpdateReqCall(Publics publics, PublicUpdateReqBody body, RequestOptFn... optFns) {
this.body = body;
this.optFns = new ArrayList<>();
this.optFns.addAll(Arrays.asList(optFns));
this.result = new PublicUpdateResult();
this.publics = publics;
}
@Override
public Response execute() throws Exception {
com.larksuite.oapi.core.api.request.Request request = com.larksuite.oapi.core.api.request.Request.newRequest("/open-apis/drive/permission/public/update", "POST",
new AccessTokenType[]{AccessTokenType.User, AccessTokenType.Tenant},
this.body, this.result, this.optFns.toArray(new RequestOptFn[]{}));
return Api.send(this.publics.service.config, request);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy