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

182 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2024-12-09 17:50 +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 attribute_map = { 

59 'visitor_id': 'visitorId', 

60 'request_id': 'requestId', 

61 'browser_details': 'browserDetails', 

62 'incognito': 'incognito', 

63 'ip': 'ip', 

64 'ip_location': 'ipLocation', 

65 'linked_id': 'linkedId', 

66 'suspect': 'suspect', 

67 'timestamp': 'timestamp', 

68 'time': 'time', 

69 'url': 'url', 

70 'tag': 'tag', 

71 'confidence': 'confidence', 

72 'visitor_found': 'visitorFound', 

73 'first_seen_at': 'firstSeenAt', 

74 'last_seen_at': 'lastSeenAt', 

75 'components': 'components' 

76 } 

77 

78 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 

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

80 self._visitor_id = None 

81 self._request_id = None 

82 self._browser_details = None 

83 self._incognito = None 

84 self._ip = None 

85 self._ip_location = None 

86 self._linked_id = None 

87 self._suspect = None 

88 self._timestamp = None 

89 self._time = None 

90 self._url = None 

91 self._tag = None 

92 self._confidence = None 

93 self._visitor_found = None 

94 self._first_seen_at = None 

95 self._last_seen_at = None 

96 self._components = None 

97 self.discriminator = None 

98 self.visitor_id = visitor_id 

99 self.request_id = request_id 

100 self.browser_details = browser_details 

101 self.incognito = incognito 

102 self.ip = ip 

103 if ip_location is not None: 

104 self.ip_location = ip_location 

105 if linked_id is not None: 

106 self.linked_id = linked_id 

107 if suspect is not None: 

108 self.suspect = suspect 

109 self.timestamp = timestamp 

110 self.time = time 

111 self.url = url 

112 self.tag = tag 

113 if confidence is not None: 

114 self.confidence = confidence 

115 self.visitor_found = visitor_found 

116 self.first_seen_at = first_seen_at 

117 self.last_seen_at = last_seen_at 

118 if components is not None: 

119 self.components = components 

120 

121 @property 

122 def visitor_id(self) -> str: 

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

124 

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

126 

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

128 """ 

129 return self._visitor_id 

130 

131 @visitor_id.setter 

132 def visitor_id(self, visitor_id: str): 

133 """Sets the visitor_id of this Identification. 

134 

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

136 

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

138 """ 

139 if visitor_id is None: 

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

141 

142 self._visitor_id = visitor_id 

143 

144 @property 

145 def request_id(self) -> str: 

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

147 

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

149 

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

151 """ 

152 return self._request_id 

153 

154 @request_id.setter 

155 def request_id(self, request_id: str): 

156 """Sets the request_id of this Identification. 

157 

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

159 

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

161 """ 

162 if request_id is None: 

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

164 

165 self._request_id = request_id 

166 

167 @property 

168 def browser_details(self) -> BrowserDetails: 

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

170 

171 

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

173 """ 

174 return self._browser_details 

175 

176 @browser_details.setter 

177 def browser_details(self, browser_details: BrowserDetails): 

178 """Sets the browser_details of this Identification. 

179 

180 

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

182 """ 

183 if browser_details is None: 

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

185 

186 self._browser_details = browser_details 

187 

188 @property 

189 def incognito(self) -> bool: 

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

191 

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

193 

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

195 """ 

196 return self._incognito 

197 

198 @incognito.setter 

199 def incognito(self, incognito: bool): 

200 """Sets the incognito of this Identification. 

201 

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

203 

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

205 """ 

206 if incognito is None: 

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

208 

209 self._incognito = incognito 

210 

211 @property 

212 def ip(self) -> str: 

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

214 

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

216 

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

218 """ 

219 return self._ip 

220 

221 @ip.setter 

222 def ip(self, ip: str): 

223 """Sets the ip of this Identification. 

224 

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

226 

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

228 """ 

229 if ip is None: 

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

231 

232 self._ip = ip 

233 

234 @property 

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

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

237 

238 

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

240 """ 

