-
Notifications
You must be signed in to change notification settings - Fork 9
/
TaobaoWlbWaybillIProductAPIResponse.go
55 lines (46 loc) · 1.83 KB
/
TaobaoWlbWaybillIProductAPIResponse.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
package waybill
import (
"encoding/xml"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoWlbWaybillIProductAPIResponse 商家查询物流商产品类型接口 API返回值
// taobao.wlb.waybill.i.product
//
// 商家可以查询物流商的产品类型和服务能力。
type TaobaoWlbWaybillIProductAPIResponse struct {
model.CommonResponse
TaobaoWlbWaybillIProductAPIResponseModel
}
// Reset 清空结构体
func (m *TaobaoWlbWaybillIProductAPIResponse) Reset() {
(&m.CommonResponse).Reset()
(&m.TaobaoWlbWaybillIProductAPIResponseModel).Reset()
}
// TaobaoWlbWaybillIProductAPIResponseModel is 商家查询物流商产品类型接口 成功返回结果
type TaobaoWlbWaybillIProductAPIResponseModel struct {
XMLName xml.Name `xml:"wlb_waybill_i_product_response"`
// 平台颁发的每次请求访问的唯一标识
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// 产品类型返回
ProductTypes []WaybillProductType `json:"product_types,omitempty" xml:"product_types>waybill_product_type,omitempty"`
}
// Reset 清空结构体
func (m *TaobaoWlbWaybillIProductAPIResponseModel) Reset() {
m.RequestId = ""
m.ProductTypes = m.ProductTypes[:0]
}
var poolTaobaoWlbWaybillIProductAPIResponse = sync.Pool{
New: func() any {
return new(TaobaoWlbWaybillIProductAPIResponse)
},
}
// GetTaobaoWlbWaybillIProductAPIResponse 从 sync.Pool 获取 TaobaoWlbWaybillIProductAPIResponse
func GetTaobaoWlbWaybillIProductAPIResponse() *TaobaoWlbWaybillIProductAPIResponse {
return poolTaobaoWlbWaybillIProductAPIResponse.Get().(*TaobaoWlbWaybillIProductAPIResponse)
}
// ReleaseTaobaoWlbWaybillIProductAPIResponse 将 TaobaoWlbWaybillIProductAPIResponse 保存到 sync.Pool
func ReleaseTaobaoWlbWaybillIProductAPIResponse(v *TaobaoWlbWaybillIProductAPIResponse) {
v.Reset()
poolTaobaoWlbWaybillIProductAPIResponse.Put(v)
}