Coverage for fingerprint_pro_server_api_sdk/models/vpn_result.py: 61%

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

32 'origin_timezone': 'str', 

33 'origin_country': 'str', 

34 'methods': 'VpnResultMethods' 

35 } 

36 

37 attribute_map = { 

38 'result': 'result', 

39 'origin_timezone': 'originTimezone', 

40 'origin_country': 'originCountry', 

41 'methods': 'methods' 

42 } 

43 

44 def __init__(self, result=None, origin_timezone=None, origin_country=None, methods=None): # noqa: E501 

45 """VpnResult - a model defined in Swagger""" # noqa: E501 

46 self._result = None 

47 self._origin_timezone = None 

48 self._origin_country = None 

49 self._methods = None 

50 self.discriminator = None 

51 self.result = result 

52 self.origin_timezone = origin_timezone 

53 if origin_country is not None: 

54 self.origin_country = origin_country 

55 self.methods = methods 

56 

57 @property 

58 def result(self): 

59 """Gets the result of this VpnResult. # noqa: E501 

60 

61 VPN or other anonymizing service has been used when sending the request. # noqa: E501 

62 

63 :return: The result of this VpnResult. # noqa: E501 

64 :rtype: bool 

65 """ 

66 return self._result 

67 

68 @result.setter 

69 def result(self, result): 

70 """Sets the result of this VpnResult. 

71 

72 VPN or other anonymizing service has been used when sending the request. # noqa: E501 

73 

74 :param result: The result of this VpnResult. # noqa: E501 

75 :type: bool 

76 """ 

77 if result is None: 

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

79 

80 self._result = result 

81 

82 @property 

83 def origin_timezone(self): 

84 """Gets the origin_timezone of this VpnResult. # noqa: E501 

85 

86 Local timezone which is used in timezoneMismatch method. # noqa: E501 

87 

88 :return: The origin_timezone of this VpnResult. # noqa: E501 

89 :rtype: str 

90 """ 

91 return self._origin_timezone 

92 

93 @origin_timezone.setter 

94 def origin_timezone(self, origin_timezone): 

95 """Sets the origin_timezone of this VpnResult. 

96 

97 Local timezone which is used in timezoneMismatch method. # noqa: E501 

98 

99 :param origin_timezone: The origin_timezone of this VpnResult. # noqa: E501 

100 :type: str 

101 """ 

102 if origin_timezone is None: 

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

104 

105 self._origin_timezone = origin_timezone 

106 

107 @property 

108 def origin_country(self): 

109 """Gets the origin_country of this VpnResult. # noqa: E501 

110 

111 Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). # noqa: E501 

112 

113 :return: The origin_country of this VpnResult. # noqa: E501 

114 :rtype: str 

115 """ 

116 return self._origin_country 

117 

118 @origin_country.setter 

119 def origin_country(self, origin_country): 

120 """Sets the origin_country of this VpnResult. 

121 

122 Country of the request (only for Android SDK version >= 2.4.0, ISO 3166 format or unknown). # noqa: E501 

123 

124 :param origin_country: The origin_country of this VpnResult. # noqa: E501 

125 :type: str 

126 """ 

127 

128 self._origin_country = origin_country 

129 

130 @property 

131 def methods(self): 

132 """Gets the methods of this VpnResult. # noqa: E501 

133 

134 

135 :return: The methods of this VpnResult. # noqa: E501 

136 :rtype: VpnResultMethods 

137 """ 

138 return self._methods 

139 

140 @methods.setter 

141 def methods(self, methods): 

142 """Sets the methods of this VpnResult. 

143 

144 

145 :param methods: The methods of this VpnResult. # noqa: E501 

146 :type: VpnResultMethods 

147 """ 

148 if methods is None: 

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

150 

151 self._methods = methods 

152 

153 def to_dict(self): 

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

155 result = {} 

156 

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

158 value = getattr(self, attr) 

159 if isinstance(value, list): 

160 result[attr] = list(map( 

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

162 value 

163 )) 

164 elif hasattr(value, "to_dict"): 

165 result[attr] = value.to_dict() 

166 elif isinstance(value, dict): 

167 result[attr] = dict(map( 

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

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

170 value.items() 

171 )) 

172 else: 

173 result[attr] = value 

174 if issubclass(VpnResult, dict): 

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

176 result[key] = value 

177 

178 return result 

179 

180 def to_str(self): 

181 """Returns the string representation of the model""" 

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

183 

184 def __repr__(self): 

185 """For `print` and `pprint`""" 

186 return self.to_str() 

187 

188 def __eq__(self, other): 

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

190 if not isinstance(other, VpnResult): 

191 return False 

192 

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

194 

195 def __ne__(self, other): 

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

197 if not isinstance(other, VpnResult): 

198 return True 

199 

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