package v1

type UdpForwardingDataSend struct {
	WafUdpId          int    `form:"waf_udp_id" json:"waf_udp_id"`
	Tag               string `form:"tag" json:"tag"`
	Port              int    `form:"port" json:"port" binding:"required"`
	WafGatewayGroupId int    `form:"waf_gateway_group_id" json:"waf_gateway_group_id"`
	WafUdpLimitId     int    `form:"waf_udp_limit_id" json:"waf_udp_limit_id"`
	CcPacketCount     int    `form:"cc_packet_count" json:"cc_packet_count" default:"0"`
	CcPacketDuration  string `form:"cc_packet_duration" json:"cc_packet_duration" default:"0s"`
	CcPacketBlockCount int    `form:"cc_packet_block_count" json:"cc_packet_block_count" default:"0"`
	CcPacketBlockDuration string `form:"cc_packet_block_duration" json:"cc_packet_block_duration" default:"0s"`
	CcCount           int    `form:"cc_count" json:"cc_count" default:"0"`
	CcDuration        string `form:"cc_duration" json:"cc_duration" default:"0s"`
	CcBlockCount      int    `form:"cc_block_count" json:"cc_block_count" default:"0"`
	CcBlockDuration   string `form:"cc_block_duration" json:"cc_block_duration" default:"0s"`
	SessionTimeout    string    `form:"session_timeout" json:"session_timeout" default:"60s"`
	BackendList       string `form:"backend_list" json:"backend_list"`
	AllowIpList       string `form:"allow_ip_list" json:"allow_ip_list"`
	DenyIpList        string `form:"deny_ip_list" json:"deny_ip_list"`
	AccessRule        string `form:"access_rule" json:"access_rule"`
	Comment           string `form:"comment" json:"comment"`
}


type UdpForwardingDataRequest struct {
	Id                int    `form:"id" json:"id"`
	WafUdpId          int    `form:"waf_udp_id" json:"waf_udp_id"`
	Tag               string `form:"tag" json:"tag"`
	Port              string    `form:"port" json:"port" binding:"required"`
	WafGatewayGroupId int    `form:"waf_gateway_group_id" json:"waf_gateway_group_id"`
	WafUdpLimitId     int    `form:"waf_udp_limit_id" json:"waf_udp_limit_id"`
	CcPacketCount     int    `form:"cc_packet_count" json:"cc_packet_count" default:"0"`
	CcPacketDuration  string `form:"cc_packet_duration" json:"cc_packet_duration" default:"0s"`
	CcPacketBlockCount int    `form:"cc_packet_block_count" json:"cc_packet_block_count" default:"0"`
	CcPacketBlockDuration string `form:"cc_packet_block_duration" json:"cc_packet_block_duration" default:"0s"`
	CcCount           int    `form:"cc_count" json:"cc_count" default:"0"`
	CcDuration        string `form:"cc_duration" json:"cc_duration" default:"0s"`
	CcBlockCount      int    `form:"cc_block_count" json:"cc_block_count" default:"0"`
	CcBlockDuration   string `form:"cc_block_duration" json:"cc_block_duration" default:"0s"`
	SessionTimeout    string    `form:"session_timeout" json:"session_timeout" default:"60s"`
	BackendList       []string `form:"backend_list" json:"backend_list"`
	AllowIpList       []string `form:"allow_ip_list" json:"allow_ip_list"`
	DenyIpList        []string `form:"deny_ip_list" json:"deny_ip_list"`
	AccessRule        string `form:"access_rule" json:"access_rule"`
	Comment           string `form:"comment" json:"comment"`
}

type DeleteUdpForwardingRequest struct {
	Ids   []int `form:"ids" json:"ids" binding:"required"`
}

type UdpForwardingRequest struct {
	HostId            int `form:"host_id" json:"host_id" binding:"required"`
	Uid               int `form:"uid" json:"uid" binding:"required"`
	UdpForwardingData UdpForwardingDataRequest `form:"data" json:"data"`
}

type UdpForwardingRequire struct {
	HostId            int    `form:"host_id" json:"host_id" binding:"required"`
	Uid               int    `form:"uid" json:"uid" binding:"required"`
	Comment           string `form:"comment" json:"comment" binding:"required"`
	WafGatewayGroupId int    `form:"waf_gateway_group_id" json:"waf_gateway_group_id"`
	WafUdpLimitRuleId int    `form:"waf_udp_limit_id" json:"waf_udp_limit_id"`
	Tag               string `form:"tag" json:"tag" binding:"required"`
}
