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

183 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-02-21 15:03 +0000

1# coding: utf-8 

2 

3""" 

4 Fingerprint Pro Server API 

5 

6 Fingerprint Pro Server API allows you to get information about visitors and about individual 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 

24 

25 

26class Identification(BaseModel): 

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

28 

29 Do not edit the class manually. 

30 """ 

31 """ 

32 Attributes: 

33 swagger_types (dict): The key is attribute name 

34 and the value is attribute type. 

35 attribute_map (dict): The key is attribute name 

36 and the value is json key in definition. 

37 """ 

38 swagger_types = { 

39 'visitor_id': 'str', 

40 'request_id': 'str', 

41 'browser_details': 'BrowserDetails', 

42 'incognito': 'bool', 

43 'ip': 'str', 

44 'ip_location': 'DeprecatedGeolocation', 

45 'linked_id': 'str', 

46 'suspect': 'bool', 

47 'timestamp': 'int', 

48 'time': 'datetime', 

49 'url': 'str', 

50 'tag': 'Tag', 

51 'confidence': 'IdentificationConfidence', 

52 'visitor_found': 'bool', 

53 'first_seen_at': 'IdentificationSeenAt', 

54 'last_seen_at': 'IdentificationSeenAt', 

55 'components': 'RawDeviceAttributes' 

56 } 

57 

58 nullable_map = { 

59 'visitor_id': False, 

60 'request_id': False, 

61 'browser_details': False, 

62 'incognito': False, 

63 'ip': False, 

64 'ip_location': False, 

65 'linked_id': False, 

66 'suspect': False, 

67 'timestamp': False, 

68 'time': False, 

69 'url': False, 

70 'tag': False, 

71 'confidence': False, 

72 'visitor_found': False, 

73 'first_seen_at': False, 

74 'last_seen_at': False, 

75 'components': False 

76 } 

77 

78 attribute_map = { 

79 'visitor_id': 'visitorId', 

80 'request_id': 'requestId', 

81 'browser_details': 'browserDetails', 

82 'incognito': 'incognito', 

83 'ip': 'ip', 

84 'ip_location': 'ipLocation', 

85 'linked_id': 'linkedId', 

86 'suspect': 'suspect', 

87 'timestamp': 'timestamp', 

88 'time': 'time', 

89 'url': 'url', 

90 'tag': 'tag', 

91 'confidence': 'confidence', 

92 'visitor_found': 'visitorFound', 

93 'first_seen_at': 'firstSeenAt', 

94 'last_seen_at': 'lastSeenAt', 

95 'components': 'components' 

96 } 

97 

98 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): # noqa: E501 

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

100 self._visitor_id = None 

101 self._request_id = None 

102 self._browser_details = None 

103 self._incognito = None 

104 self._ip = None 

105 self._ip_location = None 

106 self._linked_id = None 

107 self._suspect = None 

108 self._timestamp = None 

109 self._time = None 

110 self._url = None 

111 self._tag = None 

112 self._confidence = None 

113 self._visitor_found = None 

114 self._first_seen_at = None 

115 self._last_seen_at = None 

116 self._components = None 

117 self.discriminator = None 

118 self.visitor_id = visitor_id 

119 self.request_id = request_id 

120 self.browser_details = browser_details 

121 self.incognito = incognito 

122 self.ip = ip 

123 if ip_location is not None: 

124 self.ip_location = ip_location 

125 if linked_id is not None: 

126 self.linked_id = linked_id 

127 if suspect is not None: 

128 self.suspect = suspect 

129 self.timestamp = timestamp 

130 self.time = time 

131 self.url = url 

132 self.tag = tag 

133 if confidence is not None: 

134 self.confidence = confidence 

135 self.visitor_found = visitor_found 

136 self.first_seen_at = first_seen_at 

137 self.last_seen_at = last_seen_at 

138 if components is not None: 

139 self.components = components 

140 

141 @property 

142 def visitor_id(self) -> str: 

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

144 

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

146 

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

148 """ 

149 return self._visitor_id 

150 

151 @visitor_id.setter 

152 def visitor_id(self, visitor_id: str): 

153 """Sets the visitor_id of this Identification. 

154 

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

156 

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

158 """ 

159 if visitor_id is None: 

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

161 

162 self._visitor_id = visitor_id 

163 

164 @property 

165 def request_id(self) -> str: 

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

167 

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

169 

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

171 """ 

172 return self._request_id 

173 

174 @request_id.setter 

175 def request_id(self, request_id: str): 

176 """Sets the request_id of this Identification. 

177 

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

179 

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

181 """ 

182 if request_id is None: 

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

184 

185 self._request_id = request_id 

186 

187 @property 

188 def browser_details(self) -> BrowserDetails: 

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

190 

191 

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

193 """ 

194 return self._browser_details 

195 

196 @browser_details.setter 

197 def browser_details(self, browser_details: BrowserDetails): 

198 """Sets the browser_details of this Identification. 

