// Code generated by Lark OpenAPI.

package larkapaas

import (
	"context"
	"github.com/larksuite/oapi-sdk-go/v3/core"
	"net/http"
)

type V1 struct {
	App                               *app                               // app
	ApplicationAuditLog               *applicationAuditLog               // application.audit_log
	ApplicationEnvironmentVariable    *applicationEnvironmentVariable    // application.environment_variable
	ApplicationFlow                   *applicationFlow                   // application.flow
	ApplicationFunction               *applicationFunction               // application.function
	ApplicationObject                 *applicationObject                 // application.object
	ApplicationObjectRecord           *applicationObjectRecord           // application.object.record
	ApplicationRecordPermissionMember *applicationRecordPermissionMember // application.record_permission.member
	ApplicationRoleMember             *applicationRoleMember             // application.role.member
	ApprovalInstance                  *approvalInstance                  // approval_instance
	ApprovalTask                      *approvalTask                      // approval_task
	SeatActivity                      *seatActivity                      // seat_activity
	SeatAssignment                    *seatAssignment                    // seat_assignment
	UserTask                          *userTask                          // user_task
	Workspace                         *workspace                         // workspace
	WorkspaceEnum                     *workspaceEnum                     // workspace.enum
	WorkspaceTable                    *workspaceTable                    // workspace.table
	WorkspaceView                     *workspaceView                     // workspace.view
}

func New(config *larkcore.Config) *V1 {
	return &V1{
		App:                               &app{config: config},
		ApplicationAuditLog:               &applicationAuditLog{config: config},
		ApplicationEnvironmentVariable:    &applicationEnvironmentVariable{config: config},
		ApplicationFlow:                   &applicationFlow{config: config},
		ApplicationFunction:               &applicationFunction{config: config},
		ApplicationObject:                 &applicationObject{config: config},
		ApplicationObjectRecord:           &applicationObjectRecord{config: config},
		ApplicationRecordPermissionMember: &applicationRecordPermissionMember{config: config},
		ApplicationRoleMember:             &applicationRoleMember{config: config},
		ApprovalInstance:                  &approvalInstance{config: config},
		ApprovalTask:                      &approvalTask{config: config},
		SeatActivity:                      &seatActivity{config: config},
		SeatAssignment:                    &seatAssignment{config: config},
		UserTask:                          &userTask{config: config},
		Workspace:                         &workspace{config: config},
		WorkspaceEnum:                     &workspaceEnum{config: config},
		WorkspaceTable:                    &workspaceTable{config: config},
		WorkspaceView:                     &workspaceView{config: config},
	}
}

type app struct {
	config *larkcore.Config
}
type applicationAuditLog struct {
	config *larkcore.Config
}
type applicationEnvironmentVariable struct {
	config *larkcore.Config
}
type applicationFlow struct {
	config *larkcore.Config
}
type applicationFunction struct {
	config *larkcore.Config
}
type applicationObject struct {
	config *larkcore.Config
}
type applicationObjectRecord struct {
	config *larkcore.Config
}
type applicationRecordPermissionMember struct {
	config *larkcore.Config
}
type applicationRoleMember struct {
	config *larkcore.Config
}
type approvalInstance struct {
	config *larkcore.Config
}
type approvalTask struct {
	config *larkcore.Config
}
type seatActivity struct {
	config *larkcore.Config
}
type seatAssignment struct {
	config *larkcore.Config
}
type userTask struct {
	config *larkcore.Config
}
type workspace struct {
	config *larkcore.Config
}
type workspaceEnum struct {
	config *larkcore.Config
}
type workspaceTable struct {
	config *larkcore.Config
}
type workspaceView struct {
	config *larkcore.Config
}

// List
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=app&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/list_app.go
func (a *app) List(ctx context.Context, req *ListAppReq, options ...larkcore.RequestOptionFunc) (*ListAppResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/apps"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListAppResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *app) ListByIterator(ctx context.Context, req *ListAppReq, options ...larkcore.RequestOptionFunc) (*ListAppIterator, error) {
	return &ListAppIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.List,
		options:  options,
		limit:    req.Limit}, nil
}

