Coverage for fingerprint_pro_server_api_sdk/models/visit.py: 82%

164 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 Visit(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 'request_id': 'str', 

40 'browser_details': 'BrowserDetails', 

41 'incognito': 'bool', 

42 'ip': 'str', 

43 'ip_location': 'DeprecatedGeolocation', 

44 'linked_id': 'str', 

45 'timestamp': 'int', 

46 'time': 'datetime', 

47 'url': 'str', 

48 'tag': 'Tag', 

49 'confidence': 'IdentificationConfidence', 

50 'visitor_found': 'bool', 

51 'first_seen_at': 'IdentificationSeenAt', 

52 'last_seen_at': 'IdentificationSeenAt', 

53 'components': 'RawDeviceAttributes' 

54 } 

55 

56 nullable_map = { 

57 'request_id': False, 

58 'browser_details': False, 

59 'incognito': False, 

60 'ip': False, 

61 'ip_location': False, 

62 'linked_id': False, 

63 'timestamp': False, 

64 'time': False, 

65 'url': False, 

66 'tag': False, 

67 'confidence': False, 

68 'visitor_found': False, 

69 'first_seen_at': False, 

70 'last_seen_at': False, 

71 'components': False 

72 } 

73 

74 attribute_map = { 

75 'request_id': 'requestId', 

76 'browser_details': 'browserDetails', 

77 'incognito': 'incognito', 

78 'ip': 'ip', 

79 'ip_location': 'ipLocation', 

80 'linked_id': 'linkedId', 

81 'timestamp': 'timestamp', 

82 'time': 'time', 

83 'url': 'url', 

84 'tag': 'tag', 

85 'confidence': 'confidence', 

86 'visitor_found': 'visitorFound', 

87 'first_seen_at': 'firstSeenAt', 

88 'last_seen_at': 'lastSeenAt', 

89 'components': 'components' 

90 } 

91 

