-
Notifications
You must be signed in to change notification settings - Fork 10
/
AlibabaWdkStockRealQueryAPIRequest.go
78 lines (65 loc) · 2.2 KB
/
AlibabaWdkStockRealQueryAPIRequest.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package wdk
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AlibabaWdkStockRealQueryAPIRequest 仓内实时库存查询 API请求
// alibaba.wdk.stock.real.query
//
// 查询仓内实时库存信息
type AlibabaWdkStockRealQueryAPIRequest struct {
model.Params
// 系统自动生成
_query *WmsInventoryTopQuery
}
// NewAlibabaWdkStockRealQueryRequest 初始化AlibabaWdkStockRealQueryAPIRequest对象
func NewAlibabaWdkStockRealQueryRequest() *AlibabaWdkStockRealQueryAPIRequest {
return &AlibabaWdkStockRealQueryAPIRequest{
Params: model.NewParams(1),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AlibabaWdkStockRealQueryAPIRequest) Reset() {
r._query = nil
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaWdkStockRealQueryAPIRequest) GetApiMethodName() string {
return "alibaba.wdk.stock.real.query"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaWdkStockRealQueryAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaWdkStockRealQueryAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetQuery is Query Setter
// 系统自动生成
func (r *AlibabaWdkStockRealQueryAPIRequest) SetQuery(_query *WmsInventoryTopQuery) error {
r._query = _query
r.Set("query", _query)
return nil
}
// GetQuery Query Getter
func (r AlibabaWdkStockRealQueryAPIRequest) GetQuery() *WmsInventoryTopQuery {
return r._query
}
var poolAlibabaWdkStockRealQueryAPIRequest = sync.Pool{
New: func() any {
return NewAlibabaWdkStockRealQueryRequest()
},
}
// GetAlibabaWdkStockRealQueryRequest 从 sync.Pool 获取 AlibabaWdkStockRealQueryAPIRequest
func GetAlibabaWdkStockRealQueryAPIRequest() *AlibabaWdkStockRealQueryAPIRequest {
return poolAlibabaWdkStockRealQueryAPIRequest.Get().(*AlibabaWdkStockRealQueryAPIRequest)
}
// ReleaseAlibabaWdkStockRealQueryAPIRequest 将 AlibabaWdkStockRealQueryAPIRequest 放入 sync.Pool
func ReleaseAlibabaWdkStockRealQueryAPIRequest(v *AlibabaWdkStockRealQueryAPIRequest) {
v.Reset()
poolAlibabaWdkStockRealQueryAPIRequest.Put(v)
}