-
Notifications
You must be signed in to change notification settings - Fork 40
/
keywords_update.go
37 lines (33 loc) · 1.05 KB
/
keywords_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
package ad
import (
"github.com/bububa/oceanengine/marketing-api/enum"
"github.com/bububa/oceanengine/marketing-api/enum/qianchuan"
"github.com/bububa/oceanengine/marketing-api/util"
)
// KeywordsUpdateRequest 更新关键词 API Request
type KeywordsUpdateRequest struct {
// AdvertiserID 千川广告账户id
AdvertiserID uint64 `json:"advertiser_id,omitempty"`
// AdID 计划ID
AdID uint64 `json:"ad_id,omitempty"`
// Keywords 更新关键词
Keywords []UpdateKeyword `json:"keywords,omitempty"`
}
type UpdateKeyword struct {
// ID 关键词ID
ID uint64 `json:"id,omitempty"`
// StatusType 关键词操作状态 可选值:
// DELETE: 删除
// ENABLE: 启动
// PAUSED: 暂停
StatusType qianchuan.KeywordStatus `json:"status_type,omitempty"`
// MatchType 关键词匹配类型 可选值:
// EXTENSIVE: 广泛匹配
// PHRASE: 短语匹配
// PRECISION: 精准匹配
MatchType enum.KeywordMatchType `json:"match_type,omitempty"`
}
// Encode implement PostRequest interface
func (r KeywordsUpdateRequest) Encode() []byte {
return util.JSONMarshal(r)
}