// AuditLogList
//
// - 获取审计日志列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=audit_log_list&project=apaas&resource=application.audit_log&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/auditLogList_applicationAuditLog.go
func (a *applicationAuditLog) AuditLogList(ctx context.Context, req *AuditLogListApplicationAuditLogReq, options ...larkcore.RequestOptionFunc) (*AuditLogListApplicationAuditLogResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/audit_log/audit_log_list"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &AuditLogListApplicationAuditLogResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// DataChangeLogDetail
//
// - 获取数据变更日志详情
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=data_change_log_detail&project=apaas&resource=application.audit_log&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/dataChangeLogDetail_applicationAuditLog.go
func (a *applicationAuditLog) DataChangeLogDetail(ctx context.Context, req *DataChangeLogDetailApplicationAuditLogReq, options ...larkcore.RequestOptionFunc) (*DataChangeLogDetailApplicationAuditLogResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_log_detail"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &DataChangeLogDetailApplicationAuditLogResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// DataChangeLogsList
//
// - 获取数据变更日志列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=data_change_logs_list&project=apaas&resource=application.audit_log&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/dataChangeLogsList_applicationAuditLog.go
func (a *applicationAuditLog) DataChangeLogsList(ctx context.Context, req *DataChangeLogsListApplicationAuditLogReq, options ...larkcore.RequestOptionFunc) (*DataChangeLogsListApplicationAuditLogResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/audit_log/data_change_logs_list"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &DataChangeLogsListApplicationAuditLogResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// - 获取审计日志详情
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=apaas&resource=application.audit_log&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/get_applicationAuditLog.go
func (a *applicationAuditLog) Get(ctx context.Context, req *GetApplicationAuditLogReq, options ...larkcore.RequestOptionFunc) (*GetApplicationAuditLogResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/audit_log"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetApplicationAuditLogResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// - 查询环境变量详情
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=apaas&resource=application.environment_variable&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/get_applicationEnvironmentVariable.go
func (a *applicationEnvironmentVariable) Get(ctx context.Context, req *GetApplicationEnvironmentVariableReq, options ...larkcore.RequestOptionFunc) (*GetApplicationEnvironmentVariableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/environment_variables/:environment_variable_api_name"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetApplicationEnvironmentVariableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 查询环境变量列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=apaas&resource=application.environment_variable&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/query_applicationEnvironmentVariable.go
func (a *applicationEnvironmentVariable) Query(ctx context.Context, req *QueryApplicationEnvironmentVariableReq, options ...larkcore.RequestOptionFunc) (*QueryApplicationEnvironmentVariableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/environment_variables/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryApplicationEnvironmentVariableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Execute
//
// - 流程执行接口
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=execute&project=apaas&resource=application.flow&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/execute_applicationFlow.go
func (a *applicationFlow) Execute(ctx context.Context, req *ExecuteApplicationFlowReq, options ...larkcore.RequestOptionFunc) (*ExecuteApplicationFlowResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/flows/:flow_id/execute"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ExecuteApplicationFlowResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Invoke
//
// - 执行函数
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=invoke&project=apaas&resource=application.function&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/invoke_applicationFunction.go
func (a *applicationFunction) Invoke(ctx context.Context, req *InvokeApplicationFunctionReq, options ...larkcore.RequestOptionFunc) (*InvokeApplicationFunctionResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/functions/:function_api_name/invoke"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &InvokeApplicationFunctionResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// OqlQuery
//
// - 执行 OQL
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=oql_query&project=apaas&resource=application.object&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/oqlQuery_applicationObject.go
func (a *applicationObject) OqlQuery(ctx context.Context, req *OqlQueryApplicationObjectReq, options ...larkcore.RequestOptionFunc) (*OqlQueryApplicationObjectResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/oql_query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &OqlQueryApplicationObjectResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Search
//
// - 搜索记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=search&project=apaas&resource=application.object&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/search_applicationObject.go
func (a *applicationObject) Search(ctx context.Context, req *SearchApplicationObjectReq, options ...larkcore.RequestOptionFunc) (*SearchApplicationObjectResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/search"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &SearchApplicationObjectResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchCreate
//
// - 记录批量创建
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchCreate_applicationObjectRecord.go
func (a *applicationObjectRecord) BatchCreate(ctx context.Context, req *BatchCreateApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*BatchCreateApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchCreateApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchDelete
//
// - 记录批量删除
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_delete&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchDelete_applicationObjectRecord.go
func (a *applicationObjectRecord) BatchDelete(ctx context.Context, req *BatchDeleteApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*BatchDeleteApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_delete"
	apiReq.HttpMethod = http.MethodDelete
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchDeleteApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchQuery
//
// - 批量查询对象记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_query&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchQuery_applicationObjectRecord.go
func (a *applicationObjectRecord) BatchQuery(ctx context.Context, req *BatchQueryApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*BatchQueryApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchQueryApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchUpdate
//
// - 记录批量更新
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_update&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchUpdate_applicationObjectRecord.go
func (a *applicationObjectRecord) BatchUpdate(ctx context.Context, req *BatchUpdateApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*BatchUpdateApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_update"
	apiReq.HttpMethod = http.MethodPatch
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchUpdateApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Create
//
// - 创建记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/create_applicationObjectRecord.go
func (a *applicationObjectRecord) Create(ctx context.Context, req *CreateApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*CreateApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CreateApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Delete
//
// - 删除记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/delete_applicationObjectRecord.go
func (a *applicationObjectRecord) Delete(ctx context.Context, req *DeleteApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*DeleteApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id"
	apiReq.HttpMethod = http.MethodDelete
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &DeleteApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Patch
//
// - 更新记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=patch&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/patch_applicationObjectRecord.go
func (a *applicationObjectRecord) Patch(ctx context.Context, req *PatchApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*PatchApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id"
	apiReq.HttpMethod = http.MethodPatch
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &PatchApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=apaas&resource=application.object.record&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/query_applicationObjectRecord.go
func (a *applicationObjectRecord) Query(ctx context.Context, req *QueryApplicationObjectRecordReq, options ...larkcore.RequestOptionFunc) (*QueryApplicationObjectRecordResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/:id/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryApplicationObjectRecordResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchCreateAuthorization
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create_authorization&project=apaas&resource=application.record_permission.member&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchCreateAuthorization_applicationRecordPermissionMember.go
func (a *applicationRecordPermissionMember) BatchCreateAuthorization(ctx context.Context, req *BatchCreateAuthorizationApplicationRecordPermissionMemberReq, options ...larkcore.RequestOptionFunc) (*BatchCreateAuthorizationApplicationRecordPermissionMemberResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_create_authorization"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchCreateAuthorizationApplicationRecordPermissionMemberResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchRemoveAuthorization
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove_authorization&project=apaas&resource=application.record_permission.member&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchRemoveAuthorization_applicationRecordPermissionMember.go
func (a *applicationRecordPermissionMember) BatchRemoveAuthorization(ctx context.Context, req *BatchRemoveAuthorizationApplicationRecordPermissionMemberReq, options ...larkcore.RequestOptionFunc) (*BatchRemoveAuthorizationApplicationRecordPermissionMemberResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/record_permissions/:record_permission_api_name/member/batch_remove_authorization"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchRemoveAuthorizationApplicationRecordPermissionMemberResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchCreateAuthorization
//
// - 批量添加角色成员用户和部门
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_create_authorization&project=apaas&resource=application.role.member&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchCreateAuthorization_applicationRoleMember.go
func (a *applicationRoleMember) BatchCreateAuthorization(ctx context.Context, req *BatchCreateAuthorizationApplicationRoleMemberReq, options ...larkcore.RequestOptionFunc) (*BatchCreateAuthorizationApplicationRoleMemberResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_create_authorization"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchCreateAuthorizationApplicationRoleMemberResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// BatchRemoveAuthorization
//
// - 批量删除角色成员用户和部门
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=batch_remove_authorization&project=apaas&resource=application.role.member&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/batchRemoveAuthorization_applicationRoleMember.go
func (a *applicationRoleMember) BatchRemoveAuthorization(ctx context.Context, req *BatchRemoveAuthorizationApplicationRoleMemberReq, options ...larkcore.RequestOptionFunc) (*BatchRemoveAuthorizationApplicationRoleMemberResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member/batch_remove_authorization"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &BatchRemoveAuthorizationApplicationRoleMemberResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=apaas&resource=application.role.member&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/get_applicationRoleMember.go
func (a *applicationRoleMember) Get(ctx context.Context, req *GetApplicationRoleMemberReq, options ...larkcore.RequestOptionFunc) (*GetApplicationRoleMemberResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/applications/:namespace/roles/:role_api_name/member"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetApplicationRoleMemberResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Cancel
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=cancel&project=apaas&resource=approval_instance&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/cancel_approvalInstance.go
func (a *approvalInstance) Cancel(ctx context.Context, req *CancelApprovalInstanceReq, options ...larkcore.RequestOptionFunc) (*CancelApprovalInstanceResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/approval_instances/:approval_instance_id/cancel"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CancelApprovalInstanceResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// AddAssignee
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=add_assignee&project=apaas&resource=approval_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/addAssignee_approvalTask.go
func (a *approvalTask) AddAssignee(ctx context.Context, req *AddAssigneeApprovalTaskReq, options ...larkcore.RequestOptionFunc) (*AddAssigneeApprovalTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/approval_tasks/:approval_task_id/add_assignee"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &AddAssigneeApprovalTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Agree
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=agree&project=apaas&resource=approval_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/agree_approvalTask.go
func (a *approvalTask) Agree(ctx context.Context, req *AgreeApprovalTaskReq, options ...larkcore.RequestOptionFunc) (*AgreeApprovalTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/approval_tasks/:approval_task_id/agree"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &AgreeApprovalTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Reject
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=reject&project=apaas&resource=approval_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/reject_approvalTask.go
func (a *approvalTask) Reject(ctx context.Context, req *RejectApprovalTaskReq, options ...larkcore.RequestOptionFunc) (*RejectApprovalTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/approval_tasks/:approval_task_id/reject"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RejectApprovalTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Transfer
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=transfer&project=apaas&resource=approval_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/transfer_approvalTask.go
func (a *approvalTask) Transfer(ctx context.Context, req *TransferApprovalTaskReq, options ...larkcore.RequestOptionFunc) (*TransferApprovalTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/approval_tasks/:approval_task_id/transfer"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &TransferApprovalTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=seat_activity&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/list_seatActivity.go
func (s *seatActivity) List(ctx context.Context, req *ListSeatActivityReq, options ...larkcore.RequestOptionFunc) (*ListSeatActivityResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/seat_activities"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, s.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListSeatActivityResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, s.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (s *seatActivity) ListByIterator(ctx context.Context, req *ListSeatActivityReq, options ...larkcore.RequestOptionFunc) (*ListSeatActivityIterator, error) {
	return &ListSeatActivityIterator{
		ctx:      ctx,
		req:      req,
		listFunc: s.List,
		options:  options,
		limit:    req.Limit}, nil
}

// List
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=seat_assignment&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/list_seatAssignment.go
func (s *seatAssignment) List(ctx context.Context, req *ListSeatAssignmentReq, options ...larkcore.RequestOptionFunc) (*ListSeatAssignmentResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/seat_assignments"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, s.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListSeatAssignmentResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, s.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (s *seatAssignment) ListByIterator(ctx context.Context, req *ListSeatAssignmentReq, options ...larkcore.RequestOptionFunc) (*ListSeatAssignmentIterator, error) {
	return &ListSeatAssignmentIterator{
		ctx:      ctx,
		req:      req,
		listFunc: s.List,
		options:  options,
		limit:    req.Limit}, nil
}

// Cc
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=cc&project=apaas&resource=user_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/cc_userTask.go
func (u *userTask) Cc(ctx context.Context, req *CcUserTaskReq, options ...larkcore.RequestOptionFunc) (*CcUserTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/user_tasks/:task_id/cc"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CcUserTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// ChatGroup
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=chat_group&project=apaas&resource=user_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/chatGroup_userTask.go
func (u *userTask) ChatGroup(ctx context.Context, req *ChatGroupUserTaskReq, options ...larkcore.RequestOptionFunc) (*ChatGroupUserTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/user_tasks/:task_id/chat_group"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ChatGroupUserTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Expediting
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=expediting&project=apaas&resource=user_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/expediting_userTask.go
func (u *userTask) Expediting(ctx context.Context, req *ExpeditingUserTaskReq, options ...larkcore.RequestOptionFunc) (*ExpeditingUserTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/user_tasks/:task_id/expediting"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ExpeditingUserTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取任务列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=apaas&resource=user_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/query_userTask.go
func (u *userTask) Query(ctx context.Context, req *QueryUserTaskReq, options ...larkcore.RequestOptionFunc) (*QueryUserTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/user_task/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryUserTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Rollback
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=rollback&project=apaas&resource=user_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/rollback_userTask.go
func (u *userTask) Rollback(ctx context.Context, req *RollbackUserTaskReq, options ...larkcore.RequestOptionFunc) (*RollbackUserTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/user_tasks/:task_id/rollback"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RollbackUserTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// RollbackPoints
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=rollback_points&project=apaas&resource=user_task&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/rollbackPoints_userTask.go
func (u *userTask) RollbackPoints(ctx context.Context, req *RollbackPointsUserTaskReq, options ...larkcore.RequestOptionFunc) (*RollbackPointsUserTaskResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/user_tasks/:task_id/rollback_points"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RollbackPointsUserTaskResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// SqlCommands
//
// - 执行 SQL
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=sql_commands&project=apaas&resource=workspace&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/sqlCommands_workspace.go
func (w *workspace) SqlCommands(ctx context.Context, req *SqlCommandsWorkspaceReq, options ...larkcore.RequestOptionFunc) (*SqlCommandsWorkspaceResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/sql_commands"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &SqlCommandsWorkspaceResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// EnumGet
//
// - 获取自定义枚举详细信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=enum_get&project=apaas&resource=workspace.enum&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/enumGet_workspaceEnum.go
func (w *workspaceEnum) EnumGet(ctx context.Context, req *EnumGetWorkspaceEnumReq, options ...larkcore.RequestOptionFunc) (*EnumGetWorkspaceEnumResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/enums/:enum_name"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &EnumGetWorkspaceEnumResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// - 获取工作空间下的自定义枚举列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=workspace.enum&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/list_workspaceEnum.go
func (w *workspaceEnum) List(ctx context.Context, req *ListWorkspaceEnumReq, options ...larkcore.RequestOptionFunc) (*ListWorkspaceEnumResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/enums"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListWorkspaceEnumResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// - 获取工作空间下的数据表列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/list_workspaceTable.go
func (w *workspaceTable) List(ctx context.Context, req *ListWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*ListWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// RecordsBatchUpdate
//
// - 批量更新数据表中的记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_batch_update&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/recordsBatchUpdate_workspaceTable.go
func (w *workspaceTable) RecordsBatchUpdate(ctx context.Context, req *RecordsBatchUpdateWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*RecordsBatchUpdateWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records_batch_update"
	apiReq.HttpMethod = http.MethodPatch
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RecordsBatchUpdateWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// RecordsDelete
//
// - 删除数据表中的记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_delete&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/recordsDelete_workspaceTable.go
func (w *workspaceTable) RecordsDelete(ctx context.Context, req *RecordsDeleteWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*RecordsDeleteWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records"
	apiReq.HttpMethod = http.MethodDelete
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RecordsDeleteWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// RecordsGet
//
// - 查询数据表数据记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_get&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/recordsGet_workspaceTable.go
func (w *workspaceTable) RecordsGet(ctx context.Context, req *RecordsGetWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*RecordsGetWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RecordsGetWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// RecordsPatch
//
// - 按条件更新数据表中的记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_patch&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/recordsPatch_workspaceTable.go
func (w *workspaceTable) RecordsPatch(ctx context.Context, req *RecordsPatchWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*RecordsPatchWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records"
	apiReq.HttpMethod = http.MethodPatch
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RecordsPatchWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// RecordsPost
//
// - 向数据表中添加或更新记录
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=records_post&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/recordsPost_workspaceTable.go
func (w *workspaceTable) RecordsPost(ctx context.Context, req *RecordsPostWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*RecordsPostWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name/records"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &RecordsPostWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// TableGet
//
// - 获取数据表详细信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=table_get&project=apaas&resource=workspace.table&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/tableGet_workspaceTable.go
func (w *workspaceTable) TableGet(ctx context.Context, req *TableGetWorkspaceTableReq, options ...larkcore.RequestOptionFunc) (*TableGetWorkspaceTableResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/tables/:table_name"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &TableGetWorkspaceTableResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// ViewsGet
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=views_get&project=apaas&resource=workspace.view&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/apaasv1/viewsGet_workspaceView.go
func (w *workspaceView) ViewsGet(ctx context.Context, req *ViewsGetWorkspaceViewReq, options ...larkcore.RequestOptionFunc) (*ViewsGetWorkspaceViewResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/apaas/v1/workspaces/:workspace_id/views/:view_name/records"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser}
	apiResp, err := larkcore.Request(ctx, apiReq, w.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ViewsGetWorkspaceViewResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, w.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
