Coverage for fingerprint_pro_server_api_sdk/models/ip_info_v4.py: 96%

51 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-02-21 15:03 +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 re # noqa: F401 

14from typing import Dict, List, Optional # noqa: F401 

15from fingerprint_pro_server_api_sdk.base_model import BaseModel 

16from fingerprint_pro_server_api_sdk.models.geolocation import Geolocation 

17from fingerprint_pro_server_api_sdk.models.ip_info_asn import IPInfoASN 

18from fingerprint_pro_server_api_sdk.models.ip_info_data_center import IPInfoDataCenter 

19 

20 

21class IPInfoV4(BaseModel): 

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 'address': 'str', 

35 'geolocation': 'Geolocation', 

36 'asn': 'IPInfoASN', 

37 'datacenter': 'IPInfoDataCenter' 

38 } 

39 

40 nullable_map = { 

41 'address': False, 

42 'geolocation': False, 

43 'asn': False, 

44 'datacenter': False 

45 } 

46 

47 attribute_map = { 

48 'address': 'address', 

49 'geolocation': 'geolocation', 

50 'asn': 'asn', 

51 'datacenter': 'datacenter' 

52 } 

53 

54 def __init__(self, address=None, geolocation=None, asn=None, datacenter=None): # noqa: E501 

55 """IPInfoV4 - a model defined in Swagger""" # noqa: E501 

56 self._address = None 

57 self._geolocation = None 

58 self._asn = None 

59 self._datacenter = None 

60 self.discriminator = None 

61 self.address = address 

62 self.geolocation = geolocation 

63 if asn is not None: 

64 self.asn = asn 

65 if datacenter is not None: 

66 self.datacenter = datacenter 

67 

68 @property 

69 def address(self) -> str: 

70 """Gets the address of this IPInfoV4. # noqa: E501 

71 

72 

73 :return: The address of this IPInfoV4. # noqa: E501 

74 """ 

75 return self._address 

76 

77 @address.setter 

78 def address(self, address: str): 

79 """Sets the address of this IPInfoV4. 

80 

81 

82 :param address: The address of this IPInfoV4. # noqa: E501 

83 """ 

84 if address is None: 

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

86 

87 self._address = address 

88 

89 @property 

90 def geolocation(self) -> Geolocation: 

91 """Gets the geolocation of this IPInfoV4. # noqa: E501 

92 

93 

94 :return: The geolocation of this IPInfoV4. # noqa: E501 

95 """ 

96 return self._geolocation 

97 

98 @geolocation.setter 

99 def geolocation(self, geolocation: Geolocation): 

100 """Sets the geolocation of this IPInfoV4. 

101 

102 

103 :param geolocation: The geolocation of this IPInfoV4. # noqa: E501 

104 """ 

105 if geolocation is None: 

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

107 

108 self._geolocation = geolocation 

109 

110 @property 

111 def asn(self) -> Optional[IPInfoASN]: 

112 """Gets the asn of this IPInfoV4. # noqa: E501 

113 

114 

115 :return: The asn of this IPInfoV4. # noqa: E501 

116 """ 

117 return self._asn 

118 

119 @asn.setter 

120 def asn(self, asn: Optional[IPInfoASN]): 

121 """Sets the asn of this IPInfoV4. 

122 

123 

124 :param asn: The asn of this IPInfoV4. # noqa: E501 

125 """ 

126 

127 self._asn = asn 

128 

129 @property 

130 def datacenter(self) -> Optional[IPInfoDataCenter]: 

131 """Gets the datacenter of this IPInfoV4. # noqa: E501 

132 

133 

134 :return: The datacenter of this IPInfoV4. # noqa: E501 

135 """ 

136 return self._datacenter 

137 

138 @datacenter.setter 

139 def datacenter(self, datacenter: Optional[IPInfoDataCenter]): 

140 """Sets the datacenter of this IPInfoV4. 

141 

142 

143 :param datacenter: The datacenter of this IPInfoV4. # noqa: E501 

144 """ 

145 

146 self._datacenter = datacenter 

147