Coverage for fingerprint_pro_server_api_sdk/models/products_response_identification_data.py: 73%

183 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-03-27 22:39 +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 pprint 

14import re # noqa: F401 

15 

16import six 

17 

18class ProductsResponseIdentificationData(object): 

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

20 

21 Do not edit the class manually. 

22 """ 

23 """ 

24 Attributes: 

25 swagger_types (dict): The key is attribute name 

26 and the value is attribute type. 

27 attribute_map (dict): The key is attribute name 

28 and the value is json key in definition. 

29 """ 

30 swagger_types = { 

31 'request_id': 'str', 

32 'browser_details': 'BrowserDetails', 

33 'incognito': 'bool', 

34 'ip': 'str', 

35 'ip_location': 'DeprecatedIPLocation', 

36 'timestamp': 'int', 

37 'time': 'datetime', 

38 'url': 'str', 

39 'tag': 'dict(str, object)', 

40 'linked_id': 'str', 

41 'confidence': 'Confidence', 

42 'visitor_found': 'bool', 

43 'first_seen_at': 'SeenAt', 

44 'last_seen_at': 'SeenAt', 

45 'visitor_id': 'str' 

46 } 

47 

48 attribute_map = { 

49 'request_id': 'requestId', 

50 'browser_details': 'browserDetails', 

51 'incognito': 'incognito', 

52 'ip': 'ip', 

53 'ip_location': 'ipLocation', 

54 'timestamp': 'timestamp', 

55 'time': 'time', 

56 'url': 'url', 

57 'tag': 'tag', 

58 'linked_id': 'linkedId', 

59 'confidence': 'confidence', 

60 'visitor_found': 'visitorFound', 

61 'first_seen_at': 'firstSeenAt', 

62 'last_seen_at': 'lastSeenAt', 

63 'visitor_id': 'visitorId' 

64 } 

65 

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

67 """ProductsResponseIdentificationData - a model defined in Swagger""" # noqa: E501 

68 self._request_id = None 

69 self._browser_details = None 

70 self._incognito = None 

71 self._ip = None 

72 self._ip_location = None 

73 self._timestamp = None 

74 self._time = None 

75 self._url = None 

76 self._tag = None 

77 self._linked_id = None 

78 self._confidence = None 

79 self._visitor_found = None 

80 self._first_seen_at = None 

81 self._last_seen_at = None 

82 self._visitor_id = None 

83 self.discriminator = None 

84 self.request_id = request_id 

85 self.browser_details = browser_details 

86 self.incognito = incognito 

87 self.ip = ip 

88 if ip_location is not None: 

89 self.ip_location = ip_location 

90 self.timestamp = timestamp 

91 self.time = time 

92 self.url = url 

93 self.tag = tag 

94 if linked_id is not None: 

95 self.linked_id = linked_id 

96 if confidence is not None: 

97 self.confidence = confidence 

98 self.visitor_found = visitor_found 

99 self.first_seen_at = first_seen_at 

100 self.last_seen_at = last_seen_at 

101 self.visitor_id = visitor_id 

102 

103 @property 

104 def request_id(self): 

105 """Gets the request_id of this ProductsResponseIdentificationData. # noqa: E501 

106 

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

108 

109 :return: The request_id of this ProductsResponseIdentificationData. # noqa: E501 

110 :rtype: str 

111 """ 

112 return self._request_id 

113 

114 @request_id.setter 

115 def request_id(self, request_id): 

116 """Sets the request_id of this ProductsResponseIdentificationData. 

117 

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

119 

120 :param request_id: The request_id of this ProductsResponseIdentificationData. # noqa: E501 

121 :type: str 

122 """ 

123 if request_id is None: 

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

125 

126 self._request_id = request_id 

127 

128 @property 

129 def browser_details(self): 

130 """Gets the browser_details of this ProductsResponseIdentificationData. # noqa: E501 

131 

132 

133 :return: The browser_details of this ProductsResponseIdentificationData. # noqa: E501 

134 :rtype: BrowserDetails 

135 """ 

136 return self._browser_details 

137 

138 @browser_details.setter 

139 def browser_details(self, browser_details): 

140 """Sets the browser_details of this ProductsResponseIdentificationData. 

141 

142 

143 :param browser_details: The browser_details of this ProductsResponseIdentificationData. # noqa: E501 

144 :type: BrowserDetails 

145 """ 

146 if browser_details is None: 

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

148 

149 self._browser_details = browser_details 

150 

151 @property 

152 def incognito(self): 

153 """Gets the incognito of this ProductsResponseIdentificationData. # noqa: E501 

154 

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

156 

157 :return: The incognito of this ProductsResponseIdentificationData. # noqa: E501 

158 :rtype: bool 

159 """ 

160 return self._incognito 

161 

162 @incognito.setter 

163 def incognito(self, incognito): 

164 """Sets the incognito of this ProductsResponseIdentificationData. 

165 

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

167 

168 :param incognito: The incognito of this ProductsResponseIdentificationData. # noqa: E501 

169 :type: bool 

