Coverage for fingerprint_pro_server_api_sdk/models/ip_block_list_result_details.py: 54%

56 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 IpBlockListResultDetails(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 'email_spam': 'bool', 

32 'attack_source': 'bool' 

33 } 

34 

35 attribute_map = { 

36 'email_spam': 'emailSpam', 

37 'attack_source': 'attackSource' 

38 } 

39 

40 def __init__(self, email_spam=None, attack_source=None): # noqa: E501 

41 """IpBlockListResultDetails - a model defined in Swagger""" # noqa: E501 

42 self._email_spam = None 

43 self._attack_source = None 

44 self.discriminator = None 

45 self.email_spam = email_spam 

46 self.attack_source = attack_source 

47 

48 @property 

49 def email_spam(self): 

50 """Gets the email_spam of this IpBlockListResultDetails. # noqa: E501 

51 

52 IP address was part of a known email spam attack (SMTP). # noqa: E501 

53 

54 :return: The email_spam of this IpBlockListResultDetails. # noqa: E501 

55 :rtype: bool 

56 """ 

57 return self._email_spam 

58 

59 @email_spam.setter 

60 def email_spam(self, email_spam): 

61 """Sets the email_spam of this IpBlockListResultDetails. 

62 

63 IP address was part of a known email spam attack (SMTP). # noqa: E501 

64 

65 :param email_spam: The email_spam of this IpBlockListResultDetails. # noqa: E501 

66 :type: bool 

67 """ 

68 if email_spam is None: 

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

70 

71 self._email_spam = email_spam 

72 

73 @property 

74 def attack_source(self): 

75 """Gets the attack_source of this IpBlockListResultDetails. # noqa: E501 

76 

77 IP address was part of a known network attack (SSH/HTTPS). # noqa: E501 

78 

79 :return: The attack_source of this IpBlockListResultDetails. # noqa: E501 

80 :rtype: bool 

81 """ 

82 return self._attack_source 

83 

84 @attack_source.setter 

85 def attack_source(self, attack_source): 

86 """Sets the attack_source of this IpBlockListResultDetails. 

87 

88 IP address was part of a known network attack (SSH/HTTPS). # noqa: E501 

89 

90 :param attack_source: The attack_source of this IpBlockListResultDetails. # noqa: E501 

91 :type: bool 

92 """ 

93 if attack_source is None: 

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

95 

96 self._attack_source = attack_source 

97 

98 def to_dict(self): 

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

100 result = {} 

101 

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

103 value = getattr(self, attr) 

104 if isinstance(value, list): 

105 result[attr] = list(map( 

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

107 value 

108 )) 

109 elif hasattr(value, "to_dict"): 

110 result[attr] = value.to_dict() 

111 elif isinstance(value, dict): 

112 result[attr] = dict(map( 

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

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

115 value.items() 

116 )) 

117 else: 

118 result[attr] = value 

119 if issubclass(IpBlockListResultDetails, dict): 

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

121 result[key] = value 

122 

123 return result 

124 

125 def to_str(self): 

126 """Returns the string representation of the model""" 

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

128 

129 def __repr__(self): 

130 """For `print` and `pprint`""" 

131 return self.to_str() 

132 

133 def __eq__(self, other): 

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

135 if not isinstance(other, IpBlockListResultDetails): 

136 return False 

137 

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

139 

140 def __ne__(self, other): 

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

142 if not isinstance(other, IpBlockListResultDetails): 

143 return True 

144 

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