Coverage for fingerprint_pro_server_api_sdk/models/data_center.py: 55%

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 DataCenter(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 'name': 'str' 

33 } 

34 

35 attribute_map = { 

36 'result': 'result', 

37 'name': 'name' 

38 } 

39 

40 def __init__(self, result=None, name=None): # noqa: E501 

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

42 self._result = None 

43 self._name = None 

44 self.discriminator = None 

45 self.result = result 

46 if name is not None: 

47 self.name = name 

48 

49 @property 

50 def result(self): 

51 """Gets the result of this DataCenter. # noqa: E501 

52 

53 

54 :return: The result of this DataCenter. # noqa: E501 

55 :rtype: bool 

56 """ 

57 return self._result 

58 

59 @result.setter 

60 def result(self, result): 

61 """Sets the result of this DataCenter. 

62 

63 

64 :param result: The result of this DataCenter. # noqa: E501 

65 :type: bool 

66 """ 

67 if result is None: 

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

69 

70 self._result = result 

71 

72 @property 

73 def name(self): 

74 """Gets the name of this DataCenter. # noqa: E501 

75 

76 

77 :return: The name of this DataCenter. # noqa: E501 

78 :rtype: str 

79 """ 

80 return self._name 

81 

82 @name.setter 

83 def name(self, name): 

84 """Sets the name of this DataCenter. 

85 

86 

87 :param name: The name of this DataCenter. # noqa: E501 

88 :type: str 

89 """ 

90 

91 self._name = name 

92 

93 def to_dict(self): 

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

95 result = {} 

96 

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

98 value = getattr(self, attr) 

99 if isinstance(value, list): 

100 result[attr] = list(map( 

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

102 value 

103 )) 

104 elif hasattr(value, "to_dict"): 

105 result[attr] = value.to_dict() 

106 elif isinstance(value, dict): 

107 result[attr] = dict(map( 

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

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

110 value.items() 

111 )) 

112 else: 

113 result[attr] = value 

114 if issubclass(DataCenter, dict): 

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

116 result[key] = value 

117 

118 return result 

119 

120 def to_str(self): 

121 """Returns the string representation of the model""" 

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

123 

124 def __repr__(self): 

125 """For `print` and `pprint`""" 

126 return self.to_str() 

127 

128 def __eq__(self, other): 

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

130 if not isinstance(other, DataCenter): 

131 return False 

132 

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

134 

135 def __ne__(self, other): 

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

137 if not isinstance(other, DataCenter): 

138 return True 

139 

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