170 """ 

171 if incognito is None: 

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

173 

174 self._incognito = incognito 

175 

176 @property 

177 def ip(self): 

178 """Gets the ip of this ProductsResponseIdentificationData. # noqa: E501 

179 

180 

181 :return: The ip of this ProductsResponseIdentificationData. # noqa: E501 

182 :rtype: str 

183 """ 

184 return self._ip 

185 

186 @ip.setter 

187 def ip(self, ip): 

188 """Sets the ip of this ProductsResponseIdentificationData. 

189 

190 

191 :param ip: The ip of this ProductsResponseIdentificationData. # noqa: E501 

192 :type: str 

193 """ 

194 if ip is None: 

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

196 

197 self._ip = ip 

198 

199 @property 

200 def ip_location(self): 

201 """Gets the ip_location of this ProductsResponseIdentificationData. # noqa: E501 

202 

203 

204 :return: The ip_location of this ProductsResponseIdentificationData. # noqa: E501 

205 :rtype: DeprecatedIPLocation 

206 """ 

207 return self._ip_location 

208 

209 @ip_location.setter 

210 def ip_location(self, ip_location): 

211 """Sets the ip_location of this ProductsResponseIdentificationData. 

212 

213 

214 :param ip_location: The ip_location of this ProductsResponseIdentificationData. # noqa: E501 

215 :type: DeprecatedIPLocation 

216 """ 

217 

218 self._ip_location = ip_location 

219 

220 @property 

221 def timestamp(self): 

222 """Gets the timestamp of this ProductsResponseIdentificationData. # noqa: E501 

223 

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

225 

226 :return: The timestamp of this ProductsResponseIdentificationData. # noqa: E501 

227 :rtype: int 

228 """ 

229 return self._timestamp 

230 

231 @timestamp.setter 

232 def timestamp(self, timestamp): 

233 """Sets the timestamp of this ProductsResponseIdentificationData. 

234 

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

236 

237 :param timestamp: The timestamp of this ProductsResponseIdentificationData. # noqa: E501 

238 :type: int 

239 """ 

240 if timestamp is None: 

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

242 

243 self._timestamp = timestamp 

244 

245 @property 

246 def time(self): 

247 """Gets the time of this ProductsResponseIdentificationData. # noqa: E501 

248 

249 Time expressed according to ISO 8601 in UTC format. # noqa: E501 

250 

251 :return: The time of this ProductsResponseIdentificationData. # noqa: E501 

252 :rtype: datetime 

253 """ 

254 return self._time 

255 

256 @time.setter 

257 def time(self, time): 

258 """Sets the time of this ProductsResponseIdentificationData. 

259 

260 Time expressed according to ISO 8601 in UTC format. # noqa: E501 

261 

262 :param time: The time of this ProductsResponseIdentificationData. # noqa: E501 

263 :type: datetime 

264 """ 

265 if time is None: 

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

267 

268 self._time = time 

269 

270 @property 

271 def url(self): 

272 """Gets the url of this ProductsResponseIdentificationData. # noqa: E501 

273 

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

275 

276 :return: The url of this ProductsResponseIdentificationData. # noqa: E501 

277 :rtype: str 

278 """ 

279 return self._url 

280 

281 @url.setter 

282 def url(self, url): 

283 """Sets the url of this ProductsResponseIdentificationData. 

284 

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

286 

287 :param url: The url of this ProductsResponseIdentificationData. # noqa: E501 

288 :type: str 

289 """ 

290 if url is None: 

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

292 

293 self._url = url 

294 

295 @property 

296 def tag(self): 

297 """Gets the tag of this ProductsResponseIdentificationData. # noqa: E501 

298 

299 A customer-provided value or an object that was sent with identification request. # noqa: E501 

300 

301 :return: The tag of this ProductsResponseIdentificationData. # noqa: E501 

302 :rtype: dict(str, object) 

303 """ 

304 return self._tag 

305 

306 @tag.setter 

307 def tag(self, tag): 

308 """Sets the tag of this ProductsResponseIdentificationData. 

309 

310 A customer-provided value or an object that was sent with identification request. # noqa: E501 

311 

312 :param tag: The tag of this ProductsResponseIdentificationData. # noqa: E501 

313 :type: dict(str, object) 

314 """ 

315 if tag is None: 

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

317 

318 self._tag = tag 

319 

320 @property 

321 def linked_id(self): 

322 """Gets the linked_id of this ProductsResponseIdentificationData. # noqa: E501 

323 

324 A customer-provided id that was sent with identification request. # noqa: E501 

325 

326 :return: The linked_id of this ProductsResponseIdentificationData. # noqa: E501 

327 :rtype: str 

328 """ 

329 return self._linked_id 

330 

331 @linked_id.setter 

332 def linked_id(self, linked_id): 

333 """Sets the linked_id of this ProductsResponseIdentificationData. 

334 

335 A customer-provided id that was sent with identification request. # noqa: E501 

336 

337 :param linked_id: The linked_id of this ProductsResponseIdentificationData. # noqa: E501 

338 :type: str 

339 """ 

340 

341 self._linked_id = linked_id 

342 

343 @property 

344 def confidence(self): 

345 """Gets the confidence of this ProductsResponseIdentificationData. # noqa: E501 

