Coverage for fingerprint_pro_server_api_sdk/models/factory_reset_result.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 FactoryResetResult(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 'time': 'datetime', 

32 'timestamp': 'int' 

33 } 

34 

35 attribute_map = { 

36 'time': 'time', 

37 'timestamp': 'timestamp' 

38 } 

39 

40 def __init__(self, time=None, timestamp=None): # noqa: E501 

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

42 self._time = None 

43 self._timestamp = None 

44 self.discriminator = None 

45 self.time = time 

46 self.timestamp = timestamp 

47 

48 @property 

49 def time(self): 

50 """Gets the time of this FactoryResetResult. # noqa: E501 

51 

52 Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. # noqa: E501 

53 

54 :return: The time of this FactoryResetResult. # noqa: E501 

55 :rtype: datetime 

56 """ 

57 return self._time 

58 

59 @time.setter 

60 def time(self, time): 

61 """Sets the time of this FactoryResetResult. 

62 

63 Time in UTC when the most recent factory reset of the Android or iOS device was done. If there is no sign of factory reset or the client is not a mobile device, the field will contain the epoch time (1 January 1970) in UTC. # noqa: E501 

64 

65 :param time: The time of this FactoryResetResult. # noqa: E501 

66 :type: datetime 

67 """ 

68 if time is None: 

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

70 

71 self._time = time 

72 

73 @property 

74 def timestamp(self): 

75 """Gets the timestamp of this FactoryResetResult. # noqa: E501 

76 

77 Same value as it's in the `time` field but represented in timestamp format. # noqa: E501 

78 

79 :return: The timestamp of this FactoryResetResult. # noqa: E501 

80 :rtype: int 

81 """ 

82 return self._timestamp 

83 

84 @timestamp.setter 

85 def timestamp(self, timestamp): 

86 """Sets the timestamp of this FactoryResetResult. 

87 

88 Same value as it's in the `time` field but represented in timestamp format. # noqa: E501 

89 

90 :param timestamp: The timestamp of this FactoryResetResult. # noqa: E501 

91 :type: int 

92 """ 

93 if timestamp is None: 

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

95 

96 self._timestamp = timestamp 

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(FactoryResetResult, 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, FactoryResetResult): 

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, FactoryResetResult): 

143 return True 

144 

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