92 def __init__(self, request_id=None, browser_details=None, incognito=None, ip=None, ip_location=None, linked_id=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 

93 """Visit - a model defined in Swagger""" # noqa: E501 

94 self._request_id = None 

95 self._browser_details = None 

96 self._incognito = None 

97 self._ip = None 

98 self._ip_location = None 

99 self._linked_id = None 

100 self._timestamp = None 

101 self._time = None 

102 self._url = None 

103 self._tag = None 

104 self._confidence = None 

105 self._visitor_found = None 

106 self._first_seen_at = None 

107 self._last_seen_at = None 

108 self._components = None 

109 self.discriminator = None 

110 self.request_id = request_id 

111 self.browser_details = browser_details 

112 self.incognito = incognito 

113 self.ip = ip 

114 if ip_location is not None: 

115 self.ip_location = ip_location 

116 if linked_id is not None: 

117 self.linked_id = linked_id 

118 self.timestamp = timestamp 

119 self.time = time 

120 self.url = url 

121 self.tag = tag 

122 if confidence is not None: 

123 self.confidence = confidence 

124 self.visitor_found = visitor_found 

125 self.first_seen_at = first_seen_at 

126 self.last_seen_at = last_seen_at 

127 if components is not None: 

128 self.components = components 

129 

130 @property 

131 def request_id(self) -> str: 

132 """Gets the request_id of this Visit. # noqa: E501 

133 

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

135 

136 :return: The request_id of this Visit. # noqa: E501 

137 """ 

138 return self._request_id 

139 

140 @request_id.setter 

141 def request_id(self, request_id: str): 

142 """Sets the request_id of this Visit. 

143 

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

145 

146 :param request_id: The request_id of this Visit. # noqa: E501 

147 """ 

148 if request_id is None: 

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

150 

151 self._request_id = request_id 

152 

153 @property 

154 def browser_details(self) -> BrowserDetails: 

155 """Gets the browser_details of this Visit. # noqa: E501 

156 

157 

158 :return: The browser_details of this Visit. # noqa: E501 

159 """ 

160 return self._browser_details 

161 

162 @browser_details.setter 

163 def browser_details(self, browser_details: BrowserDetails): 

164 """Sets the browser_details of this Visit. 

165 

166 

167 :param browser_details: The browser_details of this Visit. # noqa: E501 

168 """ 

169 if browser_details is None: 

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

171 

172 self._browser_details = browser_details 

173 

174 @property 

175 def incognito(self) -> bool: 

176 """Gets the incognito of this Visit. # noqa: E501 

177 

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

179 

180 :return: The incognito of this Visit. # noqa: E501 

181 """ 

182 return self._incognito 

183 

184 @incognito.setter 

185 def incognito(self, incognito: bool): 

186 """Sets the incognito of this Visit. 

187 

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

189 

190 :param incognito: The incognito of this Visit. # noqa: E501 

191 """ 

192 if incognito is None: 

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

194 

195 self._incognito = incognito 

196 

197 @property 

198 def ip(self) -> str: 

199 """Gets the ip of this Visit. # noqa: E501 

200 

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

202 

203 :return: The ip of this Visit. # noqa: E501 

204 """ 

205 return self._ip 

206 

207 @ip.setter 

208 def ip(self, ip: str): 

209 """Sets the ip of this Visit. 

210 

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

212 

213 :param ip: The ip of this Visit. # noqa: E501 

214 """ 

215 if ip is None: 

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

217 

218 self._ip = ip 

219 

220 @property 

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

222 """Gets the ip_location of this Visit. # noqa: E501 

223 

224 

225 :return: The ip_location of this Visit. # noqa: E501 

226 """ 

227 return self._ip_location 

228 

229 @ip_location.setter 

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

231 """Sets the ip_location of this Visit. 

232 

233 

234 :param ip_location: The ip_location of this Visit. # noqa: E501 

235 """ 

236 

237 self._ip_location = ip_location 

238 

239 @property 

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

241 """Gets the linked_id of this Visit. # noqa: E501 

242 

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

244 

245 :return: The linked_id of this Visit. # noqa: E501 

246 """ 

247 return self._linked_id 

248 

249 @linked_id.setter 

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

251 """Sets the linked_id of this Visit. 

252 

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

254 

255 :param linked_id: The linked_id of this Visit. # noqa: E501 

256 """ 

257 

258 self._linked_id = linked_id 

259 

260 @property 

261 def timestamp(self) -> int: 

262 """Gets the timestamp of this Visit. # noqa: E501 

263 

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

265 

266 :return: The timestamp of this Visit. # noqa: E501 

267 """ 

268 return self._timestamp 

269 

270 @timestamp.setter 

271 def timestamp(self, timestamp: int): 

272 """Sets the timestamp of this Visit. 

273 

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

275 

276 :param timestamp: The timestamp of this Visit. # noqa: E501 

277 """ 

278 if timestamp is None: 

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

280 

281 self._timestamp = timestamp 

282 

283 @property 

284 def time(self) -> datetime: 

285 """Gets the time of this Visit. # noqa: E501 

286 

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

288 

289 :return: The time of this Visit. # noqa: E501 

290 """ 

291 return self._time 

292 

293 @time.setter 

294 def time(self, time: datetime): 

295 """Sets the time of this Visit. 

296 

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

298 

299 :param time: The time of this Visit. # noqa: E501 

300 """ 

301 if time is None: 

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

303 

304 self._time = time 

305 

306 @property 

307 def url(self) -> str: 

308 """Gets the url of this Visit. # noqa: E501 

309 

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

311 

312 :return: The url of this Visit. # noqa: E501 

313 """ 

314 return self._url 

315 

316 @url.setter 

317 def url(self, url: str): 

318 """Sets the url of this Visit. 

319 

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

321 

322 :param url: The url of this Visit. # noqa: E501 

323 """ 

324 if url is None: 

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

326 

327 self._url = url 

328 

329 @property 

330 def tag(self) -> Tag: 

331 """Gets the tag of this Visit. # noqa: E501 

332 

333 

334 :return: The tag of this Visit. # noqa: E501 

335 """ 

336 return self._tag 

337 

338 @tag.setter 

339 def tag(self, tag: Tag): 

340 """Sets the tag of this Visit. 

341 

342 

343 :param tag: The tag of this Visit. # noqa: E501 

344 """ 

345 if tag is None: 

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

347 

348 self._tag = tag 

349 

350 @property 

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

352 """Gets the confidence of this Visit. # noqa: E501 

353 

354 

355 :return: The confidence of this Visit. # noqa: E501 

356 """ 

357 return self._confidence 

358 

359 @confidence.setter 

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

361 """Sets the confidence of this Visit. 

362 

363 

364 :param confidence: The confidence of this Visit. # noqa: E501 

365 """ 

366 

367 self._confidence = confidence 

368 

369 @property 

370 def visitor_found(self) -> bool: 

371 """Gets the visitor_found of this Visit. # noqa: E501 

372 

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

374 

375 :return: The visitor_found of this Visit. # noqa: E501 

376 """ 

377 return self._visitor_found 

378 

379 @visitor_found.setter 

380 def visitor_found(self, visitor_found: bool): 

381 """Sets the visitor_found of this Visit. 

382 

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

384 

385 :param visitor_found: The visitor_found of this Visit. # noqa: E501 

386 """ 

387 if visitor_found is None: 

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

389 

390 self._visitor_found = visitor_found 

391 

392 @property 

393 def first_seen_at(self) -> IdentificationSeenAt: 

394 """Gets the first_seen_at of this Visit. # noqa: E501 

395 

396 

397 :return: The first_seen_at of this Visit. # noqa: E501 

398 """ 

399 return self._first_seen_at 

400 

401 @first_seen_at.setter 

402 def first_seen_at(self, first_seen_at: IdentificationSeenAt): 

403 """Sets the first_seen_at of this Visit. 

404 

405 

406 :param first_seen_at: The first_seen_at of this Visit. # noqa: E501 

407 """ 

408 if first_seen_at is None: 

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

410 

411 self._first_seen_at = first_seen_at 

412 

413 @property 

414 def last_seen_at(self) -> IdentificationSeenAt: 

415 """Gets the last_seen_at of this Visit. # noqa: E501 

416 

417 

418 :return: The last_seen_at of this Visit. # noqa: E501 

419 """ 

420 return self._last_seen_at 

421 

422 @last_seen_at.setter 

423 def last_seen_at(self, last_seen_at: IdentificationSeenAt): 

424 """Sets the last_seen_at of this Visit. 

425 

426 

427 :param last_seen_at: The last_seen_at of this Visit. # noqa: E501 

428 """ 

429 if last_seen_at is None: 

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

431 

432 self._last_seen_at = last_seen_at 

433 

434 @property 

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

436 """Gets the components of this Visit. # noqa: E501 

437 

438 

439 :return: The components of this Visit. # noqa: E501 

440 """ 

441 return self._components 

442 

443 @components.setter 

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

445 """Sets the components of this Visit. 

446 

447 

448 :param components: The components of this Visit. # noqa: E501 

449 """ 

450 

451 self._components = components 

452