-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest.go
126 lines (107 loc) · 4.66 KB
/
AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package tmallservice
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest 服务库存查询 API请求
// alibaba.ssc.supplyplatform.service.inventory.query
//
// 查询服务库存。需要保存服务容量成功后,才能进行查询,参数中的provider信息(provider_id和provider_type)与alibaba.ssc.supplyplatform.servicecapacity.save接口中保持一致。
type AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest struct {
model.Params
// 查询开始日期。yyyy-MM-dd格式
_startDay string
// 查询结束日期。与start间隔不能超过31天。yyyy-MM-dd格式
_endDay string
// 服务提供者类型。参考alibaba.ssc.supplyplatform.servicecapacity.save入参
_providerType string
// 服务提供者类型。参考alibaba.ssc.supplyplatform.servicecapacity.save入参
_providerId int64
}
// NewAlibabaSscSupplyplatformServiceInventoryQueryRequest 初始化AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest对象
func NewAlibabaSscSupplyplatformServiceInventoryQueryRequest() *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest {
return &AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest{
Params: model.NewParams(4),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) Reset() {
r._startDay = ""
r._endDay = ""
r._providerType = ""
r._providerId = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetApiMethodName() string {
return "alibaba.ssc.supplyplatform.service.inventory.query"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetStartDay is StartDay Setter
// 查询开始日期。yyyy-MM-dd格式
func (r *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) SetStartDay(_startDay string) error {
r._startDay = _startDay
r.Set("start_day", _startDay)
return nil
}
// GetStartDay StartDay Getter
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetStartDay() string {
return r._startDay
}
// SetEndDay is EndDay Setter
// 查询结束日期。与start间隔不能超过31天。yyyy-MM-dd格式
func (r *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) SetEndDay(_endDay string) error {
r._endDay = _endDay
r.Set("end_day", _endDay)
return nil
}
// GetEndDay EndDay Getter
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetEndDay() string {
return r._endDay
}
// SetProviderType is ProviderType Setter
// 服务提供者类型。参考alibaba.ssc.supplyplatform.servicecapacity.save入参
func (r *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) SetProviderType(_providerType string) error {
r._providerType = _providerType
r.Set("provider_type", _providerType)
return nil
}
// GetProviderType ProviderType Getter
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetProviderType() string {
return r._providerType
}
// SetProviderId is ProviderId Setter
// 服务提供者类型。参考alibaba.ssc.supplyplatform.servicecapacity.save入参
func (r *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) SetProviderId(_providerId int64) error {
r._providerId = _providerId
r.Set("provider_id", _providerId)
return nil
}
// GetProviderId ProviderId Getter
func (r AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) GetProviderId() int64 {
return r._providerId
}
var poolAlibabaSscSupplyplatformServiceInventoryQueryAPIRequest = sync.Pool{
New: func() any {
return NewAlibabaSscSupplyplatformServiceInventoryQueryRequest()
},
}
// GetAlibabaSscSupplyplatformServiceInventoryQueryRequest 从 sync.Pool 获取 AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest
func GetAlibabaSscSupplyplatformServiceInventoryQueryAPIRequest() *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest {
return poolAlibabaSscSupplyplatformServiceInventoryQueryAPIRequest.Get().(*AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest)
}
// ReleaseAlibabaSscSupplyplatformServiceInventoryQueryAPIRequest 将 AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest 放入 sync.Pool
func ReleaseAlibabaSscSupplyplatformServiceInventoryQueryAPIRequest(v *AlibabaSscSupplyplatformServiceInventoryQueryAPIRequest) {
v.Reset()
poolAlibabaSscSupplyplatformServiceInventoryQueryAPIRequest.Put(v)
}