package param_v1_0

import (
	"gd_management_gateway/params/param_base"
	"gd_management_gateway/rpc_apis/gd_management"
)

// 添加数据api
type ManagementDataApiAddApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiAddApiReq `json:"body"  require:"true" in:"body"`
}

type ManagementDataApiAddApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiAddApiReply `json:"data"`
}

// 删除数据api
type ManagementDataApiDeleteApiReq struct {
	param_base.BasicParam
	DataApiId int64 `json:"data_api_id" description:"数据api id" require:"true" in:"query"`
}

type ManagementDataApiDeleteApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiDeleteApiReply `json:"data"`
}

// 修改数据api
type ManagementDataApiModifyApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiModifyApiReq `json:"body"  require:"true" in:"body"`
}
type ManagementDataApiModifyApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiModifyApiReply `json:"data"`
}

// 获取数据api列表
type ManagementDataApiGetAllReq struct {
	param_base.BasicParam
	PageSize    int64  `json:"page_size" description:"页大小" require:"false" in:"query"`
	PageNumber  int64  `json:"page_number" description:"页号" require:"false" in:"query"`
	Search      string `json:"search" require:"false" in:"query"`
	IsAll       bool   `json:"is_all" description:"是否全量返回" require:"false" in:"query"`
	DataApiType string `json:"data_api_type" require:"false" in:"query"`
	MerchantId  int64  `json:"merchant_id" in:"query"`
}

type ManagementDataApiGetAllResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiGetAllReply `json:"data"`
}

// 获取数据api详情
type ManagementDataApiGetApiInfoReq struct {
	param_base.BasicParam
	DataApiId int64 `json:"data_api_id" description:"数据api id" require:"true" in:"query"`
}
type ManagementDataApiGetApiInfoResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiGetApiInfoReply `json:"data"`
}

type DataApiReleaseBody struct {
	Status int `json:"status"`
}

// 发布数据api
type ManagementDataApiReleaseApiReq struct {
	param_base.BasicParam
	DataApiId int64              `json:"data_api_id" description:"数据api id" require:"true" in:"path"`
	Data      DataApiReleaseBody `json:"data" in:"body"`
}

type ManagementDataApiReleaseApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiReleaseApiReply `json:"data" `
}

// 添加数据api查询方式
type ManagementDataApiAddQueryTypeReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiAddQueryTypeReq `json:"body"  require:"true" in:"body"`
}
type ManagementDataApiAddQueryTypeResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiAddQueryTypeReply `json:"data" `
}

// 修改数据api查询方式
type ManagementDataApiModifyQueryTypeReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiModifyQueryTypeReq `json:"body" require:"true" in:"body"`
}
type ManagementDataApiModifyQueryTypeResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiModifyQueryTypeReply `json:"data"`
}

// 删除数据api查询方式
type ManagementDataApiRemoveQueryTypeReq struct {
	param_base.BasicParam
	QueryTypeId int64 `json:"query_type_id" description:"数据api查询方式id" require:"true" in:"query"`
}
type ManagementDataApiRemoveQueryTypeResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiRemoveQueryTypeReply `json:"data"`
}

// 获取数据api查询方式
type ManagementDataApiGetQueryTypeReq struct {
	param_base.BasicParam
	QueryTypeId int64 `json:"query_type_id" description:"数据api查询方式id" require:"true" in:"query"`
}
type ManagementDataApiGetQueryTypeResp struct {
	param_base.SimpleResp
	Data gd_management.QueryType `json:"data" description:"返回数据"`
	//Data gd_management.ManagementDataApiGetQueryTypeReply `json:"data"`
}

// 数据api添加基础api
type ManagementDataApiAddBaseApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiAddBaseApiReq `json:"body" require:"true" in:"body"`
}
type ManagementDataApiAddBaseApiResp struct {
	param_base.SimpleResp
	//Data gd_management.ManagementDataApiAddBaseApiReply `json:"data"`
}

// 数据api删除基础api
type ManagementDataApiRemoveBaseApiReq struct {
	param_base.BasicParam
	DataApiBaseApiId int64 `json:"data_api_base_api_id" description:"数据api中基础api id" require:"true" in:"query"`
}
type ManagementDataApiRemoveBaseApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiRemoveBaseApiReply `json:"data"`
}

// 数据api修改基础api信息
type ManagementDataApiModifyBaseApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiModifyBaseApiReq `json:"body"  require:"true" in:"body"`
}
type ManagementDataApiModifyBaseApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiModifyBaseApiReply `json:"data"`
}

// 数据api获取基础api
type ManagementDataApiGetBaseApiReq struct {
	param_base.BasicParam
	DataApiBaseApiId int64 `json:"data_api_base_api_id" description:"数据api中基础api id" require:"false" in:"query"`
	//DataApiQueryTypeId int64 `json:"data_api_query_type_id" description:"数据api查询方式api" require:"false" in:"query"`
}

type ManagementDataApiGetBaseApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiBaseApi `json:"data"`
	//Data gd_management.ManagementDataApiGetBaseApiReply `json:"data"`
}

// 数据api添加数据套餐
type ManagementDataApiAddDataComboReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiAddDataComboReq `json:"body"  require:"true" in:"body"`
}
type ManagementDataApiAddDataComboResp struct {
	param_base.SimpleResp
	//Data gd_management.ManagementDataApiAddDataComboReply `json:"data"`
}

// 数据api删除数据套餐
type ManagementDataApiRemoveDataComboReq struct {
	param_base.BasicParam
	ComboId     int64 `json:"combo_id" description:"数据套餐id" require:"true" in:"query"`
	QueryTypeId int64 `json:"query_type_id" description:"数据id" require:"true" in:"query"`
}
type ManagementDataApiRemoveDataComboResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiRemoveDataComboReply `json:"data"`
}

// 数据api选择三方数据源接口
/*type ManagementDataApiChooseProviderApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiChooseProviderApiReq `json:"body" require:"true" in:"body"`
}

type ManagementDataApiChooseProviderApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiChooseProviderApiReply `json:"data"`
}
*/
// 数据api中 api序号调整
/*type ManagementDataApiChangeBaseApiIndexReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiChangeBaseApiIndexReq `json:"body"  require:"true" in:"body"`
}

type ManagementDataApiChangeBaseApiIndexResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiChangeBaseApiIndexReply `json:"data"`
}
*/
type ManagementDataApiSetFreeDataComboReq struct {
	param_base.BasicParam
	Body gd_management.ManagementDataApiSetFreeDataComboReq `json:"body"  require:"true" in:"body"`
}

type ManagementDataApiSetFreeDataComboResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiSetFreeDataComboReply `json:"data"`
}

type ManagementDataApiGetQueryTypeListReq struct {
	param_base.BasicParam
	DataApiId int64 `json:"data_api_id"  require:"true" in:"query"`
}

type ManagementDataApiGetQueryTypeListResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiGetQueryTypeListReply `json:"data"`
}

type ManagementQueryTypeBaseApiListReq struct {
	param_base.BasicParam
	QueryTypeId int64 `json:"query_type_id"  require:"true" in:"query"`
}

type ManagementQueryTypeBaseApiListResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementQueryTypeBaseApiListReply `json:"data"`
}

type ManagementDataApiComboListReq struct {
	param_base.BasicParam
	QueryTypeId int64 `json:"query_type_id"  require:"true" in:"query"`
}

type ManagementDataApiComboListResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDataApiComboListReply `json:"data"`
}
