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

212 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-15 16:20 +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 'environment_id': 'str' 

60 } 

61 

62 nullable_map = { 

63 'visitor_id': False, 

64 'request_id': False, 

65 'browser_details': False, 

66 'incognito': False, 

67 'ip': False, 

68 'ip_location': False, 

69 'linked_id': False, 

70 'suspect': False, 

71 'timestamp': False, 

72 'time': False, 

73 'url': False, 

74 'tag': False, 

75 'confidence': False, 

76 'visitor_found': False, 

77 'first_seen_at': False, 

78 'last_seen_at': False, 

79 'components': False, 

80 'replayed': False, 

81 'sdk': False, 

82 'environment_id': False 

83 } 

84 

85 attribute_map = { 

86 'visitor_id': 'visitorId', 

87 'request_id': 'requestId', 

88 'browser_details': 'browserDetails', 

89 'incognito': 'incognito', 

90 'ip': 'ip', 

91 'ip_location': 'ipLocation', 

92 'linked_id': 'linkedId', 

93 'suspect': 'suspect', 

94 'timestamp': 'timestamp', 

95 'time': 'time', 

96 'url': 'url', 

97 'tag': 'tag', 

98 'confidence': 'confidence', 

99 'visitor_found': 'visitorFound', 

100 'first_seen_at': 'firstSeenAt', 

101 'last_seen_at': 'lastSeenAt', 

102 'components': 'components', 

103 'replayed': 'replayed', 

104 'sdk': 'sdk', 

105 'environment_id': 'environmentId' 

106 } 

107 

108 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, environment_id=None): # noqa: E501 

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

110 self._visitor_id = None 

111 self._request_id = None 

112 self._browser_details = None 

113 self._incognito = None 

114 self._ip = None 

115 self._ip_location = None 

116 self._linked_id = None 

117 self._suspect = None 

118 self._timestamp = None 

119 self._time = None 

120 self._url = None 

121 self._tag = None 

122 self._confidence = None 

123 self._visitor_found = None 

124 self._first_seen_at = None 

125 self._last_seen_at = None 

126 self._components = None 

127 self._replayed = None 

128 self._sdk = None 

129 self._environment_id = None 

130 self.discriminator = None 

131 self.visitor_id = visitor_id 

132 self.request_id = request_id 

133 self.browser_details = browser_details 

134 self.incognito = incognito 

135 self.ip = ip 

136 if ip_location is not None: 

137 self.ip_location = ip_location 

138 if linked_id is not None: 

139 self.linked_id = linked_id 

140 if suspect is not None: 

141 self.suspect = suspect 

142 self.timestamp = timestamp 

143 self.time = time 

144 self.url = url 

145 self.tag = tag 

146 if confidence is not None: 

147 self.confidence = confidence 

148 self.visitor_found = visitor_found 

149 self.first_seen_at = first_seen_at 

150 self.last_seen_at = last_seen_at 

151 if components is not None: 

152 self.components = components 

153 self.replayed = replayed 

154 if sdk is not None: 

155 self.sdk = sdk 

156 if environment_id is not None: 

157 self.environment_id = environment_id 

158 

159 @property 

160 def visitor_id(self) -> str: 

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

162 

163 String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 

164 

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

166 """ 

167 return self._visitor_id 

168 

169 @visitor_id.setter 

170 def visitor_id(self, visitor_id: str): 

171 """Sets the visitor_id of this Identification. 

172 

173 String of 20 characters that uniquely identifies the visitor's browser or mobile device. # noqa: E501 

174 

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

176 """ 

177 if visitor_id is None: 

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

179 

180 self._visitor_id = visitor_id 

181 

182 @property 

183 def request_id(self) -> str: 

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

185 

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

187 

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

189 """ 

190 return self._request_id 

191 

192 @request_id.setter 

193 def request_id(self, request_id: str): 

194 """Sets the request_id of this Identification. 

195 

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

197 

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

199 """ 

200 if request_id is None: 

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

202 

203 self._request_id = request_id 

204 

205 @property 

206 def browser_details(self) -> BrowserDetails: 

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

208 

209 

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

211 """ 

212 return self._browser_details 

213 

214 @browser_details.setter 

215 def browser_details(self, browser_details: BrowserDetails): 

216 """Sets the browser_details of this Identification. 

217 

218 

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

220 """ 

221 if browser_details is None: 

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

223 

224 self._browser_details = browser_details 

225 

226 @property 

227 def incognito(self) -> bool: 

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

229 

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

231 

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

233 """ 

234 return self._incognito 

235 

236 @incognito.setter 

237 def incognito(self, incognito: bool): 

238 """Sets the incognito of this Identification. 

239 

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

241 

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

243 """ 

244 if incognito is None: 

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

246 

247 self._incognito = incognito 

248 

249 @property 

250 def ip(self) -> str: 

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

252 

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

254 

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

256 """ 

257 return self._ip 

258 

259 @ip.setter 

260 def ip(self, ip: str): 

261 """Sets the ip of this Identification. 

262 

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

264 

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

266 """ 

267 if ip is None: 

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

269 

270 self._ip = ip 

271 

272 @property 

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

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

275 

276 

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

278 """ 

279 return self._ip_location 

280 

