-
Notifications
You must be signed in to change notification settings - Fork 9
/
TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest.go
96 lines (81 loc) · 3.43 KB
/
TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest.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
package scs
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest 获取账户实时报表 API请求
// taobao.onebp.dkx.report.report.account.realtime
//
// 获取账户实时报表
// 入参1示例:{"biz_code":"adStrategyDkx"}
// 入参2示例:{ "log_date_list": [ "2021-09-23" ] }
type TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest struct {
model.Params
// 请求体
_apiServiceContext *ApiServiceContext
// 报表查询参数
_reportQuery *ReportQueryTopDto
}
// NewTaobaoOnebpDkxReportReportAccountRealtimeRequest 初始化TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest对象
func NewTaobaoOnebpDkxReportReportAccountRealtimeRequest() *TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest {
return &TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest{
Params: model.NewParams(2),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) Reset() {
r._apiServiceContext = nil
r._reportQuery = nil
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) GetApiMethodName() string {
return "taobao.onebp.dkx.report.report.account.realtime"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetApiServiceContext is ApiServiceContext Setter
// 请求体
func (r *TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) SetApiServiceContext(_apiServiceContext *ApiServiceContext) error {
r._apiServiceContext = _apiServiceContext
r.Set("api_service_context", _apiServiceContext)
return nil
}
// GetApiServiceContext ApiServiceContext Getter
func (r TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) GetApiServiceContext() *ApiServiceContext {
return r._apiServiceContext
}
// SetReportQuery is ReportQuery Setter
// 报表查询参数
func (r *TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) SetReportQuery(_reportQuery *ReportQueryTopDto) error {
r._reportQuery = _reportQuery
r.Set("report_query", _reportQuery)
return nil
}
// GetReportQuery ReportQuery Getter
func (r TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) GetReportQuery() *ReportQueryTopDto {
return r._reportQuery
}
var poolTaobaoOnebpDkxReportReportAccountRealtimeAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoOnebpDkxReportReportAccountRealtimeRequest()
},
}
// GetTaobaoOnebpDkxReportReportAccountRealtimeRequest 从 sync.Pool 获取 TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest
func GetTaobaoOnebpDkxReportReportAccountRealtimeAPIRequest() *TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest {
return poolTaobaoOnebpDkxReportReportAccountRealtimeAPIRequest.Get().(*TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest)
}
// ReleaseTaobaoOnebpDkxReportReportAccountRealtimeAPIRequest 将 TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest 放入 sync.Pool
func ReleaseTaobaoOnebpDkxReportReportAccountRealtimeAPIRequest(v *TaobaoOnebpDkxReportReportAccountRealtimeAPIRequest) {
v.Reset()
poolTaobaoOnebpDkxReportReportAccountRealtimeAPIRequest.Put(v)
}