package request

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

type TmallItemOriginAsyncRequest struct {
	/*
	   天猫商品ID     */
	ItemId *int64 `json:"item_id" required:"true" `
	/*
	   上游商品信息     */
	SourceItemInfo *domain.TmallItemOriginAsyncSourceItemInfoDTO `json:"source_item_info" required:"true" `
}

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

func (req *TmallItemOriginAsyncRequest) 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 *TmallItemOriginAsyncRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
