forked from emiddleton/gads
-
Notifications
You must be signed in to change notification settings - Fork 1
/
extension_feed_item.go
48 lines (42 loc) · 1.51 KB
/
extension_feed_item.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
package gads
// CommonExtensionFeedItem is the Parent type for
// all ExtensionFeedItem
type CommonExtensionFeedItem struct {
Type string `xml:"xsi:type,attr,omitempty"`
FeedID int64 `xml:"feedId,omitempty"`
FeedItemID int64 `xml:"feedItemId,omitempty"`
Status string `xml:"status,omitempty"`
FeedType string `xml:"feedType,omitempty"`
StartTime string `xml:"startTime,omitempty"`
EndTime *string `xml:"endTime"`
}
// ExtensionFeedItem is an interface all extension feed item implements
type ExtensionFeedItem interface {
GetFeedID() int64
GetFeedItemID() int64
GetType() string
}
// GetFeedID returns the ID of the feed this item belongs to
func (e *CommonExtensionFeedItem) GetFeedID() int64 {
return e.FeedID
}
// GetFeedItemID returns the ID of this feed item
func (e *CommonExtensionFeedItem) GetFeedItemID() int64 {
return e.FeedItemID
}
// GetType returns the type
func (e *CommonExtensionFeedItem) GetType() string {
return e.Type
}
// SitelinkFeedItem represents a sitelink extension.
//
// see https://developers.google.com/adwords/api/docs/reference/v201809/CampaignExtensionSettingService.SitelinkFeedItem
type SitelinkFeedItem struct {
*CommonExtensionFeedItem
Text string `xml:"sitelinkText"`
URL *string `xml:"sitelinkUrl"`
Line2 *string `xml:"sitelinkLine2"`
Line3 *string `xml:"sitelinkLine3"`
FinalUrls *UrlList `xml:"sitelinkFinalUrls"`
TrackingURLTemplate *string `xml:"sitelinkTrackingUrlTemplate"`
}