Coverage for fingerprint_pro_server_api_sdk/models/proxy_details.py: 94%

33 statements  

« prev     ^ index     » next       coverage.py v7.10.4, created at 2025-08-19 14:45 +0000

1# coding: utf-8 

2 

3""" 

4 Fingerprint Server API 

5 

6 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 

16from datetime import datetime 

17 

18 

19class ProxyDetails(BaseModel): 

20 """ 

21 Proxy detection details (present if proxy is detected) 

22 

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

24 

25 Do not edit the class manually. 

26 """ 

27 """ 

28 Attributes: 

29 swagger_types (dict): The key is attribute name 

30 and the value is attribute type. 

31 attribute_map (dict): The key is attribute name 

32 and the value is json key in definition. 

33 """ 

34 swagger_types = { 

35 'proxy_type': 'str', 

36 'last_seen_at': 'datetime' 

37 } 

38 

39 nullable_map = { 

40 'proxy_type': False, 

41 'last_seen_at': False 

42 } 

43 

44 attribute_map = { 

45 'proxy_type': 'proxyType', 

46 'last_seen_at': 'lastSeenAt' 

47 } 

48 

49 def __init__(self, proxy_type=None, last_seen_at=None): # noqa: E501 

50 """ProxyDetails - a model defined in Swagger""" # noqa: E501 

51 self._proxy_type = None 

52 self._last_seen_at = None 

53 self.discriminator = None 

54 self.proxy_type = proxy_type 

55 if last_seen_at is not None: 

56 self.last_seen_at = last_seen_at 

57 

58 @property 

59 def proxy_type(self) -> str: 

60 """Gets the proxy_type of this ProxyDetails. # noqa: E501 

61 

62 Residential proxies use real user IP addresses to appear as legitimate traffic, while data center proxies are public proxies hosted in data centers # noqa: E501 

63 

64 :return: The proxy_type of this ProxyDetails. # noqa: E501 

65 """ 

66 return self._proxy_type 

67 

68 @proxy_type.setter 

69 def proxy_type(self, proxy_type: str): 

70 """Sets the proxy_type of this ProxyDetails. 

71 

72 Residential proxies use real user IP addresses to appear as legitimate traffic, while data center proxies are public proxies hosted in data centers # noqa: E501 

73 

74 :param proxy_type: The proxy_type of this ProxyDetails. # noqa: E501 

75 """ 

76 if proxy_type is None: 

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

78 allowed_values = ["residential", "data_center"] # noqa: E501 

79 if (proxy_type not in allowed_values): 

80 raise ValueError( 

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

82 .format(proxy_type, allowed_values) 

83 ) 

84 

85 self._proxy_type = proxy_type 

86 

87 @property 

88 def last_seen_at(self) -> Optional[datetime]: 

89 """Gets the last_seen_at of this ProxyDetails. # noqa: E501 

90 

91 ISO 8601 formatted timestamp in UTC with hourly resolution of when this IP was last seen as a proxy when available. # noqa: E501 

92 

93 :return: The last_seen_at of this ProxyDetails. # noqa: E501 

94 """ 

95 return self._last_seen_at 

96 

97 @last_seen_at.setter 

98 def last_seen_at(self, last_seen_at: Optional[datetime]): 

99 """Sets the last_seen_at of this ProxyDetails. 

100 

101 ISO 8601 formatted timestamp in UTC with hourly resolution of when this IP was last seen as a proxy when available. # noqa: E501 

102 

103 :param last_seen_at: The last_seen_at of this ProxyDetails. # noqa: E501 

104 """ 

105 

106 self._last_seen_at = last_seen_at 

107