package param_v1_0

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

type ManagementAddProviderPlatformReq struct {
	param_base.BasicParam
	Body gd_management.ManagementAddProviderPlatformReq `json:"body" require:"true" in:"body"`
}

type ManagementAddProviderPlatformResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementAddProviderPlatformReply `json:"data"`
}
type ManagementDelProviderPlatformReq struct {
	param_base.BasicParam
	ProviderId int64 `json:"provider_id" description:"三方平台id" require:"true" in:"query"`
}
type ManagementDelProviderPlatformResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDelProviderPlatformReply `json:"data"`
}
type ManagementUpdateProviderPlatformReq struct {
	param_base.BasicParam
	Body gd_management.ManagementUpdateProviderPlatformReq `json:"body"  require:"true" in:"body"`
}

type ManagementUpdateProviderPlatformResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementUpdateProviderPlatformReply `json:"data"`
}

type ManagementGetProviderPlatformListReq struct {
	param_base.BasicParam
	PageSize      int    `json:"page_size" description:"page大小" require:"false" in:"query"`
	PageNumber    int    `json:"page_number" description:"" require:"false" in:"query"`
	Search        string `json:"search"  require:"false" in:"query"`
	IsAll         bool   `json:"is_all"  require:"false" in:"query"`
	ProviderApiId int64  `json:"provider_api_id" in:"query"`
}

type ManagementGetProviderPlatformListResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementGetProviderPlatformListReply `json:"data"`
}

type ManagementAddProviderApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementAddProviderApiReq `json:"body" require:"true" in:"body"`
}

type ManagementAddProviderApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementAddProviderApiReply `json:"data"`
}
type ManagementDelProviderApiReq struct {
	param_base.BasicParam
	ProviderApiId int64 `json:"provider_api_id" description:"三方平台api id" require:"true" in:"query"`
}
type ManagementDelProviderApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementDelProviderApiReply `json:"data"`
}
type ManagementUpdateProviderApiReq struct {
	param_base.BasicParam
	Body gd_management.ManagementUpdateProviderApiReq `json:"body"  require:"true" in:"body"`
}

type ManagementUpdateProviderApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementUpdateProviderApiReply `json:"data"`
}

type ManagementGetProviderApiListReq struct {
	param_base.BasicParam
	PageSize   int   `json:"page_size" description:"页大小" require:"false" in:"query"`
	PageNumber int   `json:"page_number" description:"页数" require:"false" in:"query"`
	ProviderId int64 `json:"provider_id" description:"平台id" in:"query"`
	IsAll      bool  `json:"is_all" in:"query" require:"false"`
}
type ManagementGetProviderApiListResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementGetProviderApiListReply `json:"data"`
}

type ManagementGetAllProviderApiReq struct {
	param_base.BasicParam
	ProviderId int64 `json:"provider_id" in:"query"`
}
type ManagementGetAllProviderApiResp struct {
	param_base.SimpleResp
	Data gd_management.ManagementGetAllProviderApiReply `json:"data"`
}

type ManagementTryProviderApiBody struct {
}

type ManagementTryProviderApiReq struct {
	param_base.BasicParam
	ApiName          string `json:"api_name" description:"api_name"  require:"true" in:"formData"`
	ProviderApiId    int    `json:"provider_api_id" description:"provider_api_id"  require:"true" in:"formData"`
	ThirdPartyHost   string `json:"thirdparty_host" description:"请求地址"  require:"true" in:"formData"`
	ThirdPartyRouter string `json:"thirdparty_router" description:"请求路由"  require:"true" in:"formData"`
	PlatformCode     string `json:"platform_code" description:"平台码"  require:"true" in:"formData"`
}

type ManagementTryProviderApiResp struct {
	param_base.SimpleResp
}

type TryApiTaskListReq struct {
	Type       int   `json:"type" description:"类型 1:接口查询 2:数据源查询" require:"true" in:"query"`
	PageSize   int64 `json:"page_size" description:"页大小" require:"false" in:"query"`
	PageNumber int64 `json:"page_number" description:"页号" require:"false" in:"query"`
}

type TryApiTaskListResp struct {
	param_base.SimpleResp
	Data gd_management.GetTryApiTaskListReply `json:"data"`
}

type ManagementSetProviderThresholdBody struct {
	ThresholdTimeout      int     `json:"threshold_timeout" in:"query" require:"false"`
	ThresholdFailRate     float64 `json:"threshold_fail_rate" in:"query" require:"false"`
	ThresholdNorecordRate float64 `json:"threshold_norecord_rate" in:"query" require:"false"`
	WarningEnable         bool    `json:"warning_enable" in:"query"`
}

type ManagementSetProviderThresholdReq struct {
	param_base.BasicParam
	ProviderApiId int64                              `json:"provider_api_id" in:"path" require:"true"`
	Body          ManagementSetProviderThresholdBody `json:"body" in:"body"`
}

type ManagementSetProviderThresholdResp struct {
	param_base.SimpleResp
}

type ManagementGetProviderMerchantApiListReq struct {
	param_base.BasicParam
	ProviderApiId int64 `json:"provider_api_id" in:"query"`
}

type ManagementGetProviderMerchantApiListResp struct {
	param_base.SimpleResp
	ProviderMerchantApiList []gd_management.ProviderMerchantApiItem `json:"provider_merchant_api_list"`
}

type GetProviderApiHystrixReq struct {
	param_base.BasicParam
	ProviderApiCode string `json:"provider_api_code" in:"query"`
}

type GetProviderApiHystrixResp struct {
	param_base.SimpleResp
	Data gd_management.GetProviderApiHystrixReply `json:"data"`
}

type UpdateProviderApiHystrixBody struct {
	gd_management.UpdateProviderApiHystrixReq
}

type UpdateProviderApiHystrixReq struct {
	param_base.BasicParam
	Body UpdateProviderApiHystrixBody `json:"body" in:"body"`
}

type UpdateProviderApiHystrixResp struct {
	param_base.SimpleResp
}
