package request

import (
	"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/util"
)

type AlibabaWdkopenCateorderPullRequest struct {
	/*
	   经营店ID     */
	StoreId *string `json:"store_id" required:"true" `
	/*
	   主站主订单ID     */
	OutOrderId *string `json:"out_order_id" required:"true" `
	/*
	   主站子订单ID列表, 为空则表示回传整单状态     */
	SubOutOrderIds *[]string `json:"sub_out_order_ids,omitempty" required:"false" `
	/*
	   回传状态,PREPARING,准备中，制作中；PRODUCE_FINISH，制作完成；FETCHED 已取餐；  CANCEL，加工失败/取消     */
	Status *string `json:"status" required:"true" `
}

func (s *AlibabaWdkopenCateorderPullRequest) SetStoreId(v string) *AlibabaWdkopenCateorderPullRequest {
	s.StoreId = &v
	return s
}
func (s *AlibabaWdkopenCateorderPullRequest) SetOutOrderId(v string) *AlibabaWdkopenCateorderPullRequest {
	s.OutOrderId = &v
	return s
}
func (s *AlibabaWdkopenCateorderPullRequest) SetSubOutOrderIds(v []string) *AlibabaWdkopenCateorderPullRequest {
	s.SubOutOrderIds = &v
	return s
}
func (s *AlibabaWdkopenCateorderPullRequest) SetStatus(v string) *AlibabaWdkopenCateorderPullRequest {
	s.Status = &v
	return s
}

func (req *AlibabaWdkopenCateorderPullRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.StoreId != nil {
		paramMap["store_id"] = *req.StoreId
	}
	if req.OutOrderId != nil {
		paramMap["out_order_id"] = *req.OutOrderId
	}
	if req.SubOutOrderIds != nil {
		paramMap["sub_out_order_ids"] = util.ConvertBasicList(*req.SubOutOrderIds)
	}
	if req.Status != nil {
		paramMap["status"] = *req.Status
	}
	return paramMap
}

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