Coverage for fingerprint_pro_server_api_sdk/models/identification.py: 92%

203 statements  

« prev     ^ index     » next       coverage.py v7.10.1, created at 2025-07-30 17:13 +0000

1# coding: utf-8 

2 

3""" 

4 Fingerprint Server API 

5 

6 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. # noqa: E501 

7 

8 OpenAPI spec version: 3 

9 Contact: support@fingerprint.com 

10 Generated by: https://github.com/swagger-api/swagger-codegen.git 

11""" 

12 

13import re # noqa: F401 

14from typing import Dict, List, Optional # noqa: F401 

15from fingerprint_pro_server_api_sdk.base_model import BaseModel 

16from fingerprint_pro_server_api_sdk.models.browser_details import BrowserDetails 

17from fingerprint_pro_server_api_sdk.models.deprecated_geolocation import DeprecatedGeolocation 

18from datetime import datetime 

19from fingerprint_pro_server_api_sdk.models.tag import Tag 

20from fingerprint_pro_server_api_sdk.models.identification_confidence import IdentificationConfidence 

21from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt 

22from fingerprint_pro_server_api_sdk.models.identification_seen_at import IdentificationSeenAt 

23from fingerprint_pro_server_api_sdk.models.raw_device_attributes import RawDeviceAttributes 

24from fingerprint_pro_server_api_sdk.models.sdk import SDK 

25 

26 

27class Identification(BaseModel): 

28 """NOTE: This class is auto generated by the swagger code generator program. 

29 

30 Do not edit the class manually. 

31 """ 

32 """ 

33 Attributes: 

34 swagger_types (dict): The key is attribute name 

35 and the value is attribute type. 

36 attribute_map (dict): The key is attribute name 

37 and the value is json key in definition. 

38 """ 

39 swagger_types = { 

40 'visitor_id': 'str', 

41 'request_id': 'str', 

42 'browser_details': 'BrowserDetails', 

43 'incognito': 'bool', 

44 'ip': 'str', 

45 'ip_location': 'DeprecatedGeolocation', 

46 'linked_id': 'str', 

47 'suspect': 'bool', 

48 'timestamp': 'int', 

49 'time': 'datetime', 

50 'url': 'str', 

51 'tag': 'Tag', 

52 'confidence': 'IdentificationConfidence', 

53 'visitor_found': 'bool', 

54 'first_seen_at': 'IdentificationSeenAt', 

55 'last_seen_at': 'IdentificationSeenAt', 

56 'components': 'RawDeviceAttributes', 

57 'replayed': 'bool', 

58 'sdk': 'SDK' 

59 } 

60 

61 nullable_map = { 

62 'visitor_id': False, 

63 'request_id': False, 

64 'browser_details': False, 

65 'incognito': False, 

66 'ip': False, 

67 'ip_location': False, 

68 'linked_id': False, 

69 'suspect': False, 

70 'timestamp': False, 

71 'time': False, 

72 'url': False, 

73 'tag': False, 

74 'confidence': False, 

75 'visitor_found': False, 

76 'first_seen_at': False, 

77 'last_seen_at': False, 

78 'components': False, 

79 'replayed': False, 

80 'sdk': False 

81 } 

82 

83 attribute_map = { 

84 'visitor_id': 'visitorId', 

85 'request_id': 'requestId', 

86 'browser_details': 'browserDetails', 

87 'incognito': 'incognito', 

88 'ip': 'ip', 

89 'ip_location': 'ipLocation', 

90 'linked_id': 'linkedId', 

91 'suspect': 'suspect', 

92 'timestamp': 'timestamp', 

93 'time': 'time', 

94 'url': 'url', 

95 'tag': 'tag', 

96 'confidence': 'confidence', 

97 'visitor_found': 'visitorFound', 

98 'first_seen_at': 'firstSeenAt', 

99 'last_seen_at': 'lastSeenAt', 

100 'components': 'components', 

101 'replayed': 'replayed', 

102 'sdk': 'sdk' 

103 } 

104 

105 def __init__(self, visitor_id=None, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=None, suspect=None, timestamp=None, time=None, url=None, tag=None, confidence=None, visitor_found=None, first_seen_at=None, last_seen_at=None, components=None, replayed=None, sdk=None): # noqa: E501 

106 """Identification - a model defined in Swagger""" # noqa: E501 

107 self._visitor_id = None 

108 self._request_id = None 

109 self._browser_details = None 

110 self._incognito = None 

111 self._ip = None 

112 self._ip_location = None 

113 self._linked_id = None 

114 self._suspect = None 

115 self._timestamp = None 

116 self._time = None 

117 self._url = None 