346 

347 

348 :return: The confidence of this ProductsResponseIdentificationData. # noqa: E501 

349 :rtype: Confidence 

350 """ 

351 return self._confidence 

352 

353 @confidence.setter 

354 def confidence(self, confidence): 

355 """Sets the confidence of this ProductsResponseIdentificationData. 

356 

357 

358 :param confidence: The confidence of this ProductsResponseIdentificationData. # noqa: E501 

359 :type: Confidence 

360 """ 

361 

362 self._confidence = confidence 

363 

364 @property 

365 def visitor_found(self): 

366 """Gets the visitor_found of this ProductsResponseIdentificationData. # noqa: E501 

367 

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

369 

370 :return: The visitor_found of this ProductsResponseIdentificationData. # noqa: E501 

371 :rtype: bool 

372 """ 

373 return self._visitor_found 

374 

375 @visitor_found.setter 

376 def visitor_found(self, visitor_found): 

377 """Sets the visitor_found of this ProductsResponseIdentificationData. 

378 

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

380 

381 :param visitor_found: The visitor_found of this ProductsResponseIdentificationData. # noqa: E501 

382 :type: bool 

383 """ 

384 if visitor_found is None: 

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

386 

387 self._visitor_found = visitor_found 

388 

389 @property 

390 def first_seen_at(self): 

391 """Gets the first_seen_at of this ProductsResponseIdentificationData. # noqa: E501 

392 

393 

394 :return: The first_seen_at of this ProductsResponseIdentificationData. # noqa: E501 

395 :rtype: SeenAt 

396 """ 

397 return self._first_seen_at 

398 

399 @first_seen_at.setter 

400 def first_seen_at(self, first_seen_at): 

401 """Sets the first_seen_at of this ProductsResponseIdentificationData. 

402 

403 

404 :param first_seen_at: The first_seen_at of this ProductsResponseIdentificationData. # noqa: E501 

405 :type: SeenAt 

406 """ 

407 if first_seen_at is None: 

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

409 

410 self._first_seen_at = first_seen_at 

411 

412 @property 

413 def last_seen_at(self): 

414 """Gets the last_seen_at of this ProductsResponseIdentificationData. # noqa: E501 

415 

416 

417 :return: The last_seen_at of this ProductsResponseIdentificationData. # noqa: E501 

418 :rtype: SeenAt 

419 """ 

420 return self._last_seen_at 

421 

422 @last_seen_at.setter 

423 def last_seen_at(self, last_seen_at): 

424 """Sets the last_seen_at of this ProductsResponseIdentificationData. 

425 

426 

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

428 :type: SeenAt 

429 """ 

430 if last_seen_at is None: 

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

432 

433 self._last_seen_at = last_seen_at 

434 

435 @property 

436 def visitor_id(self): 

437 """Gets the visitor_id of this ProductsResponseIdentificationData. # noqa: E501 

438 

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

440 

441 :return: The visitor_id of this ProductsResponseIdentificationData. # noqa: E501 

442 :rtype: str 

443 """ 

444 return self._visitor_id 

445 

446 @visitor_id.setter 

447 def visitor_id(self, visitor_id): 

448 """Sets the visitor_id of this ProductsResponseIdentificationData. 

449 

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

451 

452 :param visitor_id: The visitor_id of this ProductsResponseIdentificationData. # noqa: E501 

453 :type: str 

454 """ 

455 if visitor_id is None: 

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

457 

458 self._visitor_id = visitor_id 

459 

460 def to_dict(self): 

461 """Returns the model properties as a dict""" 

462 result = {} 

463 

464 for attr, _ in six.iteritems(self.swagger_types): 

465 value = getattr(self, attr) 

466 if isinstance(value, list): 

467 result[attr] = list(map( 

468 lambda x: x.to_dict() if hasattr(x, "to_dict") else x, 

469 value 

470 )) 

471 elif hasattr(value, "to_dict"): 

472 result[attr] = value.to_dict() 

473 elif isinstance(value, dict): 

474 result[attr] = dict(map( 

475 lambda item: (item[0], item[1].to_dict()) 

476 if hasattr(item[1], "to_dict") else item, 

477 value.items() 

478 )) 

479 else: 

480 result[attr] = value 

481 if issubclass(ProductsResponseIdentificationData, dict): 

482 for key, value in self.items(): 

483 result[key] = value 

484 

485 return result 

486 

487 def to_str(self): 

488 """Returns the string representation of the model""" 

489 return pprint.pformat(self.to_dict()) 

490 

491 def __repr__(self): 

492 """For `print` and `pprint`""" 

493 return self.to_str() 

494 

495 def __eq__(self, other): 

496 """Returns true if both objects are equal""" 

497 if not isinstance(other, ProductsResponseIdentificationData): 

498 return False 

499 

500 return self.to_dict() == other.to_dict() 

501 

502 def __ne__(self, other): 

503 """Returns true if both objects are not equal""" 

504 if not isinstance(other, ProductsResponseIdentificationData): 

505 return True 

506 

507 return self.to_dict() != other.to_dict()