1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Audiens\AppnexusClient\entity; |
4
|
|
|
|
5
|
|
|
class MemberDataSharing |
6
|
|
|
{ |
7
|
|
|
public const SEGMENT_EXPOSURE_ALL = 'all'; |
8
|
|
|
public const SEGMENT_EXPOSURE_LIST = 'list'; |
9
|
|
|
|
10
|
|
|
use HydratableTrait; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @var int |
14
|
|
|
* The ID of the sharing record. |
15
|
|
|
* Required on: PUT/DELETE, in query string |
16
|
|
|
*/ |
17
|
|
|
protected $id; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var int |
21
|
|
|
* Read-only. Your member ID. |
22
|
|
|
*/ |
23
|
|
|
protected $data_member_id; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var int |
27
|
|
|
* The ID of the member with whom you are sharing segments. |
28
|
|
|
* Required on: POST |
29
|
|
|
*/ |
30
|
|
|
protected $buyer_member_id; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string |
34
|
|
|
* Whether you share all of your segments or a list of specific segments with the member. |
35
|
|
|
* Possible values: "all" or "list". If you choose "all", any newly created segments will automatically |
36
|
|
|
* be shared with the buyer member. If you create custom segments that should only be accessible to certain buyers, |
37
|
|
|
* you should use "list" exposure. |
38
|
|
|
* see SEGMENT_EXPOSURE_* |
39
|
|
|
* Required on: POST |
40
|
|
|
*/ |
41
|
|
|
protected $segment_exposure; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var MemberDataSharingSegment[] |
45
|
|
|
* If segment_exposure is "list", the list of segments that you are sharing with the member. |
46
|
|
|
*/ |
47
|
|
|
protected $segments; |
48
|
|
|
|
49
|
|
|
public function getId(): int |
50
|
|
|
{ |
51
|
|
|
return $this->id; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
public function setId(int $id) |
55
|
|
|
{ |
56
|
|
|
$this->id = $id; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
public function getDataMemberId(): int |
60
|
|
|
{ |
61
|
|
|
return $this->data_member_id; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function setDataMemberId(int $data_member_id) |
65
|
|
|
{ |
66
|
|
|
$this->data_member_id = $data_member_id; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function getBuyerMemberId(): int |
70
|
|
|
{ |
71
|
|
|
return $this->buyer_member_id; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
public function setBuyerMemberId(int $buyer_member_id) |
75
|
|
|
{ |
76
|
|
|
$this->buyer_member_id = $buyer_member_id; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function getSegmentExposure(): string |
80
|
|
|
{ |
81
|
|
|
return $this->segment_exposure; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function setSegmentExposure(string $segment_exposure) |
85
|
|
|
{ |
86
|
|
|
$this->segment_exposure = $segment_exposure; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
public function getSegments(): array |
90
|
|
|
{ |
91
|
|
|
return $this->segments ?? []; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
public function setSegments(array $segments) |
95
|
|
|
{ |
96
|
|
|
$this->segments = $segments; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
public function addSegments(MemberDataSharingSegment $segment) |
100
|
|
|
{ |
101
|
|
|
$this->segments[] = $segment; |
102
|
|
|
} |
103
|
|
|
} |
104
|
|
|
|