package request

import (
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability3156/domain"
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
)

type AlibabaTclsAelophyRefundFetchgoodsRequest struct {
	/*
	   经营店ID     */
	StoreId *string `json:"store_id" required:"true" `
	/*
	   外部订单ID     */
	OutOrderId *string `json:"out_order_id" required:"true" `
	/*
	   渠道退款单ID     */
	RefundId *string `json:"refund_id" required:"true" `
	/*
	   取货开始时间     */
	FetchStartTime *util.LocalTime `json:"fetch_start_time,omitempty" required:"false" `
	/*
	   取货结束时间     */
	FetchEndTime *util.LocalTime `json:"fetch_end_time,omitempty" required:"false" `
	/*
	   备注     */
	Remark *string `json:"remark,omitempty" required:"false" `
	/*
	   外部子订单列表     */
	SubRefundList *[]domain.AlibabaTclsAelophyRefundFetchgoodsSubrefundlist `json:"sub_refund_list" required:"true" `
	/*
	   渠道来源     */
	OrderFrom *int64 `json:"order_from,omitempty" required:"false" `
}

func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetStoreId(v string) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.StoreId = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetOutOrderId(v string) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.OutOrderId = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetRefundId(v string) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.RefundId = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetFetchStartTime(v util.LocalTime) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.FetchStartTime = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetFetchEndTime(v util.LocalTime) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.FetchEndTime = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetRemark(v string) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.Remark = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetSubRefundList(v []domain.AlibabaTclsAelophyRefundFetchgoodsSubrefundlist) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.SubRefundList = &v
	return s
}
func (s *AlibabaTclsAelophyRefundFetchgoodsRequest) SetOrderFrom(v int64) *AlibabaTclsAelophyRefundFetchgoodsRequest {
	s.OrderFrom = &v
	return s
}

func (req *AlibabaTclsAelophyRefundFetchgoodsRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.StoreId != nil {
		paramMap["store_id"] = *req.StoreId
	}
	if req.OutOrderId != nil {
		paramMap["out_order_id"] = *req.OutOrderId
	}
	if req.RefundId != nil {
		paramMap["refund_id"] = *req.RefundId
	}
	if req.FetchStartTime != nil {
		paramMap["fetch_start_time"] = *req.FetchStartTime
	}
	if req.FetchEndTime != nil {
		paramMap["fetch_end_time"] = *req.FetchEndTime
	}
	if req.Remark != nil {
		paramMap["remark"] = *req.Remark
	}
	if req.SubRefundList != nil {
		paramMap["sub_refund_list"] = util.ConvertStructList(*req.SubRefundList)
	}
	if req.OrderFrom != nil {
		paramMap["order_from"] = *req.OrderFrom
	}
	return paramMap
}

func (req *AlibabaTclsAelophyRefundFetchgoodsRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