118 self._tag = None 

119 self._confidence = None 

120 self._visitor_found = None 

121 self._first_seen_at = None 

122 self._last_seen_at = None 

123 self._components = None 

124 self._replayed = None 

125 self._sdk = None 

126 self.discriminator = None 

127 self.visitor_id = visitor_id 

128 self.request_id = request_id 

129 self.browser_details = browser_details 

130 self.incognito = incognito 

131 self.ip = ip 

132 if ip_location is not None: 

133 self.ip_location = ip_location 

134 if linked_id is not None: 

135 self.linked_id = linked_id 

136 if suspect is not None: 

137 self.suspect = suspect 

138 self.timestamp = timestamp 

139 self.time = time 

140 self.url = url 

141 self.tag = tag 

142 if confidence is not None: 

143 self.confidence = confidence 

144 self.visitor_found = visitor_found 

145 self.first_seen_at = first_seen_at 

146 self.last_seen_at = last_seen_at 

147 if components is not None: 

148 self.components = components 

149 self.replayed = replayed 

150 if sdk is not None: 

151 self.sdk = sdk 

152 

153 @property 

154 def visitor_id(self) -> str: 

155 """Gets the visitor_id of this Identification. # noqa: E501 

156 

157 String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501 

158 

159 :return: The visitor_id of this Identification. # noqa: E501 

160 """ 

161 return self._visitor_id 

162 

163 @visitor_id.setter 

164 def visitor_id(self, visitor_id: str): 

165 """Sets the visitor_id of this Identification. 

166 

167 String of 20 characters that uniquely identifies the visitor's browser. # noqa: E501 

168 

169 :param visitor_id: The visitor_id of this Identification. # noqa: E501 

170 """ 

171 if visitor_id is None: 

172 raise ValueError("Invalid value for `visitor_id`, must not be `None`") # noqa: E501 

173 

174 self._visitor_id = visitor_id 

175 

176 @property 

177 def request_id(self) -> str: 

178 """Gets the request_id of this Identification. # noqa: E501 

179 

180 Unique identifier of the user's request. # noqa: E501 

181 

182 :return: The request_id of this Identification. # noqa: E501 

183 """ 

184 return self._request_id 

185 

186 @request_id.setter 

187 def request_id(self, request_id: str): 

188 """Sets the request_id of this Identification. 

189 

190 Unique identifier of the user's request. # noqa: E501 

191 

192 :param request_id: The request_id of this Identification. # noqa: E501 

193 """ 

194 if request_id is None: 

195 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501 

196 

197 self._request_id = request_id 

198 

199 @property 

200 def browser_details(self) -> BrowserDetails: 

201 """Gets the browser_details of this Identification. # noqa: E501 

202 

203 

204 :return: The browser_details of this Identification. # noqa: E501 

205 """ 

206 return self._browser_details 

207 

208 @browser_details.setter 

209 def browser_details(self, browser_details: BrowserDetails): 

210 """Sets the browser_details of this Identification. 

211 

212 

213 :param browser_details: The browser_details of this Identification. # noqa: E501 

214 """ 

215 if browser_details is None: 

216 raise ValueError("Invalid value for `browser_details`, must not be `None`") # noqa: E501 

217 

218 self._browser_details = browser_details 

219 

220 @property 

221 def incognito(self) -> bool: 

222 """Gets the incognito of this Identification. # noqa: E501 

223 

224 Flag if user used incognito session. # noqa: E501 

225 

226 :return: The incognito of this Identification. # noqa: E501 

227 """ 

228 return self._incognito 

229 

230 @incognito.setter 

231 def incognito(self, incognito: bool): 

232 """Sets the incognito of this Identification. 

233 

234 Flag if user used incognito session. # noqa: E501 

235 

236 :param incognito: The incognito of this Identification. # noqa: E501 

237 """ 

238 if incognito is None: 

239 raise ValueError("Invalid value for `incognito`, must not be `None`") # noqa: E501 

240 

241 self._incognito = incognito 

242 

243 @property 

244 def ip(self) -> str: 

245 """Gets the ip of this Identification. # noqa: E501 

246 

247 IP address of the requesting browser or bot. # noqa: E501 

248 

249 :return: The ip of this Identification. # noqa: E501 

250 """ 

251 return self._ip 

252 

253 @ip.setter 

254 def ip(self, ip: str): 

255 """Sets the ip of this Identification. 

256 

257 IP address of the requesting browser or bot. # noqa: E501 

258 

259 :param ip: The ip of this Identification. # noqa: E501 

260 """ 

261 if ip is None: 

262 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501 

263 

264 self._ip = ip 

265 

266 @property 

