Projekt

Obecné

Profil

Stáhnout (4.79 KB) Statistiky
| Větev: | Tag: | Revize:
1
# coding: utf-8
2

    
3
from __future__ import absolute_import
4
from datetime import date, datetime  # noqa: F401
5

    
6
from typing import List, Dict  # noqa: F401
7

    
8
from swagger_server.models.base_model_ import Model
9
from swagger_server.models.ca_usage import CAUsage  # noqa: F401,E501
10
from swagger_server.models.subject import Subject  # noqa: F401,E501
11
from swagger_server import util
12

    
13

    
14
class Certificate(Model):
15
    """NOTE: This class is auto generated by the swagger code generator program.
16

    
17
    Do not edit the class manually.
18
    """
19
    def __init__(self, subject: Subject=None, not_before: date=None, not_after: date=None, usage: CAUsage=None, ca: int=None):  # noqa: E501
20
        """Certificate - a model defined in Swagger
21

    
22
        :param subject: The subject of this Certificate.  # noqa: E501
23
        :type subject: Subject
24
        :param not_before: The not_before of this Certificate.  # noqa: E501
25
        :type not_before: date
26
        :param not_after: The not_after of this Certificate.  # noqa: E501
27
        :type not_after: date
28
        :param usage: The usage of this Certificate.  # noqa: E501
29
        :type usage: CAUsage
30
        :param ca: The ca of this Certificate.  # noqa: E501
31
        :type ca: int
32
        """
33
        self.swagger_types = {
34
            'subject': Subject,
35
            'not_before': date,
36
            'not_after': date,
37
            'usage': CAUsage,
38
            'ca': int
39
        }
40

    
41
        self.attribute_map = {
42
            'subject': 'subject',
43
            'not_before': 'notBefore',
44
            'not_after': 'notAfter',
45
            'usage': 'usage',
46
            'ca': 'CA'
47
        }
48
        self._subject = subject
49
        self._not_before = not_before
50
        self._not_after = not_after
51
        self._usage = usage
52
        self._ca = ca
53

    
54
    @classmethod
55
    def from_dict(cls, dikt) -> 'Certificate':
56
        """Returns the dict as a model
57

    
58
        :param dikt: A dict.
59
        :type: dict
60
        :return: The Certificate of this Certificate.  # noqa: E501
61
        :rtype: Certificate
62
        """
63
        return util.deserialize_model(dikt, cls)
64

    
65
    @property
66
    def subject(self) -> Subject:
67
        """Gets the subject of this Certificate.
68

    
69

    
70
        :return: The subject of this Certificate.
71
        :rtype: Subject
72
        """
73
        return self._subject
74

    
75
    @subject.setter
76
    def subject(self, subject: Subject):
77
        """Sets the subject of this Certificate.
78

    
79

    
80
        :param subject: The subject of this Certificate.
81
        :type subject: Subject
82
        """
83
        if subject is None:
84
            raise ValueError("Invalid value for `subject`, must not be `None`")  # noqa: E501
85

    
86
        self._subject = subject
87

    
88
    @property
89
    def not_before(self) -> date:
90
        """Gets the not_before of this Certificate.
91

    
92

    
93
        :return: The not_before of this Certificate.
94
        :rtype: date
95
        """
96
        return self._not_before
97

    
98
    @not_before.setter
99
    def not_before(self, not_before: date):
100
        """Sets the not_before of this Certificate.
101

    
102

    
103
        :param not_before: The not_before of this Certificate.
104
        :type not_before: date
105
        """
106
        if not_before is None:
107
            raise ValueError("Invalid value for `not_before`, must not be `None`")  # noqa: E501
108

    
109
        self._not_before = not_before
110

    
111
    @property
112
    def not_after(self) -> date:
113
        """Gets the not_after of this Certificate.
114

    
115

    
116
        :return: The not_after of this Certificate.
117
        :rtype: date
118
        """
119
        return self._not_after
120

    
121
    @not_after.setter
122
    def not_after(self, not_after: date):
123
        """Sets the not_after of this Certificate.
124

    
125

    
126
        :param not_after: The not_after of this Certificate.
127
        :type not_after: date
128
        """
129
        if not_after is None:
130
            raise ValueError("Invalid value for `not_after`, must not be `None`")  # noqa: E501
131

    
132
        self._not_after = not_after
133

    
134
    @property
135
    def usage(self) -> CAUsage:
136
        """Gets the usage of this Certificate.
137

    
138

    
139
        :return: The usage of this Certificate.
140
        :rtype: CAUsage
141
        """
142
        return self._usage
143

    
144
    @usage.setter
145
    def usage(self, usage: CAUsage):
146
        """Sets the usage of this Certificate.
147

    
148

    
149
        :param usage: The usage of this Certificate.
150
        :type usage: CAUsage
151
        """
152
        if usage is None:
153
            raise ValueError("Invalid value for `usage`, must not be `None`")  # noqa: E501
154

    
155
        self._usage = usage
156

    
157
    @property
158
    def ca(self) -> int:
159
        """Gets the ca of this Certificate.
160

    
161
        ID of the new item  # noqa: E501
162

    
163
        :return: The ca of this Certificate.
164
        :rtype: int
165
        """
166
        return self._ca
167

    
168
    @ca.setter
169
    def ca(self, ca: int):
170
        """Sets the ca of this Certificate.
171

    
172
        ID of the new item  # noqa: E501
173

    
174
        :param ca: The ca of this Certificate.
175
        :type ca: int
176
        """
177

    
178
        self._ca = ca
(4-4/15)