-
Notifications
You must be signed in to change notification settings - Fork 9
/
TaobaoFeedflowItemCrowdModifyAPIRequest.go
94 lines (79 loc) · 2.71 KB
/
TaobaoFeedflowItemCrowdModifyAPIRequest.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
package feedflow
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoFeedflowItemCrowdModifyAPIRequest 覆盖单元下同类型定向人群 API请求
// taobao.feedflow.item.crowd.modify
//
// 覆盖单元下同类型定向人群
type TaobaoFeedflowItemCrowdModifyAPIRequest struct {
model.Params
// 人群信息
_crowds []CrowdDto
// 单元id
_adgroupId int64
}
// NewTaobaoFeedflowItemCrowdModifyRequest 初始化TaobaoFeedflowItemCrowdModifyAPIRequest对象
func NewTaobaoFeedflowItemCrowdModifyRequest() *TaobaoFeedflowItemCrowdModifyAPIRequest {
return &TaobaoFeedflowItemCrowdModifyAPIRequest{
Params: model.NewParams(2),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoFeedflowItemCrowdModifyAPIRequest) Reset() {
r._crowds = r._crowds[:0]
r._adgroupId = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoFeedflowItemCrowdModifyAPIRequest) GetApiMethodName() string {
return "taobao.feedflow.item.crowd.modify"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoFeedflowItemCrowdModifyAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoFeedflowItemCrowdModifyAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetCrowds is Crowds Setter
// 人群信息
func (r *TaobaoFeedflowItemCrowdModifyAPIRequest) SetCrowds(_crowds []CrowdDto) error {
r._crowds = _crowds
r.Set("crowds", _crowds)
return nil
}
// GetCrowds Crowds Getter
func (r TaobaoFeedflowItemCrowdModifyAPIRequest) GetCrowds() []CrowdDto {
return r._crowds
}
// SetAdgroupId is AdgroupId Setter
// 单元id
func (r *TaobaoFeedflowItemCrowdModifyAPIRequest) SetAdgroupId(_adgroupId int64) error {
r._adgroupId = _adgroupId
r.Set("adgroup_id", _adgroupId)
return nil
}
// GetAdgroupId AdgroupId Getter
func (r TaobaoFeedflowItemCrowdModifyAPIRequest) GetAdgroupId() int64 {
return r._adgroupId
}
var poolTaobaoFeedflowItemCrowdModifyAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoFeedflowItemCrowdModifyRequest()
},
}
// GetTaobaoFeedflowItemCrowdModifyRequest 从 sync.Pool 获取 TaobaoFeedflowItemCrowdModifyAPIRequest
func GetTaobaoFeedflowItemCrowdModifyAPIRequest() *TaobaoFeedflowItemCrowdModifyAPIRequest {
return poolTaobaoFeedflowItemCrowdModifyAPIRequest.Get().(*TaobaoFeedflowItemCrowdModifyAPIRequest)
}
// ReleaseTaobaoFeedflowItemCrowdModifyAPIRequest 将 TaobaoFeedflowItemCrowdModifyAPIRequest 放入 sync.Pool
func ReleaseTaobaoFeedflowItemCrowdModifyAPIRequest(v *TaobaoFeedflowItemCrowdModifyAPIRequest) {
v.Reset()
poolTaobaoFeedflowItemCrowdModifyAPIRequest.Put(v)
}