1 |
d35c7f1f
|
Captain_Trojan
|
# 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 CertificateRequest(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, validity_days: int=None, usage: CAUsage=None, ca: int=None): # noqa: E501
|
20 |
|
|
"""CertificateRequest - a model defined in Swagger
|
21 |
|
|
|
22 |
|
|
:param subject: The subject of this CertificateRequest. # noqa: E501
|
23 |
|
|
:type subject: Subject
|
24 |
|
|
:param validity_days: The validity_days of this CertificateRequest. # noqa: E501
|
25 |
|
|
:type validity_days: int
|
26 |
|
|
:param usage: The usage of this CertificateRequest. # noqa: E501
|
27 |
|
|
:type usage: CAUsage
|
28 |
|
|
:param ca: The ca of this CertificateRequest. # noqa: E501
|
29 |
|
|
:type ca: int
|
30 |
|
|
"""
|
31 |
|
|
self.swagger_types = {
|
32 |
|
|
'subject': Subject,
|
33 |
|
|
'validity_days': int,
|
34 |
|
|
'usage': CAUsage,
|
35 |
|
|
'ca': int
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
self.attribute_map = {
|
39 |
|
|
'subject': 'subject',
|
40 |
|
|
'validity_days': 'validityDays',
|
41 |
|
|
'usage': 'usage',
|
42 |
|
|
'ca': 'CA'
|
43 |
|
|
}
|
44 |
|
|
self._subject = subject
|
45 |
|
|
self._validity_days = validity_days
|
46 |
|
|
self._usage = usage
|
47 |
|
|
self._ca = ca
|
48 |
|
|
|
49 |
|
|
@classmethod
|
50 |
|
|
def from_dict(cls, dikt) -> 'CertificateRequest':
|
51 |
|
|
"""Returns the dict as a model
|
52 |
|
|
|
53 |
|
|
:param dikt: A dict.
|
54 |
|
|
:type: dict
|
55 |
|
|
:return: The CertificateRequest of this CertificateRequest. # noqa: E501
|
56 |
|
|
:rtype: CertificateRequest
|
57 |
|
|
"""
|
58 |
|
|
return util.deserialize_model(dikt, cls)
|
59 |
|
|
|
60 |
|
|
@property
|
61 |
|
|
def subject(self) -> Subject:
|
62 |
|
|
"""Gets the subject of this CertificateRequest.
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
:return: The subject of this CertificateRequest.
|
66 |
|
|
:rtype: Subject
|
67 |
|
|
"""
|
68 |
|
|
return self._subject
|
69 |
|
|
|
70 |
|
|
@subject.setter
|
71 |
|
|
def subject(self, subject: Subject):
|
72 |
|
|
"""Sets the subject of this CertificateRequest.
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
:param subject: The subject of this CertificateRequest.
|
76 |
|
|
:type subject: Subject
|
77 |
|
|
"""
|
78 |
|
|
if subject is None:
|
79 |
|
|
raise ValueError("Invalid value for `subject`, must not be `None`") # noqa: E501
|
80 |
|
|
|
81 |
|
|
self._subject = subject
|
82 |
|
|
|
83 |
|
|
@property
|
84 |
|
|
def validity_days(self) -> int:
|
85 |
|
|
"""Gets the validity_days of this CertificateRequest.
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
:return: The validity_days of this CertificateRequest.
|
89 |
|
|
:rtype: int
|
90 |
|
|
"""
|
91 |
|
|
return self._validity_days
|
92 |
|
|
|
93 |
|
|
@validity_days.setter
|
94 |
|
|
def validity_days(self, validity_days: int):
|
95 |
|
|
"""Sets the validity_days of this CertificateRequest.
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
:param validity_days: The validity_days of this CertificateRequest.
|
99 |
|
|
:type validity_days: int
|
100 |
|
|
"""
|
101 |
|
|
if validity_days is None:
|
102 |
|
|
raise ValueError("Invalid value for `validity_days`, must not be `None`") # noqa: E501
|
103 |
|
|
|
104 |
|
|
self._validity_days = validity_days
|
105 |
|
|
|
106 |
|
|
@property
|
107 |
|
|
def usage(self) -> CAUsage:
|
108 |
|
|
"""Gets the usage of this CertificateRequest.
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
:return: The usage of this CertificateRequest.
|
112 |
|
|
:rtype: CAUsage
|
113 |
|
|
"""
|
114 |
|
|
return self._usage
|
115 |
|
|
|
116 |
|
|
@usage.setter
|
117 |
|
|
def usage(self, usage: CAUsage):
|
118 |
|
|
"""Sets the usage of this CertificateRequest.
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
:param usage: The usage of this CertificateRequest.
|
122 |
|
|
:type usage: CAUsage
|
123 |
|
|
"""
|
124 |
|
|
if usage is None:
|
125 |
|
|
raise ValueError("Invalid value for `usage`, must not be `None`") # noqa: E501
|
126 |
|
|
|
127 |
|
|
self._usage = usage
|
128 |
|
|
|
129 |
|
|
@property
|
130 |
|
|
def ca(self) -> int:
|
131 |
|
|
"""Gets the ca of this CertificateRequest.
|
132 |
|
|
|
133 |
|
|
ID of the new item # noqa: E501
|
134 |
|
|
|
135 |
|
|
:return: The ca of this CertificateRequest.
|
136 |
|
|
:rtype: int
|
137 |
|
|
"""
|
138 |
|
|
return self._ca
|
139 |
|
|
|
140 |
|
|
@ca.setter
|
141 |
|
|
def ca(self, ca: int):
|
142 |
|
|
"""Sets the ca of this CertificateRequest.
|
143 |
|
|
|
144 |
|
|
ID of the new item # noqa: E501
|
145 |
|
|
|
146 |
|
|
:param ca: The ca of this CertificateRequest.
|
147 |
|
|
:type ca: int
|
148 |
|
|
"""
|
149 |
|
|
|
150 |
|
|
self._ca = ca
|