Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
31.25% |
10 / 32 |
|
36.84% |
7 / 19 |
CRAP | |
0.00% |
0 / 1 |
| FactoryReset | |
31.25% |
10 / 32 |
|
36.84% |
7 / 19 |
228.09 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
3 | |||
| __toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| swaggerTypes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| swaggerFormats | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| attributeMap | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setters | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getters | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getModelName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| listInvalidProperties | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
12 | |||
| valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getTime | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setTime | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTimestamp | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| offsetExists | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| offsetGet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
| offsetSet | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| offsetUnset | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| toPrettyString | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * FactoryReset. |
| 4 | * |
| 5 | * @category Class |
| 6 | * |
| 7 | * @author Swagger Codegen team |
| 8 | * |
| 9 | * @see https://github.com/swagger-api/swagger-codegen |
| 10 | */ |
| 11 | |
| 12 | /** |
| 13 | * Fingerprint Server API. |
| 14 | * |
| 15 | * Fingerprint Server API allows you to search, update, and delete identification events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. |
| 16 | * |
| 17 | * OpenAPI spec version: 3 |
| 18 | * Contact: support@fingerprint.com |
| 19 | * Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 20 | * Swagger Codegen version: 3.0.34 |
| 21 | */ |
| 22 | /** |
| 23 | * NOTE: This class is auto generated by the swagger code generator program. |
| 24 | * https://github.com/swagger-api/swagger-codegen |
| 25 | * Do not edit the class manually. |
| 26 | */ |
| 27 | |
| 28 | namespace Fingerprint\ServerAPI\Model; |
| 29 | |
| 30 | use Fingerprint\ServerAPI\ObjectSerializer; |
| 31 | |
| 32 | /** |
| 33 | * FactoryReset Class Doc Comment. |
| 34 | * |
| 35 | * @category Class |
| 36 | * |
| 37 | * @author Swagger Codegen team |
| 38 | * |
| 39 | * @see https://github.com/swagger-api/swagger-codegen |
| 40 | */ |
| 41 | class FactoryReset implements ModelInterface, \ArrayAccess |
| 42 | { |
| 43 | /** |
| 44 | * The original name of the model. |
| 45 | * |
| 46 | */ |
| 47 | protected static string $swaggerModelName = 'FactoryReset'; |
| 48 | |
| 49 | /** |
| 50 | * Array of property to type mappings. Used for (de)serialization. |
| 51 | * |
| 52 | * @var string[] |
| 53 | */ |
| 54 | protected static array $swaggerTypes = [ |
| 55 | 'time' => '\DateTime', |
| 56 | 'timestamp' => 'int']; |
| 57 | |
| 58 | /** |
| 59 | * Array of property to format mappings. Used for (de)serialization. |
| 60 | * |
| 61 | * @var string[] |
| 62 | */ |
| 63 | protected static array $swaggerFormats = [ |
| 64 | 'time' => 'date-time', |
| 65 | 'timestamp' => 'int64']; |
| 66 | |
| 67 | /** |
| 68 | * Array of attributes where the key is the local name, |
| 69 | * and the value is the original name. |
| 70 | * |
| 71 | * @var string[] |
| 72 | */ |
| 73 | protected static array $attributeMap = [ |
| 74 | 'time' => 'time', |
| 75 | 'timestamp' => 'timestamp']; |
| 76 | |
| 77 | /** |
| 78 | * Array of attributes to setter functions (for deserialization of responses). |
| 79 | * |
| 80 | * @var string[] |
| 81 | */ |
| 82 | protected static array $setters = [ |
| 83 | 'time' => 'setTime', |
| 84 | 'timestamp' => 'setTimestamp']; |
| 85 | |
| 86 | /** |
| 87 | * Array of attributes to getter functions (for serialization of requests). |
| 88 | * |
| 89 | * @var string[] |
| 90 | */ |
| 91 | protected static array $getters = [ |
| 92 | 'time' => 'getTime', |
| 93 | 'timestamp' => 'getTimestamp']; |
| 94 | |
| 95 | /** |
| 96 | * Associative array for storing property values. |
| 97 | * |
| 98 | * @var mixed[] |
| 99 | */ |
| 100 | protected array $container = []; |
| 101 | |
| 102 | /** |
| 103 | * Constructor. |
| 104 | * |
| 105 | * @param mixed[] $data Associated array of property values |
| 106 | * initializing the model |
| 107 | */ |
| 108 | public function __construct(?array $data = null) |
| 109 | { |
| 110 | $this->container['time'] = isset($data['time']) ? $data['time'] : null; |
| 111 | $this->container['timestamp'] = isset($data['timestamp']) ? $data['timestamp'] : null; |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Gets the string presentation of the object. |
| 116 | * |
| 117 | */ |
| 118 | public function __toString(): string |
| 119 | { |
| 120 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Array of property to type mappings. Used for (de)serialization. |
| 125 | */ |
| 126 | public static function swaggerTypes(): array |
| 127 | { |
| 128 | return self::$swaggerTypes; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Array of property to format mappings. Used for (de)serialization. |
| 133 | */ |
| 134 | public static function swaggerFormats(): array |
| 135 | { |
| 136 | return self::$swaggerFormats; |
| 137 | } |
| 138 | |
| 139 | /** |
| 140 | * Array of attributes where the key is the local name, |
| 141 | * and the value is the original name. |
| 142 | */ |
| 143 | public static function attributeMap(): array |
| 144 | { |
| 145 | return self::$attributeMap; |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Array of attributes to setter functions (for deserialization of responses). |
| 150 | */ |
| 151 | public static function setters(): array |
| 152 | { |
| 153 | return self::$setters; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Array of attributes to getter functions (for serialization of requests). |
| 158 | */ |
| 159 | public static function getters(): array |
| 160 | { |
| 161 | return self::$getters; |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * The original name of the model. |
| 166 | */ |
| 167 | public function getModelName(): string |
| 168 | { |
| 169 | return self::$swaggerModelName; |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Show all the invalid properties with reasons. |
| 174 | * |
| 175 | * @return array invalid properties with reasons |
| 176 | */ |
| 177 | public function listInvalidProperties(): array |
| 178 | { |
| 179 | $invalidProperties = []; |
| 180 | |
| 181 | if (null === $this->container['time']) { |
| 182 | $invalidProperties[] = "'time' can't be null"; |
| 183 | } |
| 184 | if (null === $this->container['timestamp']) { |
| 185 | $invalidProperties[] = "'timestamp' can't be null"; |
| 186 | } |
| 187 | |
| 188 | return $invalidProperties; |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * Validate all the properties in the model |
| 193 | * return true if all passed. |
| 194 | * |
| 195 | * @return bool True if all properties are valid |
| 196 | */ |
| 197 | public function valid(): bool |
| 198 | { |
| 199 | return 0 === count($this->listInvalidProperties()); |
| 200 | } |
| 201 | |
| 202 | /** |
| 203 | * Gets time. |
| 204 | */ |
| 205 | public function getTime(): \DateTime |
| 206 | { |
| 207 | return $this->container['time']; |
| 208 | } |
| 209 | |
| 210 | /** |
| 211 | * Sets time. |
| 212 | * |
| 213 | * @param \DateTime $time Indicates the time (in UTC) of the most recent factory reset that happened on the **mobile device**. When a factory reset cannot be detected on the mobile device or when the request is initiated from a browser, this field will correspond to the *epoch* time (i.e 1 Jan 1970 UTC). See [Factory Reset Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) to learn more about this Smart Signal. |
| 214 | * |
| 215 | * @return $this |
| 216 | */ |
| 217 | public function setTime(\DateTime $time): self |
| 218 | { |
| 219 | $this->container['time'] = $time; |
| 220 | |
| 221 | return $this; |
| 222 | } |
| 223 | |
| 224 | /** |
| 225 | * Gets timestamp. |
| 226 | */ |
| 227 | public function getTimestamp(): int |
| 228 | { |
| 229 | return $this->container['timestamp']; |
| 230 | } |
| 231 | |
| 232 | /** |
| 233 | * Sets timestamp. |
| 234 | * |
| 235 | * @param int $timestamp This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time. |
| 236 | * |
| 237 | * @return $this |
| 238 | */ |
| 239 | public function setTimestamp(int $timestamp): self |
| 240 | { |
| 241 | $this->container['timestamp'] = $timestamp; |
| 242 | |
| 243 | return $this; |
| 244 | } |
| 245 | |
| 246 | /** |
| 247 | * Returns true if offset exists. False otherwise. |
| 248 | * |
| 249 | * @param int $offset Offset |
| 250 | */ |
| 251 | public function offsetExists($offset): bool |
| 252 | { |
| 253 | return isset($this->container[$offset]); |
| 254 | } |
| 255 | |
| 256 | /** |
| 257 | * Gets offset. |
| 258 | * |
| 259 | * @param int $offset Offset |
| 260 | */ |
| 261 | public function offsetGet($offset): mixed |
| 262 | { |
| 263 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * Sets value based on offset. |
| 268 | * |
| 269 | * @param int $offset Offset |
| 270 | * @param mixed $value Value to be set |
| 271 | */ |
| 272 | public function offsetSet($offset, mixed $value): void |
| 273 | { |
| 274 | if (is_null($offset)) { |
| 275 | $this->container[] = $value; |
| 276 | } else { |
| 277 | $this->container[$offset] = $value; |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | /** |
| 282 | * Unsets offset. |
| 283 | * |
| 284 | * @param int $offset Offset |
| 285 | */ |
| 286 | public function offsetUnset($offset): void |
| 287 | { |
| 288 | unset($this->container[$offset]); |
| 289 | } |
| 290 | |
| 291 | /** |
| 292 | * Gets the string presentation of the object in a pretty JSON format. |
| 293 | * |
| 294 | */ |
| 295 | public function toPrettyString(): string |
| 296 | { |
| 297 | return json_encode( |
| 298 | ObjectSerializer::sanitizeForSerialization($this), |
| 299 | JSON_PRETTY_PRINT |
| 300 | ); |
| 301 | } |
| 302 | } |