Coverage for fingerprint_pro_server_api_sdk/models/high_activity_result.py: 51%
55 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-03-27 22:39 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-03-27 22:39 +0000
1# coding: utf-8
3"""
4 Fingerprint Pro Server API
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
8 OpenAPI spec version: 3
9 Contact: support@fingerprint.com
10 Generated by: https://github.com/swagger-api/swagger-codegen.git
11"""
13import pprint
14import re # noqa: F401
16import six
18class HighActivityResult(object):
19 """NOTE: This class is auto generated by the swagger code generator program.
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 'daily_requests': 'float'
33 }
35 attribute_map = {
36 'result': 'result',
37 'daily_requests': 'dailyRequests'
38 }
40 def __init__(self, result=None, daily_requests=None): # noqa: E501
41 """HighActivityResult - a model defined in Swagger""" # noqa: E501
42 self._result = None
43 self._daily_requests = None
44 self.discriminator = None
45 self.result = result
46 if daily_requests is not None:
47 self.daily_requests = daily_requests
49 @property
50 def result(self):
51 """Gets the result of this HighActivityResult. # noqa: E501
53 Flag indicating whether the request came from a high activity visitor. # noqa: E501
55 :return: The result of this HighActivityResult. # noqa: E501
56 :rtype: bool
57 """
58 return self._result
60 @result.setter
61 def result(self, result):
62 """Sets the result of this HighActivityResult.
64 Flag indicating whether the request came from a high activity visitor. # noqa: E501
66 :param result: The result of this HighActivityResult. # noqa: E501
67 :type: bool
68 """
69 if result is None:
70 raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501
72 self._result = result
74 @property
75 def daily_requests(self):
76 """Gets the daily_requests of this HighActivityResult. # noqa: E501
78 Number of requests from the same visitor in the previous day. # noqa: E501
80 :return: The daily_requests of this HighActivityResult. # noqa: E501
81 :rtype: float
82 """
83 return self._daily_requests
85 @daily_requests.setter
86 def daily_requests(self, daily_requests):
87 """Sets the daily_requests of this HighActivityResult.
89 Number of requests from the same visitor in the previous day. # noqa: E501
91 :param daily_requests: The daily_requests of this HighActivityResult. # noqa: E501
92 :type: float
93 """
95 self._daily_requests = daily_requests
97 def to_dict(self):
98 """Returns the model properties as a dict"""
99 result = {}
101 for attr, _ in six.iteritems(self.swagger_types):
102 value = getattr(self, attr)
103 if isinstance(value, list):
104 result[attr] = list(map(
105 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
106 value
107 ))
108 elif hasattr(value, "to_dict"):
109 result[attr] = value.to_dict()
110 elif isinstance(value, dict):
111 result[attr] = dict(map(
112 lambda item: (item[0], item[1].to_dict())
113 if hasattr(item[1], "to_dict") else item,
114 value.items()
115 ))
116 else:
117 result[attr] = value
118 if issubclass(HighActivityResult, dict):
119 for key, value in self.items():
120 result[key] = value
122 return result
124 def to_str(self):
125 """Returns the string representation of the model"""
126 return pprint.pformat(self.to_dict())
128 def __repr__(self):
129 """For `print` and `pprint`"""
130 return self.to_str()
132 def __eq__(self, other):
133 """Returns true if both objects are equal"""
134 if not isinstance(other, HighActivityResult):
135 return False
137 return self.to_dict() == other.to_dict()
139 def __ne__(self, other):
140 """Returns true if both objects are not equal"""
141 if not isinstance(other, HighActivityResult):
142 return True
144 return self.to_dict() != other.to_dict()