Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
31.58% |
12 / 38 |
|
33.33% |
7 / 21 |
CRAP | |
0.00% |
0 / 1 |
| Tampering | |
31.58% |
12 / 38 |
|
33.33% |
7 / 21 |
298.38 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
4 | |||
| __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 / 8 |
|
0.00% |
0 / 1 |
20 | |||
| valid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getResult | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setResult | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getAnomalyScore | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAnomalyScore | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getAntiDetectBrowser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAntiDetectBrowser | |
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 | * Tampering. |
| 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 | * Tampering 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 Tampering implements ModelInterface, \ArrayAccess |
| 42 | { |
| 43 | /** |
| 44 | * The original name of the model. |
| 45 | * |
| 46 | */ |
| 47 | protected static string $swaggerModelName = 'Tampering'; |
| 48 | |
| 49 | /** |
| 50 | * Array of property to type mappings. Used for (de)serialization. |
| 51 | * |
| 52 | * @var string[] |
| 53 | */ |
| 54 | protected static array $swaggerTypes = [ |
| 55 | 'result' => 'bool', |
| 56 | 'anomaly_score' => 'double', |
| 57 | 'anti_detect_browser' => 'bool']; |
| 58 | |
| 59 | /** |
| 60 | * Array of property to format mappings. Used for (de)serialization. |
| 61 | * |
| 62 | * @var string[] |
| 63 | */ |
| 64 | protected static array $swaggerFormats = [ |
| 65 | 'result' => null, |
| 66 | 'anomaly_score' => 'double', |
| 67 | 'anti_detect_browser' => null]; |
| 68 | |
| 69 | /** |
| 70 | * Array of attributes where the key is the local name, |
| 71 | * and the value is the original name. |
| 72 | * |
| 73 | * @var string[] |
| 74 | */ |
| 75 | protected static array $attributeMap = [ |
| 76 | 'result' => 'result', |
| 77 | 'anomaly_score' => 'anomalyScore', |
| 78 | 'anti_detect_browser' => 'antiDetectBrowser']; |
| 79 | |
| 80 | /** |
| 81 | * Array of attributes to setter functions (for deserialization of responses). |
| 82 | * |
| 83 | * @var string[] |
| 84 | */ |
| 85 | protected static array $setters = [ |
| 86 | 'result' => 'setResult', |
| 87 | 'anomaly_score' => 'setAnomalyScore', |
| 88 | 'anti_detect_browser' => 'setAntiDetectBrowser']; |
| 89 | |
| 90 | /** |
| 91 | * Array of attributes to getter functions (for serialization of requests). |
| 92 | * |
| 93 | * @var string[] |
| 94 | */ |
| 95 | protected static array $getters = [ |
| 96 | 'result' => 'getResult', |
| 97 | 'anomaly_score' => 'getAnomalyScore', |
| 98 | 'anti_detect_browser' => 'getAntiDetectBrowser']; |
| 99 | |
| 100 | /** |
| 101 | * Associative array for storing property values. |
| 102 | * |
| 103 | * @var mixed[] |
| 104 | */ |
| 105 | protected array $container = []; |
| 106 | |
| 107 | /** |
| 108 | * Constructor. |
| 109 | * |
| 110 | * @param mixed[] $data Associated array of property values |
| 111 | * initializing the model |
| 112 | */ |
| 113 | public function __construct(?array $data = null) |
| 114 | { |
| 115 | $this->container['result'] = isset($data['result']) ? $data['result'] : null; |
| 116 | $this->container['anomaly_score'] = isset($data['anomaly_score']) ? $data['anomaly_score'] : null; |
| 117 | $this->container['anti_detect_browser'] = isset($data['anti_detect_browser']) ? $data['anti_detect_browser'] : null; |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * Gets the string presentation of the object. |
| 122 | * |
| 123 | */ |
| 124 | public function __toString(): string |
| 125 | { |
| 126 | return json_encode(ObjectSerializer::sanitizeForSerialization($this)); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Array of property to type mappings. Used for (de)serialization. |
| 131 | */ |
| 132 | public static function swaggerTypes(): array |
| 133 | { |
| 134 | return self::$swaggerTypes; |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * Array of property to format mappings. Used for (de)serialization. |
| 139 | */ |
| 140 | public static function swaggerFormats(): array |
| 141 | { |
| 142 | return self::$swaggerFormats; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Array of attributes where the key is the local name, |
| 147 | * and the value is the original name. |
| 148 | */ |
| 149 | public static function attributeMap(): array |
| 150 | { |
| 151 | return self::$attributeMap; |
| 152 | } |
| 153 | |
| 154 | /** |
| 155 | * Array of attributes to setter functions (for deserialization of responses). |
| 156 | */ |
| 157 | public static function setters(): array |
| 158 | { |
| 159 | return self::$setters; |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Array of attributes to getter functions (for serialization of requests). |
| 164 | */ |
| 165 | public static function getters(): array |
| 166 | { |
| 167 | return self::$getters; |
| 168 | } |
| 169 | |
| 170 | /** |
| 171 | * The original name of the model. |
| 172 | */ |
| 173 | public function getModelName(): string |
| 174 | { |
| 175 | return self::$swaggerModelName; |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Show all the invalid properties with reasons. |
| 180 | * |
| 181 | * @return array invalid properties with reasons |
| 182 | */ |
| 183 | public function listInvalidProperties(): array |
| 184 | { |
| 185 | $invalidProperties = []; |
| 186 | |
| 187 | if (null === $this->container['result']) { |
| 188 | $invalidProperties[] = "'result' can't be null"; |
| 189 | } |
| 190 | if (null === $this->container['anomaly_score']) { |
| 191 | $invalidProperties[] = "'anomaly_score' can't be null"; |
| 192 | } |
| 193 | if (null === $this->container['anti_detect_browser']) { |
| 194 | $invalidProperties[] = "'anti_detect_browser' can't be null"; |
| 195 | } |
| 196 | |
| 197 | return $invalidProperties; |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Validate all the properties in the model |
| 202 | * return true if all passed. |
| 203 | * |
| 204 | * @return bool True if all properties are valid |
| 205 | */ |
| 206 | public function valid(): bool |
| 207 | { |
| 208 | return 0 === count($this->listInvalidProperties()); |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Gets result. |
| 213 | */ |
| 214 | public function getResult(): bool |
| 215 | { |
| 216 | return $this->container['result']; |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Sets result. |
| 221 | * |
| 222 | * @param bool $result Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. |
| 223 | * |
| 224 | * @return $this |
| 225 | */ |
| 226 | public function setResult(bool $result): self |
| 227 | { |
| 228 | $this->container['result'] = $result; |
| 229 | |
| 230 | return $this; |
| 231 | } |
| 232 | |
| 233 | /** |
| 234 | * Gets anomaly_score. |
| 235 | */ |
| 236 | public function getAnomalyScore(): float |
| 237 | { |
| 238 | return $this->container['anomaly_score']; |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Sets anomaly_score. |
| 243 | * |
| 244 | * @param float $anomaly_score A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. |
| 245 | * |
| 246 | * @return $this |
| 247 | */ |
| 248 | public function setAnomalyScore(float $anomaly_score): self |
| 249 | { |
| 250 | $this->container['anomaly_score'] = $anomaly_score; |
| 251 | |
| 252 | return $this; |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Gets anti_detect_browser. |
| 257 | */ |
| 258 | public function getAntiDetectBrowser(): bool |
| 259 | { |
| 260 | return $this->container['anti_detect_browser']; |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * Sets anti_detect_browser. |
| 265 | * |
| 266 | * @param bool $anti_detect_browser Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. |
| 267 | * |
| 268 | * @return $this |
| 269 | */ |
| 270 | public function setAntiDetectBrowser(bool $anti_detect_browser): self |
| 271 | { |
| 272 | $this->container['anti_detect_browser'] = $anti_detect_browser; |
| 273 | |
| 274 | return $this; |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * Returns true if offset exists. False otherwise. |
| 279 | * |
| 280 | * @param int $offset Offset |
| 281 | */ |
| 282 | public function offsetExists($offset): bool |
| 283 | { |
| 284 | return isset($this->container[$offset]); |
| 285 | } |
| 286 | |
| 287 | /** |
| 288 | * Gets offset. |
| 289 | * |
| 290 | * @param int $offset Offset |
| 291 | */ |
| 292 | public function offsetGet($offset): mixed |
| 293 | { |
| 294 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
| 295 | } |
| 296 | |
| 297 | /** |
| 298 | * Sets value based on offset. |
| 299 | * |
| 300 | * @param int $offset Offset |
| 301 | * @param mixed $value Value to be set |
| 302 | */ |
| 303 | public function offsetSet($offset, mixed $value): void |
| 304 | { |
| 305 | if (is_null($offset)) { |
| 306 | $this->container[] = $value; |
| 307 | } else { |
| 308 | $this->container[$offset] = $value; |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | /** |
| 313 | * Unsets offset. |
| 314 | * |
| 315 | * @param int $offset Offset |
| 316 | */ |
| 317 | public function offsetUnset($offset): void |
| 318 | { |
| 319 | unset($this->container[$offset]); |
| 320 | } |
| 321 | |
| 322 | /** |
| 323 | * Gets the string presentation of the object in a pretty JSON format. |
| 324 | * |
| 325 | */ |
| 326 | public function toPrettyString(): string |
| 327 | { |
| 328 | return json_encode( |
| 329 | ObjectSerializer::sanitizeForSerialization($this), |
| 330 | JSON_PRETTY_PRINT |
| 331 | ); |
| 332 | } |
| 333 | } |