|
1
|
|
|
<?php |
|
2
|
|
|
namespace Dropbox\Models; |
|
3
|
|
|
|
|
4
|
|
|
class FileRequest extends BaseModel |
|
5
|
|
|
{ |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* A unique identifier of the file request |
|
9
|
|
|
* |
|
10
|
|
|
* @var string |
|
11
|
|
|
*/ |
|
12
|
|
|
protected $id; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* The url. |
|
16
|
|
|
* |
|
17
|
|
|
* @var string |
|
18
|
|
|
*/ |
|
19
|
|
|
protected $url; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* The title. |
|
23
|
|
|
* |
|
24
|
|
|
* @var string |
|
25
|
|
|
*/ |
|
26
|
|
|
protected $title; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* The destination. |
|
30
|
|
|
* |
|
31
|
|
|
* @var string |
|
32
|
|
|
*/ |
|
33
|
|
|
protected $destination; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* The created. |
|
37
|
|
|
* |
|
38
|
|
|
* @var DateTime |
|
39
|
|
|
*/ |
|
40
|
|
|
protected $created; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* The is_open. |
|
44
|
|
|
* |
|
45
|
|
|
* @var bool |
|
46
|
|
|
*/ |
|
47
|
|
|
protected $is_open; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* The file_count. |
|
51
|
|
|
* |
|
52
|
|
|
* @var int |
|
53
|
|
|
*/ |
|
54
|
|
|
protected $file_count; |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* Set if this file is contained in a shared folder. |
|
58
|
|
|
* |
|
59
|
|
|
* @var \Dropbox\Models\FileRequestDeadline |
|
60
|
|
|
*/ |
|
61
|
|
|
protected $deadline; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* Create a new FileRequest instance |
|
65
|
|
|
* |
|
66
|
|
|
* @param array $data |
|
67
|
|
|
*/ |
|
68
|
|
|
public function __construct(array $data) |
|
69
|
|
|
{ |
|
70
|
|
|
parent::__construct($data); |
|
71
|
|
|
$this->id = $this->getDataProperty('id'); |
|
72
|
|
|
$this->url = $this->getDataProperty('url'); |
|
73
|
|
|
$this->title = $this->getDataProperty('title'); |
|
74
|
|
|
$this->destination = $this->getDataProperty('destination'); |
|
75
|
|
|
$this->created = $this->getDataProperty('created'); |
|
76
|
|
|
$this->is_open = $this->getDataProperty('is_open'); |
|
77
|
|
|
$this->file_count = $this->getDataProperty('file_count'); |
|
78
|
|
|
$this->deadline = $this->getDataProperty('deadline'); |
|
79
|
|
|
if (is_array($this->deadline)) { |
|
80
|
|
|
$this->deadline = new FileRequestDeadline($this->deadline); |
|
81
|
|
|
} |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
|
|
/** |
|
85
|
|
|
* Get the 'id' property of the file request model. |
|
86
|
|
|
* |
|
87
|
|
|
* @return string |
|
88
|
|
|
*/ |
|
89
|
|
|
public function getId() |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->id; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Get the 'url' property of the file request model. |
|
96
|
|
|
* |
|
97
|
|
|
* @return string |
|
98
|
|
|
*/ |
|
99
|
|
|
public function getUrl() |
|
100
|
|
|
{ |
|
101
|
|
|
return $this->url; |
|
102
|
|
|
} |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* Get the 'title' property of the file request model. |
|
106
|
|
|
* |
|
107
|
|
|
* @return string |
|
108
|
|
|
*/ |
|
109
|
|
|
public function getTitle() |
|
110
|
|
|
{ |
|
111
|
|
|
return $this->title; |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
|
|
/** |
|
115
|
|
|
* Get the 'destination' property of the file request model. |
|
116
|
|
|
* |
|
117
|
|
|
* @return string |
|
118
|
|
|
*/ |
|
119
|
|
|
public function getDestination() |
|
120
|
|
|
{ |
|
121
|
|
|
return $this->destination; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
/** |
|
125
|
|
|
* Get the 'created' property of the file request model. |
|
126
|
|
|
* |
|
127
|
|
|
* @return DateTime |
|
128
|
|
|
*/ |
|
129
|
|
|
public function getCreated() |
|
130
|
|
|
{ |
|
131
|
|
|
return $this->created; |
|
132
|
|
|
} |
|
133
|
|
|
|
|
134
|
|
|
/** |
|
135
|
|
|
* Get the 'is_open' property of the file request model. |
|
136
|
|
|
* |
|
137
|
|
|
* @return bool |
|
138
|
|
|
*/ |
|
139
|
|
|
public function isOpen() |
|
140
|
|
|
{ |
|
141
|
|
|
return $this->is_open; |
|
142
|
|
|
} |
|
143
|
|
|
|
|
144
|
|
|
/** |
|
145
|
|
|
* Get the 'file_count' property of the file request model. |
|
146
|
|
|
* |
|
147
|
|
|
* @return int |
|
148
|
|
|
*/ |
|
149
|
|
|
public function getFileCount() |
|
150
|
|
|
{ |
|
151
|
|
|
return $this->file_count; |
|
152
|
|
|
} |
|
153
|
|
|
|
|
154
|
|
|
/** |
|
155
|
|
|
* Get the 'deadline' property of the file request model. |
|
156
|
|
|
* |
|
157
|
|
|
* @return \Dropbox\Models\FileRequestDeadline |
|
158
|
|
|
*/ |
|
159
|
|
|
public function getDeadline() |
|
160
|
|
|
{ |
|
161
|
|
|
return $this->deadline; |
|
162
|
|
|
} |
|
163
|
|
|
} |
|
164
|
|
|
|