Coverage for fingerprint_pro_server_api_sdk/models/tampering.py: 90%

63 statements  

« prev     ^ index     » next       coverage.py v7.14.2, created at 2026-06-22 14:27 +0000

1# coding: utf-8 

2 

3""" 

4 Server API v3 (deprecated) 

5 

6 > 🚧 Deprecation Notice > > This version of Server API is marked as deprecated starting on **Jan 7th 2026** and will be fully defunct on **Jan 7th 2027** according to our [API Deprecation Policy](https://dev.fingerprint.com/reference/api-deprecation-policy). If you still use this version, please follow our [migration guide](https://dev.fingerprint.com/reference/migrating-from-server-api-v3-to-v4) to migrate from this deprecated version to the new one. 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 

16 

17 

18class Tampering(BaseModel): 

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 'result': 'bool', 

32 'confidence': 'str', 

33 'anomaly_score': 'float', 

34 'ml_score': 'float', 

35 'anti_detect_browser': 'bool' 

36 } 

37 

38 nullable_map = { 

39 'result': False, 

40 'confidence': False, 

41 'anomaly_score': False, 

42 'ml_score': False, 

43 'anti_detect_browser': False 

44 } 

45 

46 attribute_map = { 

47 'result': 'result', 

48 'confidence': 'confidence', 

49 'anomaly_score': 'anomalyScore', 

50 'ml_score': 'mlScore', 

51 'anti_detect_browser': 'antiDetectBrowser' 

52 } 

53 

54 def __init__(self, result=None, confidence=None, anomaly_score=None, ml_score=None, anti_detect_browser=None): # noqa: E501 

55 """Tampering - a model defined in Swagger""" # noqa: E501 

56 self._result = None 

57 self._confidence = None 

58 self._anomaly_score = None 

59 self._ml_score = None 

60 self._anti_detect_browser = None 

61 self.discriminator = None 

62 self.result = result 

63 self.confidence = confidence 

64 self.anomaly_score = anomaly_score 

65 self.ml_score = ml_score 

66 self.anti_detect_browser = anti_detect_browser 

67 

68 @property 

69 def result(self) -> bool: 

70 """Gets the result of this Tampering. # noqa: E501 

71 

72 Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. # noqa: E501 

73 

74 :return: The result of this Tampering. # noqa: E501 

75 """ 

76 return self._result 

77 

78 @result.setter 

79 def result(self, result: bool): 

80 """Sets the result of this Tampering. 

81 

82 Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. # noqa: E501 

83 

84 :param result: The result of this Tampering. # noqa: E501 

85 """ 

86 if result is None: 

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

88 

89 self._result = result 

90 

91 @property 

92 def confidence(self) -> str: 

93 """Gets the confidence of this Tampering. # noqa: E501 

94 

95 Confidence level of the tampering detection. If a tampering is not detected, confidence is \"high\". If it's detected, can be \"low\", \"medium\", or \"high\". # noqa: E501 

96 

97 :return: The confidence of this Tampering. # noqa: E501 

98 """ 

99 return self._confidence 

100 

101 @confidence.setter 

102 def confidence(self, confidence: str): 

103 """Sets the confidence of this Tampering. 

104 

105 Confidence level of the tampering detection. If a tampering is not detected, confidence is \"high\". If it's detected, can be \"low\", \"medium\", or \"high\". # noqa: E501 

106 

107 :param confidence: The confidence of this Tampering. # noqa: E501 

108 """ 

109 if confidence is None: 

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

111 allowed_values = ["low", "medium", "high"] # noqa: E501 

112 if (confidence not in allowed_values): 

113 raise ValueError( 

114 "Invalid value for `confidence` ({0}), must be one of {1}" # noqa: E501 

115 .format(confidence, allowed_values) 

116 ) 

117 

118 self._confidence = confidence 

119 

120 @property 

121 def anomaly_score(self) -> float: 

122 """Gets the anomaly_score of this Tampering. # noqa: E501 

123 

124 A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. # noqa: E501 

125 

126 :return: The anomaly_score of this Tampering. # noqa: E501 

127 """ 

128 return self._anomaly_score 

129 

130 @anomaly_score.setter 

131 def anomaly_score(self, anomaly_score: float): 

132 """Sets the anomaly_score of this Tampering. 

133 

134 A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. # noqa: E501 

135 

136 :param anomaly_score: The anomaly_score of this Tampering. # noqa: E501 

137 """ 

138 if anomaly_score is None: 

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

140 

141 self._anomaly_score = anomaly_score 

142 

143 @property 

144 def ml_score(self) -> float: 

145 """Gets the ml_score of this Tampering. # noqa: E501 

146 

147 A score that indicates the models calculated probability that an event is coming from an anti detect browser. * Values above `0.8` indicate that the request is an anti detect browser based on the ml model * Values below `0.8` indicate that the request is not an anti detect browser based on the ml model # noqa: E501 

148 

149 :return: The ml_score of this Tampering. # noqa: E501 

150 """ 

151 return self._ml_score 

152 

153 @ml_score.setter 

154 def ml_score(self, ml_score: float): 

155 """Sets the ml_score of this Tampering. 

156 

157 A score that indicates the models calculated probability that an event is coming from an anti detect browser. * Values above `0.8` indicate that the request is an anti detect browser based on the ml model * Values below `0.8` indicate that the request is not an anti detect browser based on the ml model # noqa: E501 

158 

159 :param ml_score: The ml_score of this Tampering. # noqa: E501 

160 """ 

161 if ml_score is None: 

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

163 

164 self._ml_score = ml_score 

165 

166 @property 

167 def anti_detect_browser(self) -> bool: 

168 """Gets the anti_detect_browser of this Tampering. # noqa: E501 

169 

170 Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. # noqa: E501 

171 

172 :return: The anti_detect_browser of this Tampering. # noqa: E501 

173 """ 

174 return self._anti_detect_browser 

175 

176 @anti_detect_browser.setter 

177 def anti_detect_browser(self, anti_detect_browser: bool): 

178 """Sets the anti_detect_browser of this Tampering. 

179 

180 Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. # noqa: E501 

181 

182 :param anti_detect_browser: The anti_detect_browser of this Tampering. # noqa: E501 

183 """ 

184 if anti_detect_browser is None: 

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

186 

187 self._anti_detect_browser = anti_detect_browser 

188