281 @ip_location.setter 

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

283 """Sets the ip_location of this Identification. 

284 

285 

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

287 """ 

288 

289 self._ip_location = ip_location 

290 

291 @property 

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

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

294 

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

296 

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

298 """ 

299 return self._linked_id 

300 

301 @linked_id.setter 

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

303 """Sets the linked_id of this Identification. 

304 

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

306 

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

308 """ 

309 

310 self._linked_id = linked_id 

311 

312 @property 

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

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

315 

316 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 

317 

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

319 """ 

320 return self._suspect 

321 

322 @suspect.setter 

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

324 """Sets the suspect of this Identification. 

325 

326 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 

327 

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

329 """ 

330 

331 self._suspect = suspect 

332 

333 @property 

334 def timestamp(self) -> int: 

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

336 

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

338 

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

340 """ 

341 return self._timestamp 

342 

343 @timestamp.setter 

344 def timestamp(self, timestamp: int): 

345 """Sets the timestamp of this Identification. 

346 

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

348 

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

350 """ 

351 if timestamp is None: 

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

353 

354 self._timestamp = timestamp 

355 

356 @property 

357 def time(self) -> datetime: 

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

359 

360 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 

361 

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

363 """ 

364 return self._time 

365 

366 @time.setter 

367 def time(self, time: datetime): 

368 """Sets the time of this Identification. 

369 

370 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 

371 

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

373 """ 

374 if time is None: 

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

376 

377 self._time = time 

378 

379 @property 

380 def url(self) -> str: 

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

382 

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

384 

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

386 """ 

387 return self._url 

388 

389 @url.setter 

390 def url(self, url: str): 

391 """Sets the url of this Identification. 

392 

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

394 

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

396 """ 

397 if url is None: 

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

399 

400 self._url = url 

401 

402 @property 

403 def tag(self) -> Tag: 

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

405 

406 

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

408 """ 

409 return self._tag 

410 

411 @tag.setter 

412 def tag(self, tag: Tag): 

413 """Sets the tag of this Identification. 

414 

415 

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

417 """ 

418 if tag is None: 

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

420 

421 self._tag = tag 

422 

423 @property 

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

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

426 

427 

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

429 """ 

430 return self._confidence 

431 

432 @confidence.setter 

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

434 """Sets the confidence of this Identification. 

435 

436 

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

438 """ 

439 

440 self._confidence = confidence 

441 

442 @property 

443 def visitor_found(self) -> bool: 

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

445 

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

447 

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

449 """ 

450 return self._visitor_found 

451 

452 @visitor_found.setter 

453 def visitor_found(self, visitor_found: bool): 

454 """Sets the visitor_found of this Identification. 

455 

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

457 

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

459 """ 

460 if visitor_found is None: 

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

462 

463 self._visitor_found = visitor_found 

464 

465 @property 

466 def first_seen_at(self) -> IdentificationSeenAt: 

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

468 

469 

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

471 """ 

472 return self._first_seen_at 

473 

474 @first_seen_at.setter 

475 def first_seen_at(self, first_seen_at: IdentificationSeenAt): 

476 """Sets the first_seen_at of this Identification. 

477 

478 

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

480 """ 

481 if first_seen_at is None: 

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

483 

484 self._first_seen_at = first_seen_at 

485 

486 @property 

487 def last_seen_at(self) -> IdentificationSeenAt: 

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

489 

490 

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

492 """ 

493 return self._last_seen_at 

494 

495 @last_seen_at.setter 

496 def last_seen_at(self, last_seen_at: IdentificationSeenAt): 

497 """Sets the last_seen_at of this Identification. 

498 

499 

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

501 """ 

502 if last_seen_at is None: 

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

504 

505 self._last_seen_at = last_seen_at 

506 

507 @property 

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

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

510 

511 

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

513 """ 

514 return self._components 

515 

516 @components.setter 

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

518 """Sets the components of this Identification. 

519 

520 

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

522 """ 

523 

524 self._components = components 

525 

526 @property 

527 def replayed(self) -> bool: 

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

529 

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

531 

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

533 """ 

534 return self._replayed 

535 

536 @replayed.setter 

537 def replayed(self, replayed: bool): 

538 """Sets the replayed of this Identification. 

539 

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

541 

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

543 """ 

544 if replayed is None: 

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

546 

547 self._replayed = replayed 

548 

549 @property 

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

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

552 

553 

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

555 """ 

556 return self._sdk 

557 

558 @sdk.setter 

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

560 """Sets the sdk of this Identification. 

561 

562 

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

564 """ 

565 

566 self._sdk = sdk 

567 

568 @property 

569 def environment_id(self) -> Optional[str]: 

570 """Gets the environment_id of this Identification. # noqa: E501 

571 

572 Environment ID associated with the event # noqa: E501 

573 

574 :return: The environment_id of this Identification. # noqa: E501 

575 """ 

576 return self._environment_id 

577 

578 @environment_id.setter 

579 def environment_id(self, environment_id: Optional[str]): 

580 """Sets the environment_id of this Identification. 

581 

582 Environment ID associated with the event # noqa: E501 

583 

584 :param environment_id: The environment_id of this Identification. # noqa: E501 

585 """ 

586 

587 self._environment_id = environment_id 

588