-
Notifications
You must be signed in to change notification settings - Fork 12
/
TaobaoSubusersSubaccountSearchAPIResponse.go
64 lines (55 loc) · 2.67 KB
/
TaobaoSubusersSubaccountSearchAPIResponse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package subuser
import (
"encoding/xml"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoSubusersSubaccountSearchAPIResponse 根据子账号登录名后缀模糊搜索子账号列表 API返回值
// taobao.subusers.subaccount.search
//
// 根据子账号冒号后缀搜索子账号列表,支持中文单字、英文单词(不支持英文单字母) 分词规则搜索,该搜索词必传。模糊搜索使用阿里云搜索引擎所以该接口增值收费,如果不需要模糊搜索仅需要分页获取子账号列表,请使用taobao.sellercenter.subusers.page接口
type TaobaoSubusersSubaccountSearchAPIResponse struct {
model.CommonResponse
TaobaoSubusersSubaccountSearchAPIResponseModel
}
// Reset 清空结构体
func (m *TaobaoSubusersSubaccountSearchAPIResponse) Reset() {
(&m.CommonResponse).Reset()
(&m.TaobaoSubusersSubaccountSearchAPIResponseModel).Reset()
}
// TaobaoSubusersSubaccountSearchAPIResponseModel is 根据子账号登录名后缀模糊搜索子账号列表 成功返回结果
type TaobaoSubusersSubaccountSearchAPIResponseModel struct {
XMLName xml.Name `xml:"subusers_subaccount_search_response"`
// 平台颁发的每次请求访问的唯一标识
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// 子账号列表
Subaccounts []SubAccountInfo `json:"subaccounts,omitempty" xml:"subaccounts>sub_account_info,omitempty"`
// isv本次调用传入的页大小
PageSize int64 `json:"page_size,omitempty" xml:"page_size,omitempty"`
// 本次调用删选条件下的总子账号数量,除以页大小可得出最大页数
TotalCount int64 `json:"total_count,omitempty" xml:"total_count,omitempty"`
// isv本次调用传入的页码
PageNum int64 `json:"page_num,omitempty" xml:"page_num,omitempty"`
}
// Reset 清空结构体
func (m *TaobaoSubusersSubaccountSearchAPIResponseModel) Reset() {
m.RequestId = ""
m.Subaccounts = m.Subaccounts[:0]
m.PageSize = 0
m.TotalCount = 0
m.PageNum = 0
}
var poolTaobaoSubusersSubaccountSearchAPIResponse = sync.Pool{
New: func() any {
return new(TaobaoSubusersSubaccountSearchAPIResponse)
},
}
// GetTaobaoSubusersSubaccountSearchAPIResponse 从 sync.Pool 获取 TaobaoSubusersSubaccountSearchAPIResponse
func GetTaobaoSubusersSubaccountSearchAPIResponse() *TaobaoSubusersSubaccountSearchAPIResponse {
return poolTaobaoSubusersSubaccountSearchAPIResponse.Get().(*TaobaoSubusersSubaccountSearchAPIResponse)
}
// ReleaseTaobaoSubusersSubaccountSearchAPIResponse 将 TaobaoSubusersSubaccountSearchAPIResponse 保存到 sync.Pool
func ReleaseTaobaoSubusersSubaccountSearchAPIResponse(v *TaobaoSubusersSubaccountSearchAPIResponse) {
v.Reset()
poolTaobaoSubusersSubaccountSearchAPIResponse.Put(v)
}