// Code generated by Lark OpenAPI.

package larkaily

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

type V1 struct {
	AilySession            *ailySession            // aily_session
	AilySessionAilyMessage *ailySessionAilyMessage // aily_session.aily_message
	AilySessionRun         *ailySessionRun         // aily_session.run
	AppDataAsset           *appDataAsset           // app.data_asset
	AppDataAssetTag        *appDataAssetTag        // app.data_asset_tag
	AppKnowledge           *appKnowledge           // app.knowledge
	AppSkill               *appSkill               // app.skill
}

func New(config *larkcore.Config) *V1 {
	return &V1{
		AilySession:            &ailySession{config: config},
		AilySessionAilyMessage: &ailySessionAilyMessage{config: config},
		AilySessionRun:         &ailySessionRun{config: config},
		AppDataAsset:           &appDataAsset{config: config},
		AppDataAssetTag:        &appDataAssetTag{config: config},
		AppKnowledge:           &appKnowledge{config: config},
		AppSkill:               &appSkill{config: config},
	}
}

type ailySession struct {
	config *larkcore.Config
}
type ailySessionAilyMessage struct {
	config *larkcore.Config
}
type ailySessionRun struct {
	config *larkcore.Config
}
type appDataAsset struct {
	config *larkcore.Config
}
type appDataAssetTag struct {
	config *larkcore.Config
}
type appKnowledge struct {
	config *larkcore.Config
}
type appSkill struct {
	config *larkcore.Config
}

