-
Notifications
You must be signed in to change notification settings - Fork 9
/
AliexpressSolutionSellerCategoryTreeQueryAPIResponse.go
58 lines (49 loc) · 2.47 KB
/
AliexpressSolutionSellerCategoryTreeQueryAPIResponse.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
package aesolution
import (
"encoding/xml"
"sync"
"github.com/bububa/opentaobao/model"
)
// AliexpressSolutionSellerCategoryTreeQueryAPIResponse aliexpress.solution.seller.category.tree.query API返回值
// aliexpress.solution.seller.category.tree.query
//
// API for seller to query the category tree. Support only displaying the categories which seller have permissions to publish products.
type AliexpressSolutionSellerCategoryTreeQueryAPIResponse struct {
model.CommonResponse
AliexpressSolutionSellerCategoryTreeQueryAPIResponseModel
}
// Reset 清空结构体
func (m *AliexpressSolutionSellerCategoryTreeQueryAPIResponse) Reset() {
(&m.CommonResponse).Reset()
(&m.AliexpressSolutionSellerCategoryTreeQueryAPIResponseModel).Reset()
}
// AliexpressSolutionSellerCategoryTreeQueryAPIResponseModel is aliexpress.solution.seller.category.tree.query 成功返回结果
type AliexpressSolutionSellerCategoryTreeQueryAPIResponseModel struct {
XMLName xml.Name `xml:"aliexpress_solution_seller_category_tree_query_response"`
// 平台颁发的每次请求访问的唯一标识
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// children category list under category_id
ChildrenCategoryList []CategoryInfo `json:"children_category_list,omitempty" xml:"children_category_list>category_info,omitempty"`
// whether success or not
IsSuccess bool `json:"is_success,omitempty" xml:"is_success,omitempty"`
}
// Reset 清空结构体
func (m *AliexpressSolutionSellerCategoryTreeQueryAPIResponseModel) Reset() {
m.RequestId = ""
m.ChildrenCategoryList = m.ChildrenCategoryList[:0]
m.IsSuccess = false
}
var poolAliexpressSolutionSellerCategoryTreeQueryAPIResponse = sync.Pool{
New: func() any {
return new(AliexpressSolutionSellerCategoryTreeQueryAPIResponse)
},
}
// GetAliexpressSolutionSellerCategoryTreeQueryAPIResponse 从 sync.Pool 获取 AliexpressSolutionSellerCategoryTreeQueryAPIResponse
func GetAliexpressSolutionSellerCategoryTreeQueryAPIResponse() *AliexpressSolutionSellerCategoryTreeQueryAPIResponse {
return poolAliexpressSolutionSellerCategoryTreeQueryAPIResponse.Get().(*AliexpressSolutionSellerCategoryTreeQueryAPIResponse)
}
// ReleaseAliexpressSolutionSellerCategoryTreeQueryAPIResponse 将 AliexpressSolutionSellerCategoryTreeQueryAPIResponse 保存到 sync.Pool
func ReleaseAliexpressSolutionSellerCategoryTreeQueryAPIResponse(v *AliexpressSolutionSellerCategoryTreeQueryAPIResponse) {
v.Reset()
poolAliexpressSolutionSellerCategoryTreeQueryAPIResponse.Put(v)
}