199 

200 

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

202 """ 

203 if browser_details is None: 

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

205 

206 self._browser_details = browser_details 

207 

208 @property 

209 def incognito(self) -> bool: 

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

211 

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

213 

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

215 """ 

216 return self._incognito 

217 

218 @incognito.setter 

219 def incognito(self, incognito: bool): 

220 """Sets the incognito of this Identification. 

221 

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

223 

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

225 """ 

226 if incognito is None: 

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

228 

229 self._incognito = incognito 

230 

231 @property 

232 def ip(self) -> str: 

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

234 

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

236 

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

238 """ 

239 return self._ip 

240 

241 @ip.setter 

242 def ip(self, ip: str): 

243 """Sets the ip of this Identification. 

244 

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

246 

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

248 """ 

249 if ip is None: 

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

251 

252 self._ip = ip 

253 

254 @property 

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

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

257 

258 

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

260 """ 

261 return self._ip_location 

262 

263 @ip_location.setter 

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

265 """Sets the ip_location of this Identification. 

266 

267 

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

269 """ 

270 

271 self._ip_location = ip_location 

272 

273 @property 

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

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

276 

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

278 

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

280 """ 

281 return self._linked_id 

282 

283 @linked_id.setter 

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

285 """Sets the linked_id of this Identification. 

286 

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

288 

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

290 """ 

291 

292 self._linked_id = linked_id 

293 

294 @property 

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

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

297 

298 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 

299 

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

301 """ 

302 return self._suspect 

303 

304 @suspect.setter 

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

306 """Sets the suspect of this Identification. 

307 

308 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 

309 

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

311 """ 

312 

313 self._suspect = suspect 

314 

315 @property 

316 def timestamp(self) -> int: 

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

318 

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

320 

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

322 """ 

323 return self._timestamp 

324 

325 @timestamp.setter 

326 def timestamp(self, timestamp: int): 

327 """Sets the timestamp of this Identification. 

328 

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

330 

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

332 """ 

333 if timestamp is None: 

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

335 

336 self._timestamp = timestamp 

337 

338 @property 

339 def time(self) -> datetime: 

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

341 

342 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 

343 

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

345 """ 

346 return self._time 

347 

348 @time.setter 

349 def time(self, time: datetime): 

350 """Sets the time of this Identification. 

351 

352 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 

353 

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

355 """ 

356 if time is None: 

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

358 

359 self._time = time 

360 

361 @property 

362 def url(self) -> str: 

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

364 

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

366 

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

368 """ 

369 return self._url 

370 

371 @url.setter 

372 def url(self, url: str): 

373 """Sets the url of this Identification. 

374 

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

376 

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

378 """ 

379 if url is None: 

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

381 

382 self._url = url 

383 

384 @property 

385 def tag(self) -> Tag: 

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

387 

388 

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

390 """ 

391 return self._tag 

392 

393 @tag.setter 

394 def tag(self, tag: Tag): 

395 """Sets the tag of this Identification. 

396 

397 

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

399 """ 

400 if tag is None: 

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

402 

403 self._tag = tag 

404 

405 @property 

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

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

408 

409 

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

411 """ 

412 return self._confidence 

413 

414 @confidence.setter 

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

416 """Sets the confidence of this Identification. 

417 

418 

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

420 """ 

421 

422 self._confidence = confidence 

423 

424 @property 

425 def visitor_found(self) -> bool: 

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

427 

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

429 

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

431 """ 

432 return self._visitor_found 

433 

434 @visitor_found.setter 

435 def visitor_found(self, visitor_found: bool): 

436 """Sets the visitor_found of this Identification. 

437 

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

439 

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

441 """ 

442 if visitor_found is None: 

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

444 

445 self._visitor_found = visitor_found 

446 

447 @property 

448 def first_seen_at(self) -> IdentificationSeenAt: 

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

450 

451 

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

453 """ 

454 return self._first_seen_at 

455 

456 @first_seen_at.setter 

457 def first_seen_at(self, first_seen_at: IdentificationSeenAt): 

458 """Sets the first_seen_at of this Identification. 

459 

460 

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

462 """ 

463 if first_seen_at is None: 

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

465 

466 self._first_seen_at = first_seen_at 

467 

468 @property 

469 def last_seen_at(self) -> IdentificationSeenAt: 

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

471 

472 

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

474 """ 

475 return self._last_seen_at 

476 

477 @last_seen_at.setter 

478 def last_seen_at(self, last_seen_at: IdentificationSeenAt): 

479 """Sets the last_seen_at of this Identification. 

480 

481 

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

483 """ 

484 if last_seen_at is None: 

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

486 

487 self._last_seen_at = last_seen_at 

488 

489 @property 

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

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

492 

493 

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

495 """ 

496 return self._components 

497 

498 @components.setter 

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

500 """Sets the components of this Identification. 

501 

502 

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

504 """ 

505 

506 self._components = components 

507