// Create
//
// - 该 API 用于创建与某个飞书智能伙伴应用的一次会话（Session）。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=aily_session&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/create_ailySession.go
func (a *ailySession) Create(ctx context.Context, req *CreateAilySessionReq, options ...larkcore.RequestOptionFunc) (*CreateAilySessionResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CreateAilySessionResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Delete
//
// - 该 API 用于销毁与某个飞书智能伙伴应用的一次会话（Session），当会话销毁后、无法继续在会话中创建 / 拉取消息。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=aily&resource=aily_session&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/delete_ailySession.go
func (a *ailySession) Delete(ctx context.Context, req *DeleteAilySessionReq, options ...larkcore.RequestOptionFunc) (*DeleteAilySessionResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id"
	apiReq.HttpMethod = http.MethodDelete
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &DeleteAilySessionResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// - 该 API 用于获取与某个飞书智能伙伴应用的一次会话（Session）的详细信息，包括会话的状态、渠道信息、创建时间等。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=aily_session&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/get_ailySession.go
func (a *ailySession) Get(ctx context.Context, req *GetAilySessionReq, options ...larkcore.RequestOptionFunc) (*GetAilySessionResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetAilySessionResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Update
//
// - 该 API 用于更新与某个飞书智能伙伴应用的一次会话（Session）。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=update&project=aily&resource=aily_session&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/update_ailySession.go
func (a *ailySession) Update(ctx context.Context, req *UpdateAilySessionReq, options ...larkcore.RequestOptionFunc) (*UpdateAilySessionResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id"
	apiReq.HttpMethod = http.MethodPut
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &UpdateAilySessionResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Create
//
// - 该 API 用于向某个飞书智能伙伴应用发送一条消息（Message）。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=aily_session.aily_message&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/create_ailySessionAilyMessage.go
func (a *ailySessionAilyMessage) Create(ctx context.Context, req *CreateAilySessionAilyMessageReq, options ...larkcore.RequestOptionFunc) (*CreateAilySessionAilyMessageResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/messages"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CreateAilySessionAilyMessageResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// - 该 API 用于获取某个飞书智能伙伴应用的消息（Message）的详细信息；包括消息的内容、发送人等。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=aily_session.aily_message&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/get_ailySessionAilyMessage.go
func (a *ailySessionAilyMessage) Get(ctx context.Context, req *GetAilySessionAilyMessageReq, options ...larkcore.RequestOptionFunc) (*GetAilySessionAilyMessageResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/messages/:aily_message_id"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetAilySessionAilyMessageResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// - 该 API 用于批量获取飞书智能伙伴应用的消息（Message）的详细信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=aily_session.aily_message&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/list_ailySessionAilyMessage.go
func (a *ailySessionAilyMessage) List(ctx context.Context, req *ListAilySessionAilyMessageReq, options ...larkcore.RequestOptionFunc) (*ListAilySessionAilyMessageResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/messages"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListAilySessionAilyMessageResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *ailySessionAilyMessage) ListByIterator(ctx context.Context, req *ListAilySessionAilyMessageReq, options ...larkcore.RequestOptionFunc) (*ListAilySessionAilyMessageIterator, error) {
	return &ListAilySessionAilyMessageIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.List,
		options:  options,
		limit:    req.Limit}, nil
}

// Cancel
//
// - 该 API 用于取消指定的运行（Run）。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=cancel&project=aily&resource=aily_session.run&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/cancel_ailySessionRun.go
func (a *ailySessionRun) Cancel(ctx context.Context, req *CancelAilySessionRunReq, options ...larkcore.RequestOptionFunc) (*CancelAilySessionRunResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id/cancel"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CancelAilySessionRunResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Create
//
// - 该 API 用于启动一次运行（Run）。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=aily_session.run&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/create_ailySessionRun.go
func (a *ailySessionRun) Create(ctx context.Context, req *CreateAilySessionRunReq, options ...larkcore.RequestOptionFunc) (*CreateAilySessionRunResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/runs"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CreateAilySessionRunResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// - 该 API 用于获取运行（Run）的详细信息。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=aily_session.run&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/get_ailySessionRun.go
func (a *ailySessionRun) Get(ctx context.Context, req *GetAilySessionRunReq, options ...larkcore.RequestOptionFunc) (*GetAilySessionRunResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/runs/:run_id"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetAilySessionRunResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// - 该 API 用于批量获取运行（Run）的详细信息。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=aily_session.run&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/list_ailySessionRun.go
func (a *ailySessionRun) List(ctx context.Context, req *ListAilySessionRunReq, options ...larkcore.RequestOptionFunc) (*ListAilySessionRunResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/sessions/:aily_session_id/runs"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListAilySessionRunResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *ailySessionRun) ListByIterator(ctx context.Context, req *ListAilySessionRunReq, options ...larkcore.RequestOptionFunc) (*ListAilySessionRunIterator, error) {
	return &ListAilySessionRunIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.List,
		options:  options,
		limit:    req.Limit}, nil
}

// Create
//
// - 创建数据知识
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=create&project=aily&resource=app.data_asset&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/create_appDataAsset.go
func (a *appDataAsset) Create(ctx context.Context, req *CreateAppDataAssetReq, options ...larkcore.RequestOptionFunc) (*CreateAppDataAssetResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/data_assets"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &CreateAppDataAssetResp{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=aily&resource=app.data_asset&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/delete_appDataAsset.go
func (a *appDataAsset) Delete(ctx context.Context, req *DeleteAppDataAssetReq, options ...larkcore.RequestOptionFunc) (*DeleteAppDataAssetResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id"
	apiReq.HttpMethod = http.MethodDelete
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &DeleteAppDataAssetResp{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=aily&resource=app.data_asset&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/get_appDataAsset.go
func (a *appDataAsset) Get(ctx context.Context, req *GetAppDataAssetReq, options ...larkcore.RequestOptionFunc) (*GetAppDataAssetResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/data_assets/:data_asset_id"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetAppDataAssetResp{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=aily&resource=app.data_asset&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/list_appDataAsset.go
func (a *appDataAsset) List(ctx context.Context, req *ListAppDataAssetReq, options ...larkcore.RequestOptionFunc) (*ListAppDataAssetResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/data_assets"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListAppDataAssetResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *appDataAsset) ListByIterator(ctx context.Context, req *ListAppDataAssetReq, options ...larkcore.RequestOptionFunc) (*ListAppDataAssetIterator, error) {
	return &ListAppDataAssetIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.List,
		options:  options,
		limit:    req.Limit}, nil
}

// UploadFile
//
// - 上传数据知识文件
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=upload_file&project=aily&resource=app.data_asset&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/uploadFile_appDataAsset.go
func (a *appDataAsset) UploadFile(ctx context.Context, req *UploadFileAppDataAssetReq, options ...larkcore.RequestOptionFunc) (*UploadFileAppDataAssetResp, error) {
	options = append(options, larkcore.WithFileUpload())
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/data_assets/upload_file"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &UploadFileAppDataAssetResp{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=aily&resource=app.data_asset_tag&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/list_appDataAssetTag.go
func (a *appDataAssetTag) List(ctx context.Context, req *ListAppDataAssetTagReq, options ...larkcore.RequestOptionFunc) (*ListAppDataAssetTagResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/data_asset_tags"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListAppDataAssetTagResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *appDataAssetTag) ListByIterator(ctx context.Context, req *ListAppDataAssetTagReq, options ...larkcore.RequestOptionFunc) (*ListAppDataAssetTagIterator, error) {
	return &ListAppDataAssetTagIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.List,
		options:  options,
		limit:    req.Limit}, nil
}

// Ask
//
// - 执行一次数据知识问答
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=ask&project=aily&resource=app.knowledge&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/ask_appKnowledge.go
func (a *appKnowledge) Ask(ctx context.Context, req *AskAppKnowledgeReq, options ...larkcore.RequestOptionFunc) (*AskAppKnowledgeResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/knowledges/ask"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &AskAppKnowledgeResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Get
//
// - 该 API 用于获取某个飞书智能伙伴应用的技能（Skill）的详细信息。
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=get&project=aily&resource=app.skill&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/get_appSkill.go
func (a *appSkill) Get(ctx context.Context, req *GetAppSkillReq, options ...larkcore.RequestOptionFunc) (*GetAppSkillResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/skills/:skill_id"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &GetAppSkillResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// - 该 API 用于批量获取飞书智能伙伴应用的技能（Skill）的详细信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=aily&resource=app.skill&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/list_appSkill.go
func (a *appSkill) List(ctx context.Context, req *ListAppSkillReq, options ...larkcore.RequestOptionFunc) (*ListAppSkillResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/skills"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListAppSkillResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *appSkill) ListByIterator(ctx context.Context, req *ListAppSkillReq, options ...larkcore.RequestOptionFunc) (*ListAppSkillIterator, error) {
	return &ListAppSkillIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.List,
		options:  options,
		limit:    req.Limit}, nil
}

// Start
//
// - 该 API 用于执行飞书智能伙伴应用的技能（Skill）获取输出
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=start&project=aily&resource=app.skill&version=v1
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/ailyv1/start_appSkill.go
func (a *appSkill) Start(ctx context.Context, req *StartAppSkillReq, options ...larkcore.RequestOptionFunc) (*StartAppSkillResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/aily/v1/apps/:app_id/skills/:skill_id/start"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeUser, larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &StartAppSkillResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
