Coverage for fingerprint_pro_server_api_sdk/models/error.py: 90%

31 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.error_code import ErrorCode 

17 

18 

19class Error(BaseModel): 

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

21 

22 Do not edit the class manually. 

23 """ 

24 """ 

25 Attributes: 

26 swagger_types (dict): The key is attribute name 

27 and the value is attribute type. 

28 attribute_map (dict): The key is attribute name 

29 and the value is json key in definition. 

30 """ 

31 swagger_types = { 

32 'code': 'ErrorCode', 

33 'message': 'str' 

34 } 

35 

36 nullable_map = { 

37 'code': False, 

38 'message': False 

39 } 

40 

41 attribute_map = { 

42 'code': 'code', 

43 'message': 'message' 

44 } 

45 

46 def __init__(self, code=None, message=None): # noqa: E501 

47 """Error - a model defined in Swagger""" # noqa: E501 

48 self._code = None 

49 self._message = None 

50 self.discriminator = None 

51 self.code = code 

52 self.message = message 

53 

54 @property 

55 def code(self) -> ErrorCode: 

56 """Gets the code of this Error. # noqa: E501 

57 

58 

59 :return: The code of this Error. # noqa: E501 

60 """ 

61 return self._code 

62 

63 @code.setter 

64 def code(self, code: ErrorCode): 

65 """Sets the code of this Error. 

66 

67 

68 :param code: The code of this Error. # noqa: E501 

69 """ 

70 if code is None: 

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

72 

73 self._code = code 

74 

75 @property 

76 def message(self) -> str: 

77 """Gets the message of this Error. # noqa: E501 

78 

79 

80 :return: The message of this Error. # noqa: E501 

81 """ 

82 return self._message 

83 

84 @message.setter 

85 def message(self, message: str): 

86 """Sets the message of this Error. 

87 

88 

89 :param message: The message of this Error. # noqa: E501 

90 """ 

91 if message is None: 

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

93 

94 self._message = message 

95