package request

import (
	"topsdk/ability180/domain"
	"topsdk/util"
)

type TaobaoItemOriginAsyncRequest struct {
	/*
	   淘宝商品ID     */
	ItemId *int64 `json:"item_id" required:"true" `
	/*
	   上游商品信息     */
	SourceItemInfo *domain.TaobaoItemOriginAsyncSourceItemInfoDTO `json:"source_item_info" required:"true" `
}

func (s *TaobaoItemOriginAsyncRequest) SetItemId(v int64) *TaobaoItemOriginAsyncRequest {
	s.ItemId = &v
	return s
}
func (s *TaobaoItemOriginAsyncRequest) SetSourceItemInfo(v domain.TaobaoItemOriginAsyncSourceItemInfoDTO) *TaobaoItemOriginAsyncRequest {
	s.SourceItemInfo = &v
	return s
}

func (req *TaobaoItemOriginAsyncRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.ItemId != nil {
		paramMap["item_id"] = *req.ItemId
	}
	if req.SourceItemInfo != nil {
		paramMap["source_item_info"] = util.ConvertStruct(*req.SourceItemInfo)
	}
	return paramMap
}

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