package request

import (
	"topsdk/util"
)

type TmallExchangeMessagesGetRequest struct {
	/*
	   留言创建角色。具体包括：卖家主账户(1)、卖家子账户(2)、小二(3)、买家(4)、系统(5)、系统超时(6)     */
	OperatorRoles *[]int32 `json:"operator_roles,omitempty" required:"false" `
	/*
	   每页条数 defalutValue��10    */
	PageSize *int64 `json:"page_size,omitempty" required:"false" `
	/*
	   换货单号ID     */
	DisputeId *int64 `json:"dispute_id" required:"true" `
	/*
	   页码 defalutValue��1    */
	PageNo *int64 `json:"page_no,omitempty" required:"false" `
	/*
	   返回的字段。具体包括：id,refund_id,owner_id,owner_nick,owner_role,content,pic_urls,created,message_type     */
	Fields *[]string `json:"fields" required:"true" `
}

func (s *TmallExchangeMessagesGetRequest) SetOperatorRoles(v []int32) *TmallExchangeMessagesGetRequest {
	s.OperatorRoles = &v
	return s
}
func (s *TmallExchangeMessagesGetRequest) SetPageSize(v int64) *TmallExchangeMessagesGetRequest {
	s.PageSize = &v
	return s
}
func (s *TmallExchangeMessagesGetRequest) SetDisputeId(v int64) *TmallExchangeMessagesGetRequest {
	s.DisputeId = &v
	return s
}
func (s *TmallExchangeMessagesGetRequest) SetPageNo(v int64) *TmallExchangeMessagesGetRequest {
	s.PageNo = &v
	return s
}
func (s *TmallExchangeMessagesGetRequest) SetFields(v []string) *TmallExchangeMessagesGetRequest {
	s.Fields = &v
	return s
}

func (req *TmallExchangeMessagesGetRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.OperatorRoles != nil {
		paramMap["operator_roles"] = util.ConvertBasicList(*req.OperatorRoles)
	}
	if req.PageSize != nil {
		paramMap["page_size"] = *req.PageSize
	}
	if req.DisputeId != nil {
		paramMap["dispute_id"] = *req.DisputeId
	}
	if req.PageNo != nil {
		paramMap["page_no"] = *req.PageNo
	}
	if req.Fields != nil {
		paramMap["fields"] = util.ConvertBasicList(*req.Fields)
	}
	return paramMap
}

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