package request

import (
	"topsdk/util"
)

type AlibabaWdkMarketingPriceRequest struct {
	/*
	   单页大小     */
	PageSize *int64 `json:"page_size" required:"true" `
	/*
	   页码     */
	PageIndex *int64 `json:"page_index" required:"true" `
	/*
	   商品sku     */
	SkuCodes *[]string `json:"sku_codes,omitempty" required:"false" `
	/*
	   门店标识数组     */
	ShopIds *[]int64 `json:"shop_ids,omitempty" required:"false" `
	/*
	   查询结束时间(sku_codes非空无效)     */
	EndTime *util.LocalTime `json:"end_time,omitempty" required:"false" `
	/*
	   查询开始时间(sku_codes非空无效)     */
	BeginTime *util.LocalTime `json:"begin_time,omitempty" required:"false" `
}

func (s *AlibabaWdkMarketingPriceRequest) SetPageSize(v int64) *AlibabaWdkMarketingPriceRequest {
	s.PageSize = &v
	return s
}
func (s *AlibabaWdkMarketingPriceRequest) SetPageIndex(v int64) *AlibabaWdkMarketingPriceRequest {
	s.PageIndex = &v
	return s
}
func (s *AlibabaWdkMarketingPriceRequest) SetSkuCodes(v []string) *AlibabaWdkMarketingPriceRequest {
	s.SkuCodes = &v
	return s
}
func (s *AlibabaWdkMarketingPriceRequest) SetShopIds(v []int64) *AlibabaWdkMarketingPriceRequest {
	s.ShopIds = &v
	return s
}
func (s *AlibabaWdkMarketingPriceRequest) SetEndTime(v util.LocalTime) *AlibabaWdkMarketingPriceRequest {
	s.EndTime = &v
	return s
}
func (s *AlibabaWdkMarketingPriceRequest) SetBeginTime(v util.LocalTime) *AlibabaWdkMarketingPriceRequest {
	s.BeginTime = &v
	return s
}

func (req *AlibabaWdkMarketingPriceRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.PageSize != nil {
		paramMap["page_size"] = *req.PageSize
	}
	if req.PageIndex != nil {
		paramMap["page_index"] = *req.PageIndex
	}
	if req.SkuCodes != nil {
		paramMap["sku_codes"] = util.ConvertBasicList(*req.SkuCodes)
	}
	if req.ShopIds != nil {
		paramMap["shop_ids"] = util.ConvertBasicList(*req.ShopIds)
	}
	if req.EndTime != nil {
		paramMap["end_time"] = *req.EndTime
	}
	if req.BeginTime != nil {
		paramMap["begin_time"] = *req.BeginTime
	}
	return paramMap
}

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