267 def ip_location(self) -> Optional[DeprecatedGeolocation]: 

268 """Gets the ip_location of this Identification. # noqa: E501 

269 

270 

271 :return: The ip_location of this Identification. # noqa: E501 

272 """ 

273 return self._ip_location 

274 

275 @ip_location.setter 

276 def ip_location(self, ip_location: Optional[DeprecatedGeolocation]): 

277 """Sets the ip_location of this Identification. 

278 

279 

280 :param ip_location: The ip_location of this Identification. # noqa: E501 

281 """ 

282 

283 self._ip_location = ip_location 

284 

285 @property 

286 def linked_id(self) -> Optional[str]: 

287 """Gets the linked_id of this Identification. # noqa: E501 

288 

289 A customer-provided id that was sent with the request. # noqa: E501 

290 

291 :return: The linked_id of this Identification. # noqa: E501 

292 """ 

293 return self._linked_id 

294 

295 @linked_id.setter 

296 def linked_id(self, linked_id: Optional[str]): 

297 """Sets the linked_id of this Identification. 

298 

299 A customer-provided id that was sent with the request. # noqa: E501 

300 

301 :param linked_id: The linked_id of this Identification. # noqa: E501 

302 """ 

303 

304 self._linked_id = linked_id 

305 

306 @property 

307 def suspect(self) -> Optional[bool]: 

308 """Gets the suspect of this Identification. # noqa: E501 

309 

310 Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). # noqa: E501 

311 

312 :return: The suspect of this Identification. # noqa: E501 

313 """ 

314 return self._suspect 

315 

316 @suspect.setter 

317 def suspect(self, suspect: Optional[bool]): 

318 """Sets the suspect of this Identification. 

319 

320 Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent). # noqa: E501 

321 

322 :param suspect: The suspect of this Identification. # noqa: E501 

323 """ 

324 

325 self._suspect = suspect 

326 

327 @property 

328 def timestamp(self) -> int: 

329 """Gets the timestamp of this Identification. # noqa: E501 

330 

331 Timestamp of the event with millisecond precision in Unix time. # noqa: E501 

332 

333 :return: The timestamp of this Identification. # noqa: E501 

334 """ 

335 return self._timestamp 

336 

337 @timestamp.setter 

338 def timestamp(self, timestamp: int): 

339 """Sets the timestamp of this Identification. 

340 

341 Timestamp of the event with millisecond precision in Unix time. # noqa: E501 

342 

343 :param timestamp: The timestamp of this Identification. # noqa: E501 

344 """ 

345 if timestamp is None: 

346 raise ValueError("Invalid value for `timestamp`, must not be `None`") # noqa: E501 

347 

348 self._timestamp = timestamp 

349 

350 @property 

351 def time(self) -> datetime: 

352 """Gets the time of this Identification. # noqa: E501 

353 

354 Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. # noqa: E501 

355 

356 :return: The time of this Identification. # noqa: E501 

357 """ 

358 return self._time 

359 

360 @time.setter 

361 def time(self, time: datetime): 

362 """Sets the time of this Identification. 

363 

364 Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. # noqa: E501 

365 

366 :param time: The time of this Identification. # noqa: E501 

367 """ 

368 if time is None: 

369 raise ValueError("Invalid value for `time`, must not be `None`") # noqa: E501 

370 

371 self._time = time 

372 

373 @property 

374 def url(self) -> str: 

375 """Gets the url of this Identification. # noqa: E501 

376 

377 Page URL from which the request was sent. # noqa: E501 

378 

379 :return: The url of this Identification. # noqa: E501 

380 """ 

381 return self._url 

382 

383 @url.setter 

384 def url(self, url: str): 

385 """Sets the url of this Identification. 

386 

387 Page URL from which the request was sent. # noqa: E501 

388 

389 :param url: The url of this Identification. # noqa: E501 

390 """ 

391 if url is None: 

392 raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 

393 

394 self._url = url 

395 

396 @property 

397 def tag(self) -> Tag: 

398 """Gets the tag of this Identification. # noqa: E501 

399 

400 

401 :return: The tag of this Identification. # noqa: E501 

402 """ 

403 return self._tag 

404 

405 @tag.setter 

406 def tag(self, tag: Tag): 

407 """Sets the tag of this Identification. 

408 

409 

410 :param tag: The tag of this Identification. # noqa: E501 

411 """ 

412 if tag is None: 

413 raise ValueError("Invalid value for `tag`, must not be `None`") # noqa: E501 

414 

415 self._tag = tag 

416 

417 @property 

418 def confidence(self) -> Optional[IdentificationConfidence]: 

