
1package main
2
3import (
4 "bytes"
5 "demo/wxpay_brand_utility"
6 "encoding/json"
7 "fmt"
8 "net/http"
9 "net/url"
10 "strings"
11 "time"
12)
13
14func main() {
15
16 config, err := wxpay_brand_utility.CreateBrandConfig(
17 "xxxxxxxx",
18 "1DDE55AD98Exxxxxxxxxx",
19 "/path/to/apiclient_key.pem",
20 "PUB_KEY_ID_xxxxxxxxxxxxx",
21 "/path/to/wxp_pub.pem",
22 )
23 if err != nil {
24 fmt.Println(err)
25 return
26 }
27
28 request := &SendUserProductCouponBundleRequest{
29 ProductCouponId: wxpay_brand_utility.String("1000000014"),
30 StockBundleId: wxpay_brand_utility.String("712315129419284901"),
31 Appid: wxpay_brand_utility.String("wx233544546545989"),
32 Openid: wxpay_brand_utility.String("oh-394z-6CGkNoJrsDLTTUKiAnp4"),
33 SendRequestNo: wxpay_brand_utility.String("MCHCONFIRM202003101234"),
34 }
35
36 response, err := SendUserProductCouponBundle(config, request)
37 if err != nil {
38 fmt.Printf("请求失败: %+v\n", err)
39
40 return
41 }
42
43
44 fmt.Printf("请求成功: %+v\n", response)
45}
46
47func SendUserProductCouponBundle(config *wxpay_brand_utility.BrandConfig, request *SendUserProductCouponBundleRequest) (response *SendUserProductCouponBundleResponse, err error) {
48 const (
49 host = "https://api.mch.weixin.qq.com"
50 method = "POST"
51 path = "/brand/marketing/product-coupon/users/{openid}/coupon-bundles"
52 )
53
54 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path))
55 if err != nil {
56 return nil, err
57 }
58 reqUrl.Path = strings.Replace(reqUrl.Path, "{openid}", url.PathEscape(*request.Openid), -1)
59 reqBody, err := json.Marshal(request)
60 if err != nil {
61 return nil, err
62 }
63 httpRequest, err := http.NewRequest(method, reqUrl.String(), bytes.NewReader(reqBody))
64 if err != nil {
65 return nil, err
66 }
67 httpRequest.Header.Set("Accept", "application/json")
68 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId())
69 httpRequest.Header.Set("Content-Type", "application/json")
70 authorization, err := wxpay_brand_utility.BuildAuthorization(config.BrandId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), reqBody)
71 if err != nil {
72 return nil, err
73 }
74 httpRequest.Header.Set("Authorization", authorization)
75
76 client := &http.Client{}
77 httpResponse, err := client.Do(httpRequest)
78 if err != nil {
79 return nil, err
80 }
81 respBody, err := wxpay_brand_utility.ExtractResponseBody(httpResponse)
82 if err != nil {
83 return nil, err
84 }
85 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 {
86
87 err = wxpay_brand_utility.ValidateResponse(
88 config.WechatPayPublicKeyId(),
89 config.WechatPayPublicKey(),
90 &httpResponse.Header,
91 respBody,
92 )
93 if err != nil {
94 return nil, err
95 }
96 response := &SendUserProductCouponBundleResponse{}
97 if err := json.Unmarshal(respBody, response); err != nil {
98 return nil, err
99 }
100
101 return response, nil
102 } else {
103 return nil, wxpay_brand_utility.NewApiException(
104 httpResponse.StatusCode,
105 httpResponse.Header,
106 respBody,
107 )
108 }
109}
110
111type SendUserProductCouponBundleRequest struct {
112 ProductCouponId *string `json:"product_coupon_id,omitempty"`
113 StockBundleId *string `json:"stock_bundle_id,omitempty"`
114 Appid *string `json:"appid,omitempty"`
115 Openid *string `json:"openid,omitempty"`
116 SendRequestNo *string `json:"send_request_no,omitempty"`
117 Attach *string `json:"attach,omitempty"`
118 CouponTagInfo *CouponTagInfo `json:"coupon_tag_info,omitempty"`
119}
120
121func (o *SendUserProductCouponBundleRequest) MarshalJSON() ([]byte, error) {
122 type Alias SendUserProductCouponBundleRequest
123 a := &struct {
124 Openid *string `json:"openid,omitempty"`
125 *Alias
126 }{
127
128 Openid: nil,
129 Alias: (*Alias)(o),
130 }
131 return json.Marshal(a)
132}
133
134type SendUserProductCouponBundleResponse struct {
135 UserCouponBundleId *string `json:"user_coupon_bundle_id,omitempty"`
136 UserProductCouponList []UserProductCouponEntity `json:"user_product_coupon_list,omitempty"`
137}
138
139type CouponTagInfo struct {
140 CouponTagList []UserProductCouponTag `json:"coupon_tag_list,omitempty"`
141 MemberTagInfo *MemberTagInfo `json:"member_tag_info,omitempty"`
142}
143
144type UserProductCouponEntity struct {
145 CouponCode *string `json:"coupon_code,omitempty"`
146 CouponState *UserProductCouponState `json:"coupon_state,omitempty"`
147 ValidBeginTime *time.Time `json:"valid_begin_time,omitempty"`
148 ValidEndTime *time.Time `json:"valid_end_time,omitempty"`
149 ReceiveTime *string `json:"receive_time,omitempty"`
150 SendRequestNo *string `json:"send_request_no,omitempty"`
151 SendChannel *UserProductCouponSendChannel `json:"send_channel,omitempty"`
152 ConfirmRequestNo *string `json:"confirm_request_no,omitempty"`
153 ConfirmTime *time.Time `json:"confirm_time,omitempty"`
154 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
155 DeactivateTime *string `json:"deactivate_time,omitempty"`
156 DeactivateReason *string `json:"deactivate_reason,omitempty"`
157 ProgressiveBundleUsageDetail *CouponUsageDetail `json:"progressive_bundle_usage_detail,omitempty"`
158 UserProductCouponBundleInfo *UserProductCouponBundleInfo `json:"user_product_coupon_bundle_info,omitempty"`
159 ProductCoupon *ProductCouponEntity `json:"product_coupon,omitempty"`
160 Stock *StockEntity `json:"stock,omitempty"`
161 Attach *string `json:"attach,omitempty"`
162 ChannelCustomInfo *string `json:"channel_custom_info,omitempty"`
163 CouponTagInfo *CouponTagInfo `json:"coupon_tag_info,omitempty"`
164}
165
166type UserProductCouponTag string
167
168func (e UserProductCouponTag) Ptr() *UserProductCouponTag {
169 return &e
170}
171
172const (
173 USERPRODUCTCOUPONTAG_MEMBER UserProductCouponTag = "MEMBER"
174 USERPRODUCTCOUPONTAG_MEMBER_ACTIVITY UserProductCouponTag = "MEMBER_ACTIVITY"
175)
176
177type MemberTagInfo struct {
178 MemberCardId *string `json:"member_card_id,omitempty"`
179}
180
181type UserProductCouponState string
182
183func (e UserProductCouponState) Ptr() *UserProductCouponState {
184 return &e
185}
186
187const (
188 USERPRODUCTCOUPONSTATE_CONFIRMING UserProductCouponState = "CONFIRMING"
189 USERPRODUCTCOUPONSTATE_PENDING UserProductCouponState = "PENDING"
190 USERPRODUCTCOUPONSTATE_EFFECTIVE UserProductCouponState = "EFFECTIVE"
191 USERPRODUCTCOUPONSTATE_USED UserProductCouponState = "USED"
192 USERPRODUCTCOUPONSTATE_EXPIRED UserProductCouponState = "EXPIRED"
193 USERPRODUCTCOUPONSTATE_DELETED UserProductCouponState = "DELETED"
194 USERPRODUCTCOUPONSTATE_DEACTIVATED UserProductCouponState = "DEACTIVATED"
195)
196
197type UserProductCouponSendChannel string
198
199func (e UserProductCouponSendChannel) Ptr() *UserProductCouponSendChannel {
200 return &e
201}
202
203const (
204 USERPRODUCTCOUPONSENDCHANNEL_BRAND_MANAGE UserProductCouponSendChannel = "BRAND_MANAGE"
205 USERPRODUCTCOUPONSENDCHANNEL_API UserProductCouponSendChannel = "API"
206 USERPRODUCTCOUPONSENDCHANNEL_RECEIVE_COMPONENT UserProductCouponSendChannel = "RECEIVE_COMPONENT"
207 USERPRODUCTCOUPONSENDCHANNEL_MEMBER UserProductCouponSendChannel = "MEMBER"
208 USERPRODUCTCOUPONSENDCHANNEL_STICKER_GIFT UserProductCouponSendChannel = "STICKER_GIFT"
209)
210
211type CouponUsageDetail struct {
212 UseRequestNo *string `json:"use_request_no,omitempty"`
213 UseTime *time.Time `json:"use_time,omitempty"`
214 ReturnRequestNo *string `json:"return_request_no,omitempty"`
215 ReturnTime *time.Time `json:"return_time,omitempty"`
216 AssociatedOrderInfo *UserProductCouponAssociatedOrderInfo `json:"associated_order_info,omitempty"`
217 AssociatedPayScoreOrderInfo *UserProductCouponAssociatedPayScoreOrderInfo `json:"associated_pay_score_order_info,omitempty"`
218 SavedAmount *int64 `json:"saved_amount,omitempty"`
219 UseProductNoList []string `json:"use_product_no_list,omitempty"`
220}
221
222type UserProductCouponBundleInfo struct {
223 UserCouponBundleId *string `json:"user_coupon_bundle_id,omitempty"`
224 UserCouponBundleIndex *int64 `json:"user_coupon_bundle_index,omitempty"`
225 TotalCount *int64 `json:"total_count,omitempty"`
226 UsedCount *int64 `json:"used_count,omitempty"`
227}
228
229type ProductCouponEntity struct {
230 ProductCouponId *string `json:"product_coupon_id,omitempty"`
231 Scope *ProductCouponScope `json:"scope,omitempty"`
232 Type *ProductCouponType `json:"type,omitempty"`
233 UsageMode *UsageMode `json:"usage_mode,omitempty"`
234 SingleUsageInfo *SingleUsageInfo `json:"single_usage_info,omitempty"`
235 ProgressiveBundleUsageInfo *ProgressiveBundleUsageInfo `json:"progressive_bundle_usage_info,omitempty"`
236 DisplayInfo *ProductCouponDisplayInfo `json:"display_info,omitempty"`
237 OutProductNo *string `json:"out_product_no,omitempty"`
238 State *ProductCouponState `json:"state,omitempty"`
239 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
240 DeactivateTime *string `json:"deactivate_time,omitempty"`
241 DeactivateReason *string `json:"deactivate_reason,omitempty"`
242 ShowAsExchange *bool `json:"show_as_exchange,omitempty"`
243 AvailableProductNoList []string `json:"available_product_no_list,omitempty"`
244}
245
246type StockEntity struct {
247 ProductCouponId *string `json:"product_coupon_id,omitempty"`
248 StockId *string `json:"stock_id,omitempty"`
249 Remark *string `json:"remark,omitempty"`
250 CouponCodeMode *CouponCodeMode `json:"coupon_code_mode,omitempty"`
251 CouponCodeCountInfo *CouponCodeCountInfo `json:"coupon_code_count_info,omitempty"`
252 StockSendRule *StockSendRule `json:"stock_send_rule,omitempty"`
253 ProgressiveBundleUsageRule *StockUsageRule `json:"progressive_bundle_usage_rule,omitempty"`
254 StockBundleInfo *StockBundleInfo `json:"stock_bundle_info,omitempty"`
255 UsageRuleDisplayInfo *UsageRuleDisplayInfo `json:"usage_rule_display_info,omitempty"`
256 CouponDisplayInfo *CouponDisplayInfo `json:"coupon_display_info,omitempty"`
257 NotifyConfig *NotifyConfig `json:"notify_config,omitempty"`
258 StoreScope *StockStoreScope `json:"store_scope,omitempty"`
259 SentCountInfo *StockSentCountInfo `json:"sent_count_info,omitempty"`
260 State *StockState `json:"state,omitempty"`
261 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
262 DeactivateTime *time.Time `json:"deactivate_time,omitempty"`
263 DeactivateReason *string `json:"deactivate_reason,omitempty"`
264}
265
266type UserProductCouponAssociatedOrderInfo struct {
267 TransactionId *string `json:"transaction_id,omitempty"`
268 OutTradeNo *string `json:"out_trade_no,omitempty"`
269 Mchid *string `json:"mchid,omitempty"`
270 SubMchid *string `json:"sub_mchid,omitempty"`
271}
272
273type UserProductCouponAssociatedPayScoreOrderInfo struct {
274 OrderId *string `json:"order_id,omitempty"`
275 OutOrderNo *string `json:"out_order_no,omitempty"`
276 Mchid *string `json:"mchid,omitempty"`
277 SubMchid *string `json:"sub_mchid,omitempty"`
278}
279
280type ProductCouponScope string
281
282func (e ProductCouponScope) Ptr() *ProductCouponScope {
283 return &e
284}
285
286const (
287 PRODUCTCOUPONSCOPE_ALL ProductCouponScope = "ALL"
288 PRODUCTCOUPONSCOPE_SINGLE ProductCouponScope = "SINGLE"
289 PRODUCTCOUPONSCOPE_CATEGORY ProductCouponScope = "CATEGORY"
290)
291
292type ProductCouponType string
293
294func (e ProductCouponType) Ptr() *ProductCouponType {
295 return &e
296}
297
298const (
299 PRODUCTCOUPONTYPE_NORMAL ProductCouponType = "NORMAL"
300 PRODUCTCOUPONTYPE_DISCOUNT ProductCouponType = "DISCOUNT"
301 PRODUCTCOUPONTYPE_EXCHANGE ProductCouponType = "EXCHANGE"
302)
303
304type UsageMode string
305
306func (e UsageMode) Ptr() *UsageMode {
307 return &e
308}
309
310const (
311 USAGEMODE_SINGLE UsageMode = "SINGLE"
312 USAGEMODE_PROGRESSIVE_BUNDLE UsageMode = "PROGRESSIVE_BUNDLE"
313)
314
315type SingleUsageInfo struct {
316 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
317 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
318}
319
320type ProgressiveBundleUsageInfo struct {
321 Count *int64 `json:"count,omitempty"`
322 IntervalDays *int64 `json:"interval_days,omitempty"`
323}
324
325type ProductCouponDisplayInfo struct {
326 Name *string `json:"name,omitempty"`
327 ImageUrl *string `json:"image_url,omitempty"`
328 BackgroundUrl *string `json:"background_url,omitempty"`
329 DetailImageUrlList []string `json:"detail_image_url_list,omitempty"`
330 OriginalPrice *int64 `json:"original_price,omitempty"`
331 ComboPackageList []ComboPackage `json:"combo_package_list,omitempty"`
332}
333
334type ProductCouponState string
335
336func (e ProductCouponState) Ptr() *ProductCouponState {
337 return &e
338}
339
340const (
341 PRODUCTCOUPONSTATE_AUDITING ProductCouponState = "AUDITING"
342 PRODUCTCOUPONSTATE_EFFECTIVE ProductCouponState = "EFFECTIVE"
343 PRODUCTCOUPONSTATE_DEACTIVATED ProductCouponState = "DEACTIVATED"
344)
345
346type CouponCodeMode string
347
348func (e CouponCodeMode) Ptr() *CouponCodeMode {
349 return &e
350}
351
352const (
353 COUPONCODEMODE_WECHATPAY CouponCodeMode = "WECHATPAY"
354 COUPONCODEMODE_UPLOAD CouponCodeMode = "UPLOAD"
355)
356
357type CouponCodeCountInfo struct {
358 TotalCount *int64 `json:"total_count,omitempty"`
359 AvailableCount *int64 `json:"available_count,omitempty"`
360}
361
362type StockSendRule struct {
363 MaxCount *int64 `json:"max_count,omitempty"`
364 MaxCountPerDay *int64 `json:"max_count_per_day,omitempty"`
365 MaxCountPerUser *int64 `json:"max_count_per_user,omitempty"`
366}
367
368type StockUsageRule struct {
369 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
370 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
371 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
372 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
373}
374
375type StockBundleInfo struct {
376 StockBundleId *string `json:"stock_bundle_id,omitempty"`
377 StockBundleIndex *int64 `json:"stock_bundle_index,omitempty"`
378}
379
380type UsageRuleDisplayInfo struct {
381 CouponUsageMethodList []CouponUsageMethod `json:"coupon_usage_method_list,omitempty"`
382 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
383 MiniProgramPath *string `json:"mini_program_path,omitempty"`
384 AppPath *string `json:"app_path,omitempty"`
385 UsageDescription *string `json:"usage_description,omitempty"`
386 CouponAvailableStoreInfo *CouponAvailableStoreInfo `json:"coupon_available_store_info,omitempty"`
387 AppJumpType *AppJumpType `json:"app_jump_type,omitempty"`
388 PasscodeLink *string `json:"passcode_link,omitempty"`
389}
390
391type CouponDisplayInfo struct {
392 CodeDisplayMode *CouponCodeDisplayMode `json:"code_display_mode,omitempty"`
393 BackgroundColor *string `json:"background_color,omitempty"`
394 EntranceMiniProgram *EntranceMiniProgram `json:"entrance_mini_program,omitempty"`
395 EntranceOfficialAccount *EntranceOfficialAccount `json:"entrance_official_account,omitempty"`
396}
397
398type NotifyConfig struct {
399 NotifyAppid *string `json:"notify_appid,omitempty"`
400}
401
402type StockStoreScope string
403
404func (e StockStoreScope) Ptr() *StockStoreScope {
405 return &e
406}
407
408const (
409 STOCKSTORESCOPE_NONE StockStoreScope = "NONE"
410 STOCKSTORESCOPE_ALL StockStoreScope = "ALL"
411 STOCKSTORESCOPE_SPECIFIC StockStoreScope = "SPECIFIC"
412)
413
414type StockSentCountInfo struct {
415 TotalCount *int64 `json:"total_count,omitempty"`
416 TodayCount *int64 `json:"today_count,omitempty"`
417}
418
419type StockState string
420
421func (e StockState) Ptr() *StockState {
422 return &e
423}
424
425const (
426 STOCKSTATE_AUDITING StockState = "AUDITING"
427 STOCKSTATE_SENDING StockState = "SENDING"
428 STOCKSTATE_PAUSED StockState = "PAUSED"
429 STOCKSTATE_STOPPED StockState = "STOPPED"
430 STOCKSTATE_DEACTIVATED StockState = "DEACTIVATED"
431)
432
433type NormalCouponUsageRule struct {
434 Threshold *int64 `json:"threshold,omitempty"`
435 DiscountAmount *int64 `json:"discount_amount,omitempty"`
436}
437
438type DiscountCouponUsageRule struct {
439 Threshold *int64 `json:"threshold,omitempty"`
440 PercentOff *int64 `json:"percent_off,omitempty"`
441}
442
443type ComboPackage struct {
444 Name *string `json:"name,omitempty"`
445 PickCount *int64 `json:"pick_count,omitempty"`
446 ChoiceList []ComboPackageChoice `json:"choice_list,omitempty"`
447}
448
449type CouponAvailablePeriod struct {
450 AvailableBeginTime *string `json:"available_begin_time,omitempty"`
451 AvailableEndTime *string `json:"available_end_time,omitempty"`
452 AvailableDays *int64 `json:"available_days,omitempty"`
453 WaitDaysAfterReceive *int64 `json:"wait_days_after_receive,omitempty"`
454 WeeklyAvailablePeriod *FixedWeekPeriod `json:"weekly_available_period,omitempty"`
455 IrregularAvailablePeriodList []TimePeriod `json:"irregular_available_period_list,omitempty"`
456 AvailableSeconds *int64 `json:"available_seconds,omitempty"`
457}
458
459type ExchangeCouponUsageRule struct {
460 Threshold *int64 `json:"threshold,omitempty"`
461 ExchangePrice *int64 `json:"exchange_price,omitempty"`
462}
463
464type CouponUsageMethod string
465
466func (e CouponUsageMethod) Ptr() *CouponUsageMethod {
467 return &e
468}
469
470const (
471 COUPONUSAGEMETHOD_OFFLINE CouponUsageMethod = "OFFLINE"
472 COUPONUSAGEMETHOD_MINI_PROGRAM CouponUsageMethod = "MINI_PROGRAM"
473 COUPONUSAGEMETHOD_APP CouponUsageMethod = "APP"
474 COUPONUSAGEMETHOD_PAYMENT_CODE CouponUsageMethod = "PAYMENT_CODE"
475)
476
477type CouponAvailableStoreInfo struct {
478 Description *string `json:"description,omitempty"`
479 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
480 MiniProgramPath *string `json:"mini_program_path,omitempty"`
481}
482
483type AppJumpType string
484
485func (e AppJumpType) Ptr() *AppJumpType {
486 return &e
487}
488
489const (
490 APPJUMPTYPE_H5 AppJumpType = "H5"
491 APPJUMPTYPE_PASSCODE_LINK AppJumpType = "PASSCODE_LINK"
492 APPJUMPTYPE_USAGE_GUIDE AppJumpType = "USAGE_GUIDE"
493)
494
495type CouponCodeDisplayMode string
496
497func (e CouponCodeDisplayMode) Ptr() *CouponCodeDisplayMode {
498 return &e
499}
500
501const (
502 COUPONCODEDISPLAYMODE_INVISIBLE CouponCodeDisplayMode = "INVISIBLE"
503 COUPONCODEDISPLAYMODE_BARCODE CouponCodeDisplayMode = "BARCODE"
504 COUPONCODEDISPLAYMODE_QRCODE CouponCodeDisplayMode = "QRCODE"
505)
506
507type EntranceMiniProgram struct {
508 Appid *string `json:"appid,omitempty"`
509 Path *string `json:"path,omitempty"`
510 EntranceWording *string `json:"entrance_wording,omitempty"`
511 GuidanceWording *string `json:"guidance_wording,omitempty"`
512}
513
514type EntranceOfficialAccount struct {
515 Appid *string `json:"appid,omitempty"`
516}
517
518type ComboPackageChoice struct {
519 Name *string `json:"name,omitempty"`
520 Price *int64 `json:"price,omitempty"`
521 Count *int64 `json:"count,omitempty"`
522 ImageUrl *string `json:"image_url,omitempty"`
523 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
524 MiniProgramPath *string `json:"mini_program_path,omitempty"`
525}
526
527type FixedWeekPeriod struct {
528 DayList []WeekEnum `json:"day_list,omitempty"`
529 DayPeriodList []PeriodOfTheDay `json:"day_period_list,omitempty"`
530}
531
532type TimePeriod struct {
533 BeginTime *string `json:"begin_time,omitempty"`
534 EndTime *string `json:"end_time,omitempty"`
535}
536
537type WeekEnum string
538
539func (e WeekEnum) Ptr() *WeekEnum {
540 return &e
541}
542
543const (
544 WEEKENUM_MONDAY WeekEnum = "MONDAY"
545 WEEKENUM_TUESDAY WeekEnum = "TUESDAY"
546 WEEKENUM_WEDNESDAY WeekEnum = "WEDNESDAY"
547 WEEKENUM_THURSDAY WeekEnum = "THURSDAY"
548 WEEKENUM_FRIDAY WeekEnum = "FRIDAY"
549 WEEKENUM_SATURDAY WeekEnum = "SATURDAY"
550 WEEKENUM_SUNDAY WeekEnum = "SUNDAY"
551)
552
553type PeriodOfTheDay struct {
554 BeginTime *int64 `json:"begin_time,omitempty"`
555 EndTime *int64 `json:"end_time,omitempty"`
556}
557