Coverage for fingerprint_pro_server_api_sdk/models/event_response.py: 76%

55 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 EventResponse(object): 

19 """ 

20 Contains results from all activated products - Fingerprint Pro, Bot Detection, and others. 

21 

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

23 

24 Do not edit the class manually. 

25 """ 

26 """ 

27 Attributes: 

28 swagger_types (dict): The key is attribute name 

29 and the value is attribute type. 

30 attribute_map (dict): The key is attribute name 

31 and the value is json key in definition. 

32 """ 

33 swagger_types = { 

34 'products': 'ProductsResponse', 

35 'error': 'ProductError' 

36 } 

37 

38 attribute_map = { 

39 'products': 'products', 

40 'error': 'error' 

41 } 

42 

43 def __init__(self, products=None, error=None): # noqa: E501 

44 """EventResponse - a model defined in Swagger""" # noqa: E501 

45 self._products = None 

46 self._error = None 

47 self.discriminator = None 

48 self.products = products 

49 if error is not None: 

50 self.error = error 

51 

52 @property 

53 def products(self): 

54 """Gets the products of this EventResponse. # noqa: E501 

55 

56 

57 :return: The products of this EventResponse. # noqa: E501 

58 :rtype: ProductsResponse 

59 """ 

60 return self._products 

61 

62 @products.setter 

63 def products(self, products): 

64 """Sets the products of this EventResponse. 

65 

66 

67 :param products: The products of this EventResponse. # noqa: E501 

68 :type: ProductsResponse 

69 """ 

70 if products is None: 

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

72 

73 self._products = products 

74 

75 @property 

76 def error(self): 

77 """Gets the error of this EventResponse. # noqa: E501 

78 

79 

80 :return: The error of this EventResponse. # noqa: E501 

81 :rtype: ProductError 

82 """ 

83 return self._error 

84 

85 @error.setter 

86 def error(self, error): 

87 """Sets the error of this EventResponse. 

88 

89 

90 :param error: The error of this EventResponse. # noqa: E501 

91 :type: ProductError 

92 """ 

93 

94 self._error = error 

95 

96 def to_dict(self): 

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

98 result = {} 

99 

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

101 value = getattr(self, attr) 

102 if isinstance(value, list): 

103 result[attr] = list(map( 

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

105 value 

106 )) 

107 elif hasattr(value, "to_dict"): 

108 result[attr] = value.to_dict() 

109 elif isinstance(value, dict): 

110 result[attr] = dict(map( 

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

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

113 value.items() 

114 )) 

115 else: 

116 result[attr] = value 

117 if issubclass(EventResponse, dict): 

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

119 result[key] = value 

120 

121 return result 

122 

123 def to_str(self): 

124 """Returns the string representation of the model""" 

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

126 

127 def __repr__(self): 

128 """For `print` and `pprint`""" 

129 return self.to_str() 

130 

131 def __eq__(self, other): 

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

133 if not isinstance(other, EventResponse): 

134 return False 

135 

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

137 

138 def __ne__(self, other): 

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

140 if not isinstance(other, EventResponse): 

141 return True 

142 

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