419 """Gets the confidence of this Identification. # noqa: E501 

420 

421 

422 :return: The confidence of this Identification. # noqa: E501 

423 """ 

424 return self._confidence 

425 

426 @confidence.setter 

427 def confidence(self, confidence: Optional[IdentificationConfidence]): 

428 """Sets the confidence of this Identification. 

429 

430 

431 :param confidence: The confidence of this Identification. # noqa: E501 

432 """ 

433 

434 self._confidence = confidence 

435 

436 @property 

437 def visitor_found(self) -> bool: 

438 """Gets the visitor_found of this Identification. # noqa: E501 

439 

440 Attribute represents if a visitor had been identified before. # noqa: E501 

441 

442 :return: The visitor_found of this Identification. # noqa: E501 

443 """ 

444 return self._visitor_found 

445 

446 @visitor_found.setter 

447 def visitor_found(self, visitor_found: bool): 

448 """Sets the visitor_found of this Identification. 

449 

450 Attribute represents if a visitor had been identified before. # noqa: E501 

451 

452 :param visitor_found: The visitor_found of this Identification. # noqa: E501 

453 """ 

454 if visitor_found is None: 

455 raise ValueError("Invalid value for `visitor_found`, must not be `None`") # noqa: E501 

456 

457 self._visitor_found = visitor_found 

458 

459 @property 

460 def first_seen_at(self) -> IdentificationSeenAt: 

461 """Gets the first_seen_at of this Identification. # noqa: E501 

462 

463 

464 :return: The first_seen_at of this Identification. # noqa: E501 

465 """ 

466 return self._first_seen_at 

467 

468 @first_seen_at.setter 

469 def first_seen_at(self, first_seen_at: IdentificationSeenAt): 

470 """Sets the first_seen_at of this Identification. 

471 

472 

473 :param first_seen_at: The first_seen_at of this Identification. # noqa: E501 

474 """ 

475 if first_seen_at is None: 

476 raise ValueError("Invalid value for `first_seen_at`, must not be `None`") # noqa: E501 

477 

478 self._first_seen_at = first_seen_at 

479 

480 @property 

481 def last_seen_at(self) -> IdentificationSeenAt: 

482 """Gets the last_seen_at of this Identification. # noqa: E501 

483 

484 

485 :return: The last_seen_at of this Identification. # noqa: E501 

486 """ 

487 return self._last_seen_at 

488 

489 @last_seen_at.setter 

490 def last_seen_at(self, last_seen_at: IdentificationSeenAt): 

491 """Sets the last_seen_at of this Identification. 

492 

493 

494 :param last_seen_at: The last_seen_at of this Identification. # noqa: E501 

495 """ 

496 if last_seen_at is None: 

497 raise ValueError("Invalid value for `last_seen_at`, must not be `None`") # noqa: E501 

498 

499 self._last_seen_at = last_seen_at 

500 

501 @property 

502 def components(self) -> Optional[RawDeviceAttributes]: 

503 """Gets the components of this Identification. # noqa: E501 

504 

505 

506 :return: The components of this Identification. # noqa: E501 

507 """ 

508 return self._components 

509 

510 @components.setter 

511 def components(self, components: Optional[RawDeviceAttributes]): 

512 """Sets the components of this Identification. 

513 

514 

515 :param components: The components of this Identification. # noqa: E501 

516 """ 

517 

518 self._components = components 

519 

520 @property 

521 def replayed(self) -> bool: 

522 """Gets the replayed of this Identification. # noqa: E501 

523 

524 `true` if we determined that this payload was replayed, `false` otherwise. # noqa: E501 

525 

526 :return: The replayed of this Identification. # noqa: E501 

527 """ 

528 return self._replayed 

529 

530 @replayed.setter 

531 def replayed(self, replayed: bool): 

532 """Sets the replayed of this Identification. 

533 

534 `true` if we determined that this payload was replayed, `false` otherwise. # noqa: E501 

535 

536 :param replayed: The replayed of this Identification. # noqa: E501 

537 """ 

538 if replayed is None: 

539 raise ValueError("Invalid value for `replayed`, must not be `None`") # noqa: E501 

540 

541 self._replayed = replayed 

542 

543 @property 

544 def sdk(self) -> Optional[SDK]: 

545 """Gets the sdk of this Identification. # noqa: E501 

546 

547 

548 :return: The sdk of this Identification. # noqa: E501 

549 """ 

550 return self._sdk 

551 

552 @sdk.setter 

553 def sdk(self, sdk: Optional[SDK]): 

554 """Sets the sdk of this Identification. 

555 

556 

557 :param sdk: The sdk of this Identification. # noqa: E501 

558 """ 

559 

560 self._sdk = sdk 

561