package request

import (
	"topsdk/util"
)

type TmallExchangeConsigngoodsRequest struct {
	/*
	   换货单号ID     */
	DisputeId *int64 `json:"dispute_id" required:"true" `
	/*
	   卖家发货的物流单号     */
	LogisticsNo *string `json:"logistics_no" required:"true" `
	/*
	   卖家发货的物流类型，100表示平邮，200表示快递     */
	LogisticsType *int64 `json:"logistics_type" required:"true" `
	/*
	   卖家发货的快递公司     */
	LogisticsCompanyName *string `json:"logistics_company_name" required:"true" `
	/*
	   返回字段     */
	Fields *[]string `json:"fields" required:"true" `
}

func (s *TmallExchangeConsigngoodsRequest) SetDisputeId(v int64) *TmallExchangeConsigngoodsRequest {
	s.DisputeId = &v
	return s
}
func (s *TmallExchangeConsigngoodsRequest) SetLogisticsNo(v string) *TmallExchangeConsigngoodsRequest {
	s.LogisticsNo = &v
	return s
}
func (s *TmallExchangeConsigngoodsRequest) SetLogisticsType(v int64) *TmallExchangeConsigngoodsRequest {
	s.LogisticsType = &v
	return s
}
func (s *TmallExchangeConsigngoodsRequest) SetLogisticsCompanyName(v string) *TmallExchangeConsigngoodsRequest {
	s.LogisticsCompanyName = &v
	return s
}
func (s *TmallExchangeConsigngoodsRequest) SetFields(v []string) *TmallExchangeConsigngoodsRequest {
	s.Fields = &v
	return s
}

func (req *TmallExchangeConsigngoodsRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.DisputeId != nil {
		paramMap["dispute_id"] = *req.DisputeId
	}
	if req.LogisticsNo != nil {
		paramMap["logistics_no"] = *req.LogisticsNo
	}
	if req.LogisticsType != nil {
		paramMap["logistics_type"] = *req.LogisticsType
	}
	if req.LogisticsCompanyName != nil {
		paramMap["logistics_company_name"] = *req.LogisticsCompanyName
	}
	if req.Fields != nil {
		paramMap["fields"] = util.ConvertBasicList(*req.Fields)
	}
	return paramMap
}

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