-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathasset.go
103 lines (94 loc) · 2.74 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package response
import "encoding/json"
// 5.2 Object: Asset
//
// Corresponds to the Asset Object in the request. The main container object for each asset
// requested or supported by Exchange on behalf of the rendering client. Any object that is
// required is to be flagged as such. Only one of the {title,img,video,data} objects should be
// present in each object. All others should be null/absent. The id is to be unique within the
// AssetObject array so that the response can be aligned.
type Asset struct {
// Field:
// id
// Scope:
// optional
// Type:
// int
// Description:
// Optional if assetsurl/dcourl is being used; required if embedded asset is being used.
ID *int64 `json:"id,omitempty"`
// Field:
// required
// Scope:
// optional
// Type:
// int
// Default:
// 0
// Description:
// Set to 1 if asset is required. (bidder requires it to be displayed).
Required int8 `json:"required,omitempty"`
// Field:
// title
// Scope:
// optional
// Type:
// object
// Description:
// Title object for title assets.
// Asset object may contain only one of title, img, data or video.
Title *Title `json:"title,omitempty"`
// Field:
// img
// Scope:
// optional
// Type:
// object
// Description:
// Image object for image assets.
// Asset object may contain only one of title, img, data or video.
Img *Image `json:"img,omitempty"`
// Field:
// video
// Scope:
// optional
// Type:
// object
// Description:
// Video object for video assets. See Video response object definition.
// Note that in-stream video ads are not part of Native.
// Native ads may contain a video as the ad creative itself.
// Asset object may contain only one of title, img, data or video.
Video *Video `json:"video,omitempty"`
// Field:
// data
// Scope:
// optional
// Type:
// object
// Description:
// Data object for ratings, prices etc.
// Asset object may contain only one of title, img, data or video.
Data *Data `json:"data,omitempty"`
// Field:
// link
// Scope:
// optional
// Type:
// object
// Description:
// Link object for call to actions. The link object applies if the asset item is activated (clicked).
// If there is no link object on the asset, the parent link object on the bid response applies.
Link *Link `json:"link,omitempty"`
// Field:
// ext
// Scope:
// optional
// Type:
// object
// Description:
// This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification
// Bidders are encouraged not to use asset.ext for exchanging text assets.
// Use data.ext with custom type instead.
Ext json.RawMessage `json:"ext,omitempty"`
}