-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlibabaFmhealthWeightLossplanSynclossplanAPIRequest.go
270 lines (233 loc) · 7.74 KB
/
AlibabaFmhealthWeightLossplanSynclossplanAPIRequest.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
package alihealthcrm
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AlibabaFmhealthWeightLossplanSynclossplanAPIRequest 减重计划--同步减重计划 API请求
// alibaba.fmhealth.weight.lossplan.synclossplan
//
// 减重计划--三方同步用户初始化减重计划给我们
type AlibabaFmhealthWeightLossplanSynclossplanAPIRequest struct {
model.Params
// 生日
_birthday string
// 当前体重(今天的体重),单位kg
_weight string
// 目标体重
_weightGoal string
// 每周减重
_lossPerWeek string
// 完成时间
_finishDate string
// 减重计划开始时间
_beginDate string
// 用户id
_tpUserId int64
// 性别0女 1男
_gender int64
// 身高170 即一米七
_height int64
// 0创建减肥计划调用;1修改调用;
_type int64
// 减重类型0保持 1减肥
_lossLevel int64
// 体年龄
_bodyAge int64
// 每日可以摄入的标准总量
_totalCalorie int64
}
// NewAlibabaFmhealthWeightLossplanSynclossplanRequest 初始化AlibabaFmhealthWeightLossplanSynclossplanAPIRequest对象
func NewAlibabaFmhealthWeightLossplanSynclossplanRequest() *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest {
return &AlibabaFmhealthWeightLossplanSynclossplanAPIRequest{
Params: model.NewParams(13),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) Reset() {
r._birthday = ""
r._weight = ""
r._weightGoal = ""
r._lossPerWeek = ""
r._finishDate = ""
r._beginDate = ""
r._tpUserId = 0
r._gender = 0
r._height = 0
r._type = 0
r._lossLevel = 0
r._bodyAge = 0
r._totalCalorie = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetApiMethodName() string {
return "alibaba.fmhealth.weight.lossplan.synclossplan"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetBirthday is Birthday Setter
// 生日
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetBirthday(_birthday string) error {
r._birthday = _birthday
r.Set("birthday", _birthday)
return nil
}
// GetBirthday Birthday Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetBirthday() string {
return r._birthday
}
// SetWeight is Weight Setter
// 当前体重(今天的体重),单位kg
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetWeight(_weight string) error {
r._weight = _weight
r.Set("weight", _weight)
return nil
}
// GetWeight Weight Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetWeight() string {
return r._weight
}
// SetWeightGoal is WeightGoal Setter
// 目标体重
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetWeightGoal(_weightGoal string) error {
r._weightGoal = _weightGoal
r.Set("weight_goal", _weightGoal)
return nil
}
// GetWeightGoal WeightGoal Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetWeightGoal() string {
return r._weightGoal
}
// SetLossPerWeek is LossPerWeek Setter
// 每周减重
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetLossPerWeek(_lossPerWeek string) error {
r._lossPerWeek = _lossPerWeek
r.Set("loss_per_week", _lossPerWeek)
return nil
}
// GetLossPerWeek LossPerWeek Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetLossPerWeek() string {
return r._lossPerWeek
}
// SetFinishDate is FinishDate Setter
// 完成时间
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetFinishDate(_finishDate string) error {
r._finishDate = _finishDate
r.Set("finish_date", _finishDate)
return nil
}
// GetFinishDate FinishDate Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetFinishDate() string {
return r._finishDate
}
// SetBeginDate is BeginDate Setter
// 减重计划开始时间
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetBeginDate(_beginDate string) error {
r._beginDate = _beginDate
r.Set("begin_date", _beginDate)
return nil
}
// GetBeginDate BeginDate Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetBeginDate() string {
return r._beginDate
}
// SetTpUserId is TpUserId Setter
// 用户id
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetTpUserId(_tpUserId int64) error {
r._tpUserId = _tpUserId
r.Set("tp_user_id", _tpUserId)
return nil
}
// GetTpUserId TpUserId Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetTpUserId() int64 {
return r._tpUserId
}
// SetGender is Gender Setter
// 性别0女 1男
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetGender(_gender int64) error {
r._gender = _gender
r.Set("gender", _gender)
return nil
}
// GetGender Gender Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetGender() int64 {
return r._gender
}
// SetHeight is Height Setter
// 身高170 即一米七
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetHeight(_height int64) error {
r._height = _height
r.Set("height", _height)
return nil
}
// GetHeight Height Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetHeight() int64 {
return r._height
}
// SetType is Type Setter
// 0创建减肥计划调用;1修改调用;
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetType(_type int64) error {
r._type = _type
r.Set("type", _type)
return nil
}
// GetType Type Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetType() int64 {
return r._type
}
// SetLossLevel is LossLevel Setter
// 减重类型0保持 1减肥
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetLossLevel(_lossLevel int64) error {
r._lossLevel = _lossLevel
r.Set("loss_level", _lossLevel)
return nil
}
// GetLossLevel LossLevel Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetLossLevel() int64 {
return r._lossLevel
}
// SetBodyAge is BodyAge Setter
// 体年龄
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetBodyAge(_bodyAge int64) error {
r._bodyAge = _bodyAge
r.Set("body_age", _bodyAge)
return nil
}
// GetBodyAge BodyAge Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetBodyAge() int64 {
return r._bodyAge
}
// SetTotalCalorie is TotalCalorie Setter
// 每日可以摄入的标准总量
func (r *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) SetTotalCalorie(_totalCalorie int64) error {
r._totalCalorie = _totalCalorie
r.Set("total_calorie", _totalCalorie)
return nil
}
// GetTotalCalorie TotalCalorie Getter
func (r AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) GetTotalCalorie() int64 {
return r._totalCalorie
}
var poolAlibabaFmhealthWeightLossplanSynclossplanAPIRequest = sync.Pool{
New: func() any {
return NewAlibabaFmhealthWeightLossplanSynclossplanRequest()
},
}
// GetAlibabaFmhealthWeightLossplanSynclossplanRequest 从 sync.Pool 获取 AlibabaFmhealthWeightLossplanSynclossplanAPIRequest
func GetAlibabaFmhealthWeightLossplanSynclossplanAPIRequest() *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest {
return poolAlibabaFmhealthWeightLossplanSynclossplanAPIRequest.Get().(*AlibabaFmhealthWeightLossplanSynclossplanAPIRequest)
}
// ReleaseAlibabaFmhealthWeightLossplanSynclossplanAPIRequest 将 AlibabaFmhealthWeightLossplanSynclossplanAPIRequest 放入 sync.Pool
func ReleaseAlibabaFmhealthWeightLossplanSynclossplanAPIRequest(v *AlibabaFmhealthWeightLossplanSynclossplanAPIRequest) {
v.Reset()
poolAlibabaFmhealthWeightLossplanSynclossplanAPIRequest.Put(v)
}