1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Yandex PHP Library |
4
|
|
|
* |
5
|
|
|
* @copyright NIX Solutions Ltd. |
6
|
|
|
* @link https://github.com/nixsolutions/yandex-php-library |
7
|
|
|
*/ |
8
|
|
|
namespace Yandex\DataSync\Responses; |
9
|
|
|
|
10
|
|
|
use Yandex\Common\Model; |
11
|
|
|
use Yandex\DataSync\Models\DatabaseSnapshotRecords; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class DatabaseSnapshotResponse |
15
|
|
|
* |
16
|
|
|
* @package Yandex\DataSync\Responses |
17
|
|
|
* @author Alexander Khaylo <[email protected]> |
18
|
|
|
*/ |
19
|
|
|
class DatabaseSnapshotResponse extends Model |
20
|
|
|
{ |
21
|
|
|
protected $propNameMap = [ |
22
|
|
|
'records_count' => 'recordsCount', |
23
|
|
|
'database_id' => 'databaseId' |
24
|
|
|
]; |
25
|
|
|
|
26
|
|
|
protected $mappingClasses = [ |
27
|
|
|
'records' => 'Yandex\DataSync\Models\DatabaseSnapshotRecords', |
28
|
|
|
]; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* The number of entries in the database. |
32
|
|
|
* |
33
|
|
|
* @var int |
34
|
|
|
*/ |
35
|
|
|
protected $recordsCount; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Date of creation database. |
39
|
|
|
* |
40
|
|
|
* @var int |
41
|
|
|
*/ |
42
|
|
|
protected $created; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Date of last modification. |
46
|
|
|
* |
47
|
|
|
* @var int |
48
|
|
|
*/ |
49
|
|
|
protected $modified; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* ID of the database. |
53
|
|
|
* |
54
|
|
|
* @var string |
55
|
|
|
*/ |
56
|
|
|
protected $databaseId; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Number of the current revision. |
60
|
|
|
* |
61
|
|
|
* @var integer |
62
|
|
|
*/ |
63
|
|
|
protected $revision; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Database Size in bytes. |
67
|
|
|
* |
68
|
|
|
* @var integer |
69
|
|
|
*/ |
70
|
|
|
protected $size; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @var DatabaseSnapshotRecords |
74
|
|
|
*/ |
75
|
|
|
protected $records; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return int |
79
|
|
|
*/ |
80
|
2 |
|
public function getCreated() |
81
|
|
|
{ |
82
|
2 |
|
return $this->created; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @param int $created |
87
|
|
|
*/ |
88
|
1 |
|
public function setCreated($created) |
89
|
|
|
{ |
90
|
1 |
|
$this->created = $created; |
91
|
1 |
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* @return string |
95
|
|
|
*/ |
96
|
3 |
|
public function getDatabaseId() |
97
|
|
|
{ |
98
|
3 |
|
return $this->databaseId; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @param string $databaseId |
103
|
|
|
*/ |
104
|
1 |
|
public function setDatabaseId($databaseId) |
105
|
|
|
{ |
106
|
1 |
|
$this->databaseId = $databaseId; |
107
|
1 |
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @return int |
111
|
|
|
*/ |
112
|
2 |
|
public function getModified() |
113
|
|
|
{ |
114
|
2 |
|
return $this->modified; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @param int $modified |
119
|
|
|
*/ |
120
|
1 |
|
public function setModified($modified) |
121
|
|
|
{ |
122
|
1 |
|
$this->modified = $modified; |
123
|
1 |
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @return DatabaseSnapshotRecords |
127
|
|
|
*/ |
128
|
2 |
|
public function getRecords() |
129
|
|
|
{ |
130
|
2 |
|
return $this->records; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @param DatabaseSnapshotRecords $records |
135
|
|
|
*/ |
136
|
1 |
|
public function setRecords($records) |
137
|
|
|
{ |
138
|
1 |
|
$this->records = $records; |
139
|
1 |
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @return int |
143
|
|
|
*/ |
144
|
2 |
|
public function getRecordsCount() |
145
|
|
|
{ |
146
|
2 |
|
return $this->recordsCount; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
/** |
150
|
|
|
* @param int $recordsCount |
151
|
|
|
*/ |
152
|
1 |
|
public function setRecordsCount($recordsCount) |
153
|
|
|
{ |
154
|
1 |
|
$this->recordsCount = $recordsCount; |
155
|
1 |
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* @return int |
159
|
|
|
*/ |
160
|
3 |
|
public function getRevision() |
161
|
|
|
{ |
162
|
3 |
|
return $this->revision; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* @param int $revision |
167
|
|
|
*/ |
168
|
1 |
|
public function setRevision($revision) |
169
|
|
|
{ |
170
|
1 |
|
$this->revision = $revision; |
171
|
1 |
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* @return int |
175
|
|
|
*/ |
176
|
2 |
|
public function getSize() |
177
|
|
|
{ |
178
|
2 |
|
return $this->size; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* @param int $size |
183
|
|
|
*/ |
184
|
1 |
|
public function setSize($size) |
185
|
|
|
{ |
186
|
1 |
|
$this->size = $size; |
187
|
1 |
|
} |
188
|
|
|
} |
189
|
|
|
|