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

91 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.botd_bot import BotdBot 

17from fingerprint_pro_server_api_sdk.models.tag import Tag 

18from datetime import datetime 

19 

20 

21class Botd(BaseModel): 

22 """ 

23 Contains all the information from Bot Detection product 

24 

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

26 

27 Do not edit the class manually. 

28 """ 

29 """ 

30 Attributes: 

31 swagger_types (dict): The key is attribute name 

32 and the value is attribute type. 

33 attribute_map (dict): The key is attribute name 

34 and the value is json key in definition. 

35 """ 

36 swagger_types = { 

37 'bot': 'BotdBot', 

38 'meta': 'Tag', 

39 'linked_id': 'str', 

40 'url': 'str', 

41 'ip': 'str', 

42 'time': 'datetime', 

43 'user_agent': 'str', 

44 'request_id': 'str' 

45 } 

46 

47 nullable_map = { 

48 'bot': False, 

49 'meta': False, 

50 'linked_id': False, 

51 'url': False, 

52 'ip': False, 

53 'time': False, 

54 'user_agent': False, 

55 'request_id': False 

56 } 

57 

58 attribute_map = { 

59 'bot': 'bot', 

60 'meta': 'meta', 

61 'linked_id': 'linkedId', 

62 'url': 'url', 

63 'ip': 'ip', 

64 'time': 'time', 

65 'user_agent': 'userAgent', 

66 'request_id': 'requestId' 

67 } 

68 

69 def __init__(self, bot=None, meta=None, linked_id=None, url=None, ip=None, time=None, user_agent=None, request_id=None): # noqa: E501 

70 """Botd - a model defined in Swagger""" # noqa: E501 

71 self._bot = None 

72 self._meta = None 

73 self._linked_id = None 

74 self._url = None 

75 self._ip = None 

76 self._time = None 

77 self._user_agent = None 

78 self._request_id = None 

79 self.discriminator = None 

80 self.bot = bot 

81 if meta is not None: 

82 self.meta = meta 

83 if linked_id is not None: 

84 self.linked_id = linked_id 

85 self.url = url 

86 self.ip = ip 

87 self.time = time 

88 self.user_agent = user_agent 

89 self.request_id = request_id 

90 

91 @property 

92 def bot(self) -> BotdBot: 

93 """Gets the bot of this Botd. # noqa: E501 

94 

95 

96 :return: The bot of this Botd. # noqa: E501 

97 """ 

98 return self._bot 

99 

100 @bot.setter 

101 def bot(self, bot: BotdBot): 

102 """Sets the bot of this Botd. 

103 

104 

105 :param bot: The bot of this Botd. # noqa: E501 

106 """ 

107 if bot is None: 

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

109 

110 self._bot = bot 

111 

112 @property 

113 def meta(self) -> Optional[Tag]: 

114 """Gets the meta of this Botd. # noqa: E501 

115 

116 

117 :return: The meta of this Botd. # noqa: E501 

118 """ 

119 return self._meta 

120 

121 @meta.setter 

122 def meta(self, meta: Optional[Tag]): 

123 """Sets the meta of this Botd. 

124 

125 

126 :param meta: The meta of this Botd. # noqa: E501 

127 """ 

128 

129 self._meta = meta 

130 

131 @property 

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

133 """Gets the linked_id of this Botd. # noqa: E501 

134 

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

136 

137 :return: The linked_id of this Botd. # noqa: E501 

138 """ 

139 return self._linked_id 

140 

141 @linked_id.setter 

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

143 """Sets the linked_id of this Botd. 

144 

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

146 

147 :param linked_id: The linked_id of this Botd. # noqa: E501 

148 """ 

149 

150 self._linked_id = linked_id 

151 

152 @property 

153 def url(self) -> str: 

154 """Gets the url of this Botd. # noqa: E501 

155 

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

157 

158 :return: The url of this Botd. # noqa: E501 

159 """ 

160 return self._url 

161 

162 @url.setter 

163 def url(self, url: str): 

164 """Sets the url of this Botd. 

165 

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

167 

168 :param url: The url of this Botd. # noqa: E501 

169 """ 

170 if url is None: 

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

172 

173 self._url = url 

174 

175 @property 

176 def ip(self) -> str: 

177 """Gets the ip of this Botd. # noqa: E501 

178 

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

180 

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

182 """ 

183 return self._ip 

184 

185 @ip.setter 

186 def ip(self, ip: str): 

187 """Sets the ip of this Botd. 

188 

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

190 

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

192 """ 

193 if ip is None: 

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

195 

196 self._ip = ip 

197 

198 @property 

199 def time(self) -> datetime: 

200 """Gets the time of this Botd. # noqa: E501 

201 

202 Time in UTC 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 

203 

204 :return: The time of this Botd. # noqa: E501 

205 """ 

206 return self._time 

207 

208 @time.setter 

209 def time(self, time: datetime): 

210 """Sets the time of this Botd. 

211 

212 Time in UTC 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 

213 

214 :param time: The time of this Botd. # noqa: E501 

215 """ 

216 if time is None: 

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

218 

219 self._time = time 

220 

221 @property 

222 def user_agent(self) -> str: 

223 """Gets the user_agent of this Botd. # noqa: E501 

224 

225 

226 :return: The user_agent of this Botd. # noqa: E501 

227 """ 

228 return self._user_agent 

229 

230 @user_agent.setter 

231 def user_agent(self, user_agent: str): 

232 """Sets the user_agent of this Botd. 

233 

234 

235 :param user_agent: The user_agent of this Botd. # noqa: E501 

236 """ 

237 if user_agent is None: 

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

239 

240 self._user_agent = user_agent 

241 

242 @property 

243 def request_id(self) -> str: 

244 """Gets the request_id of this Botd. # noqa: E501 

245 

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

247 

248 :return: The request_id of this Botd. # noqa: E501 

249 """ 

250 return self._request_id 

251 

252 @request_id.setter 

253 def request_id(self, request_id: str): 

254 """Sets the request_id of this Botd. 

255 

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

257 

258 :param request_id: The request_id of this Botd. # noqa: E501 

259 """ 

260 if request_id is None: 

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

262 

263 self._request_id = request_id 

264