This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
asset.go
81 lines (72 loc) · 2.44 KB
/
asset.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
package adcom1
import "encoding/json"
// Asset object is the container for each asset comprising a native ad.
// Each asset is of a specific type and to reflect this, one and only one of the subtype objects (i.e., title, img, video, data) must be present; all others should be omitted.
type Asset struct {
// Attribute:
// id
// Type:
// integer
// Definition:
// The value of AssetFormat.id if this ad references a specific native placement defined by a Placement object and its structure.
ID int64 `json:"id,omitempty"`
// Attribute:
// req
// Type:
// integer; default 0
// Definition:
// Indicates if the asset is required to be displayed, where 0 = no, 1 = yes.
Req int8 `json:"req,omitempty"`
// Attribute:
// title
// Type:
// object; required *
// Definition:
// Asset Subtype Object that indicates this is a title asset and provides additional detail as such.
// Refer to Object: TitleAsset.
// * Required if no other asset subtype object is specified.
Title *TitleAsset `json:"title,omitempty"`
// Attribute:
// image
// Type:
// object; required *
// Definition:
// Asset Subtype Object that indicates this is an image asset and provides additional detail as such.
// Refer to Object: ImageAsset.
// * Required if no other asset subtype object is specified.
Image *ImageAsset `json:"image,omitempty"`
// Attribute:
// video
// Type:
// object; required *
// Definition:
// Asset Subtype Object that indicates this is a video asset and provides additional detail as such.
// Refer to Object: VideoAsset.
// * Required if no other asset subtype object is specified.
Video *VideoAsset `json:"video,omitempty"`
// Attribute:
// data
// Type:
// object; required *
// Definition:
// Asset Subtype Object that indicates this is a data asset and provides additional detail as such.
// Refer to Object: DataAsset.
// * Required if no other asset subtype object is specified.
Data *DataAsset `json:"data,omitempty"`
// Attribute:
// link
// Type:
// object; required *
// Definition:
// Asset Subtype Object that indicates this is a link asset and provides additional detail as such.
// Refer to Object: LinkAsset.
// * Required if no other asset subtype object is specified.
Link *LinkAsset `json:"link,omitempty"`
// Attribute:
// ext
// Type:
// object
// Definition:
// Optional vendor-specific extensions.
Ext json.RawMessage `json:"ext,omitempty"`
}