241 return self._ip_location 

242 

243 @ip_location.setter 

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

245 """Sets the ip_location of this Identification. 

246 

247 

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

249 """ 

250 

251 self._ip_location = ip_location 

252 

253 @property 

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

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

256 

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

258 

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

260 """ 

261 return self._linked_id 

262 

263 @linked_id.setter 

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

265 """Sets the linked_id of this Identification. 

266 

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

268 

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

270 """ 

271 

272 self._linked_id = linked_id 

273 

274 @property 

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

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

277 

278 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 

279 

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

281 """ 

282 return self._suspect 

283 

284 @suspect.setter 

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

286 """Sets the suspect of this Identification. 

287 

288 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 

289 

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

291 """ 

292 

293 self._suspect = suspect 

294 

295 @property 

296 def timestamp(self) -> int: 

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

298 

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

300 

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

302 """ 

303 return self._timestamp 

304 

305 @timestamp.setter 

306 def timestamp(self, timestamp: int): 

307 """Sets the timestamp of this Identification. 

308 

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

310 

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

312 """ 

313 if timestamp is None: 

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

315 

316 self._timestamp = timestamp 

317 

318 @property 

319 def time(self) -> datetime: 

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

321 

322 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 

323 

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

325 """ 

326 return self._time 

327 

328 @time.setter 

329 def time(self, time: datetime): 

330 """Sets the time of this Identification. 

331 

332 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 

333 

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

335 """ 

336 if time is None: 

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

338 

339 self._time = time 

340 

341 @property 

342 def url(self) -> str: 

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

344 

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

346 

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

348 """ 

349 return self._url 

350 

351 @url.setter 

352 def url(self, url: str): 

353 """Sets the url of this Identification. 

354 

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

356 

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

358 """ 

359 if url is None: 

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

361 

362 self._url = url 

363 

364 @property 

365 def tag(self) -> Tag: 

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

367 

368 

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

370 """ 

371 return self._tag 

372 

373 @tag.setter 

374 def tag(self, tag: Tag): 

375 """Sets the tag of this Identification. 

376 

377 

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

379 """ 

380 if tag is None: 

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

382 

383 self._tag = tag 

384 

385 @property 

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

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

388 

389 

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

391 """ 

392 return self._confidence 

393 

394 @confidence.setter 

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

396 """Sets the confidence of this Identification. 

397 

398 

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

400 """ 

401 

402 self._confidence = confidence 

403 

404 @property 

405 def visitor_found(self) -> bool: 

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

407 

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

409 

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

411 """ 

412 return self._visitor_found 

413 

414 @visitor_found.setter 

415 def visitor_found(self, visitor_found: bool): 

416 """Sets the visitor_found of this Identification. 

417 

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

419 

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

421 """ 

422 if visitor_found is None: 

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

424 

425 self._visitor_found = visitor_found 

426 

427 @property 

428 def first_seen_at(self) -> IdentificationSeenAt: 

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

430 

431 

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

433 """ 

434 return self._first_seen_at 

435 

436 @first_seen_at.setter 

437 def first_seen_at(self, first_seen_at: IdentificationSeenAt): 

438 """Sets the first_seen_at of this Identification. 

439 

440 

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

442 """ 

443 if first_seen_at is None: 

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

445 

446 self._first_seen_at = first_seen_at 

447 

448 @property 

449 def last_seen_at(self) -> IdentificationSeenAt: 

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

451 

452 

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

454 """ 

455 return self._last_seen_at 

456 

457 @last_seen_at.setter 

458 def last_seen_at(self, last_seen_at: IdentificationSeenAt): 

459 """Sets the last_seen_at of this Identification. 

460 

461 

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

463 """ 

464 if last_seen_at is None: 

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

466 

467 self._last_seen_at = last_seen_at 

468 

469 @property 

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

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

472 

473 

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

475 """ 

476 return self._components 

477 

478 @components.setter 

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

480 """Sets the components of this Identification. 

481 

482 

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

484 """ 

485 

486 self._components = components 

487