-
Notifications
You must be signed in to change notification settings - Fork 42
/
update.go
56 lines (53 loc) · 3 KB
/
update.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
package promotion
import (
"github.com/bububa/oceanengine/marketing-api/model/v3/project"
"github.com/bububa/oceanengine/marketing-api/util"
)
// UpdateRequest 修改广告列API Request
type UpdateRequest struct {
// AdvertiserID 广告主ID
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// PromotionID 广告ID,广告ID要属于广告主ID
PromotionID uint64 `json:"promotion_id,omitempty"`
// Name 广告名称,长度是1-50个字(两个英文字符占1个字)。名称不可重复
Name string `json:"name,omitempty"`
// PromotionMaterials 广告素材组合
PromotionMaterials *PromotionMaterial `json:"promotion_materials,omitempty"`
// NativeSetting 原生广告设置
NativeSetting *NativeSetting `json:"native_setting,omitempty"`
// IsCommentDisable 广告评论,ON为启用,OFF为不启用
IsCommentDisable string `json:"is_comment_disable,omitempty"`
// AdDownloadStatus 客户端下载视频功能,ON为启用,OFF为不启用
AdDownloadStatus string `json:"ad_download_status,omitempty"`
// Source 广告来源,字数限制:[1-10]
// 当landing_type = LINK、MICRO_GAME时必填
Source string `json:"source,omitempty"`
// BrandInfo 品牌信息
BrandInfo *BrandInfo `json:"brand_info,omitempty"`
// Budget 预算(出价方式为OCPM时,不少于300元;24小时内修改预算操作,不能超过20次,24小时是指自然天的24小时;单次修改预算幅度不能低于100元(增加或者减少);修改后预算金额,不能低于当前已消费金额的105%,以整百单位向上取整;取值范围: ≥ 0
Budget float64 `json:"budget,omitempty"`
// CpaBid 目标转化出价/预期成本, 取值范围:0.1-10000元
// 注意:当 bid_type = NO_BID时,不填写该字段,否则会报错
CpaBid float64 `json:"cpa_bid,omitempty"`
// DeepCpaBid 深度优化出价,deep_bid_type = DEEP_BID_MIN 时必填。取值范围:0.1~10000元
// 注意:当 bid_type = NO_BID时,不填写该字段,否则会报错
DeepCpaBid float64 `json:"deep_cpabid,omitempty"`
// RoiGoal 深度转化ROI系数, 范围(0,5],精度:保留小数点后四位,当 deep_bid_type = ROI_COEFFICIENT 时必填
// 注意:当 bid_type=NO_BID时,不填写该字段,否则会报错
RoiGoal float64 `json:"roi_goal,omitempty"`
// AutoExtendTraffic 智能拓流
// 允许值:ON开启(默认值); OFF关闭
AutoExtendTraffic string `json:"auto_extend_traffic,omitempty"`
// Keywords 关键词列表,关键词和智能拓流二者必须开启一个,一个广告最多可添加1000个
Keywords []project.Keyword `json:"keywords,omitempty"`
// CreativeAutoGenerateSwitch 是否开启自动生成素材
// 默认值:OFF
// 枚举值:ON开启、OFF不开启
CreativeAutoGenerateSwitch string `json:"creative_auto_generate_switch,omitempty"`
// ConfigID 配置ID,开关打开,不传为黑盒明投派生
ConfigID uint64 `json:"config_id,omitempty"`
}
// Encode implement PostRequest interface
func (r UpdateRequest) Encode() []byte {
return util.JSONMarshal(r)
}