forked from prebid/openrtb
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathimage.go
70 lines (63 loc) · 1.77 KB
/
image.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
package response
import (
"encoding/json"
"github.com/prebid/openrtb/v20/native1"
)
// 5.4 Object: Image
//
// Corresponds to the Image Object in the request.
// The Image object to be used for all image elements of the Native ad such as Icons, Main Image, etc.
//
// It is recommended that if assetsurl/dcourl is being used rather than embedded assets, that an image of each recommended aspect ratio (per the Image Types table) be provided forimage type 3.
type Image struct {
// Field:
// type
// Scope:
// optional
// Type:
// integer
// Description:
// Required for assetsurl or dcourl responses, not required for embedded asset responses.
// The type of image element being submitted from the Image Asset Types table.
Type native1.ImageAssetType `json:"type,omitempty"`
// Field:
// url
// Scope:
// required
// Type:
// string
// Description:
// URL of the image asset
URL string `json:"url"`
// Field:
// w
// Scope:
// recommended
// Type:
// int
// Description:
// Width of the image in pixels.
// Recommended for embedded asset responses.
// Required for assetsurl/dcourlresponses if multiple assets of same type submitted.
W int64 `json:"w,omitempty"`
// Field:
// h
// Scope:
// recommended
// Type:
// int
// Description:
// Height of the image in pixels.
// Recommended for embedded asset responses.
// Required for assetsurl/dcourl responses if multiple assets of same type submitted.
H int64 `json:"h,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
Ext json.RawMessage `json:"ext,omitempty"`
}