package request

type TaobaoSellercatsListAddRequest struct {
	/*
	   卖家自定义类目名称。不超过20个字符     */
	Name *string `json:"name" required:"true" `
	/*
	   链接图片URL地址。(绝对地址，格式：http://host/image_path)     */
	PictUrl *string `json:"pict_url,omitempty" required:"false" `
	/*
	   父类目编号，如果类目为店铺下的一级类目：值等于0，如果类目为子类目，调用获取taobao.sellercats.list.get父类目编号     */
	ParentCid *int64 `json:"parent_cid,omitempty" required:"false" `
	/*
	   该类目在页面上的排序位置,取值范围:大于零的整数     */
	SortOrder *int64 `json:"sort_order,omitempty" required:"false" `
}

func (s *TaobaoSellercatsListAddRequest) SetName(v string) *TaobaoSellercatsListAddRequest {
	s.Name = &v
	return s
}
func (s *TaobaoSellercatsListAddRequest) SetPictUrl(v string) *TaobaoSellercatsListAddRequest {
	s.PictUrl = &v
	return s
}
func (s *TaobaoSellercatsListAddRequest) SetParentCid(v int64) *TaobaoSellercatsListAddRequest {
	s.ParentCid = &v
	return s
}
func (s *TaobaoSellercatsListAddRequest) SetSortOrder(v int64) *TaobaoSellercatsListAddRequest {
	s.SortOrder = &v
	return s
}

func (req *TaobaoSellercatsListAddRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.Name != nil {
		paramMap["name"] = *req.Name
	}
	if req.PictUrl != nil {
		paramMap["pict_url"] = *req.PictUrl
	}
	if req.ParentCid != nil {
		paramMap["parent_cid"] = *req.ParentCid
	}
	if req.SortOrder != nil {
		paramMap["sort_order"] = *req.SortOrder
	}
	return paramMap
}

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