Revize d35c7f1f
Přidáno uživatelem Michal Seják před asi 4 roky(ů)
swagger_server/controllers/authorization_controller.py | ||
---|---|---|
1 |
from typing import List |
|
2 |
""" |
|
3 |
controller generated to handled auth operation described at: |
|
4 |
https://connexion.readthedocs.io/en/latest/security.html |
|
5 |
""" |
|
6 |
|
swagger_server/encoder.py | ||
---|---|---|
1 |
from connexion.apps.flask_app import FlaskJSONEncoder |
|
2 |
import six |
|
3 |
|
|
4 |
from swagger_server.models.base_model_ import Model |
|
5 |
|
|
6 |
|
|
7 |
class JSONEncoder(FlaskJSONEncoder): |
|
8 |
include_nulls = False |
|
9 |
|
|
10 |
def default(self, o): |
|
11 |
if isinstance(o, Model): |
|
12 |
dikt = {} |
|
13 |
for attr, _ in six.iteritems(o.swagger_types): |
|
14 |
value = getattr(o, attr) |
|
15 |
if value is None and not self.include_nulls: |
|
16 |
continue |
|
17 |
attr = o.attribute_map[attr] |
|
18 |
dikt[attr] = value |
|
19 |
return dikt |
|
20 |
return FlaskJSONEncoder.default(self, o) |
swagger_server/models/__init__.py | ||
---|---|---|
1 |
# coding: utf-8 |
|
2 |
|
|
3 |
# flake8: noqa |
|
4 |
from __future__ import absolute_import |
|
5 |
# import models into model package |
|
6 |
from swagger_server.models.ca_usage import CAUsage |
|
7 |
from swagger_server.models.certificate import Certificate |
|
8 |
from swagger_server.models.certificate_list_item import CertificateListItem |
|
9 |
from swagger_server.models.certificate_list_response import CertificateListResponse |
|
10 |
from swagger_server.models.certificate_request import CertificateRequest |
|
11 |
from swagger_server.models.certificate_response import CertificateResponse |
|
12 |
from swagger_server.models.created_response import CreatedResponse |
|
13 |
from swagger_server.models.error_response import ErrorResponse |
|
14 |
from swagger_server.models.filtering import Filtering |
|
15 |
from swagger_server.models.id_parameter import IdParameter |
|
16 |
from swagger_server.models.issuer_list_item import IssuerListItem |
|
17 |
from swagger_server.models.pem_response import PemResponse |
|
18 |
from swagger_server.models.subject import Subject |
swagger_server/models/base_model_.py | ||
---|---|---|
1 |
import pprint |
|
2 |
|
|
3 |
import six |
|
4 |
import typing |
|
5 |
|
|
6 |
from swagger_server import util |
|
7 |
|
|
8 |
T = typing.TypeVar('T') |
|
9 |
|
|
10 |
|
|
11 |
class Model(object): |
|
12 |
# swaggerTypes: The key is attribute name and the |
|
13 |
# value is attribute type. |
|
14 |
swagger_types = {} |
|
15 |
|
|
16 |
# attributeMap: The key is attribute name and the |
|
17 |
# value is json key in definition. |
|
18 |
attribute_map = {} |
|
19 |
|
|
20 |
@classmethod |
|
21 |
def from_dict(cls: typing.Type[T], dikt) -> T: |
|
22 |
"""Returns the dict as a model""" |
|
23 |
return util.deserialize_model(dikt, cls) |
|
24 |
|
|
25 |
def to_dict(self): |
|
26 |
"""Returns the model properties as a dict |
|
27 |
|
|
28 |
:rtype: dict |
|
29 |
""" |
|
30 |
result = {} |
|
31 |
|
|
32 |
for attr, _ in six.iteritems(self.swagger_types): |
|
33 |
value = getattr(self, attr) |
|
34 |
if isinstance(value, list): |
|
35 |
result[attr] = list(map( |
|
36 |
lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
|
37 |
value |
|
38 |
)) |
|
39 |
elif hasattr(value, "to_dict"): |
|
40 |
result[attr] = value.to_dict() |
|
41 |
elif isinstance(value, dict): |
|
42 |
result[attr] = dict(map( |
|
43 |
lambda item: (item[0], item[1].to_dict()) |
|
44 |
if hasattr(item[1], "to_dict") else item, |
|
45 |
value.items() |
|
46 |
)) |
|
47 |
else: |
|
48 |
result[attr] = value |
|
49 |
|
|
50 |
return result |
|
51 |
|
|
52 |
def to_str(self): |
|
53 |
"""Returns the string representation of the model |
|
54 |
|
|
55 |
:rtype: str |
|
56 |
""" |
|
57 |
return pprint.pformat(self.to_dict()) |
|
58 |
|
|
59 |
def __repr__(self): |
|
60 |
"""For `print` and `pprint`""" |
|
61 |
return self.to_str() |
|
62 |
|
|
63 |
def __eq__(self, other): |
|
64 |
"""Returns true if both objects are equal""" |
|
65 |
return self.__dict__ == other.__dict__ |
|
66 |
|
|
67 |
def __ne__(self, other): |
|
68 |
"""Returns true if both objects are not equal""" |
|
69 |
return not self == other |
swagger_server/models/ca_usage.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class CAUsage(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, ca: bool=None, authentication: bool=None, digital_signature: bool=None, ssl: bool=None): # noqa: E501 |
|
18 |
"""CAUsage - a model defined in Swagger |
|
19 |
|
|
20 |
:param ca: The ca of this CAUsage. # noqa: E501 |
|
21 |
:type ca: bool |
|
22 |
:param authentication: The authentication of this CAUsage. # noqa: E501 |
|
23 |
:type authentication: bool |
|
24 |
:param digital_signature: The digital_signature of this CAUsage. # noqa: E501 |
|
25 |
:type digital_signature: bool |
|
26 |
:param ssl: The ssl of this CAUsage. # noqa: E501 |
|
27 |
:type ssl: bool |
|
28 |
""" |
|
29 |
self.swagger_types = { |
|
30 |
'ca': bool, |
|
31 |
'authentication': bool, |
|
32 |
'digital_signature': bool, |
|
33 |
'ssl': bool |
|
34 |
} |
|
35 |
|
|
36 |
self.attribute_map = { |
|
37 |
'ca': 'CA', |
|
38 |
'authentication': 'authentication', |
|
39 |
'digital_signature': 'digitalSignature', |
|
40 |
'ssl': 'SSL' |
|
41 |
} |
|
42 |
self._ca = ca |
|
43 |
self._authentication = authentication |
|
44 |
self._digital_signature = digital_signature |
|
45 |
self._ssl = ssl |
|
46 |
|
|
47 |
@classmethod |
|
48 |
def from_dict(cls, dikt) -> 'CAUsage': |
|
49 |
"""Returns the dict as a model |
|
50 |
|
|
51 |
:param dikt: A dict. |
|
52 |
:type: dict |
|
53 |
:return: The CAUsage of this CAUsage. # noqa: E501 |
|
54 |
:rtype: CAUsage |
|
55 |
""" |
|
56 |
return util.deserialize_model(dikt, cls) |
|
57 |
|
|
58 |
@property |
|
59 |
def ca(self) -> bool: |
|
60 |
"""Gets the ca of this CAUsage. |
|
61 |
|
|
62 |
|
|
63 |
:return: The ca of this CAUsage. |
|
64 |
:rtype: bool |
|
65 |
""" |
|
66 |
return self._ca |
|
67 |
|
|
68 |
@ca.setter |
|
69 |
def ca(self, ca: bool): |
|
70 |
"""Sets the ca of this CAUsage. |
|
71 |
|
|
72 |
|
|
73 |
:param ca: The ca of this CAUsage. |
|
74 |
:type ca: bool |
|
75 |
""" |
|
76 |
if ca is None: |
|
77 |
raise ValueError("Invalid value for `ca`, must not be `None`") # noqa: E501 |
|
78 |
|
|
79 |
self._ca = ca |
|
80 |
|
|
81 |
@property |
|
82 |
def authentication(self) -> bool: |
|
83 |
"""Gets the authentication of this CAUsage. |
|
84 |
|
|
85 |
|
|
86 |
:return: The authentication of this CAUsage. |
|
87 |
:rtype: bool |
|
88 |
""" |
|
89 |
return self._authentication |
|
90 |
|
|
91 |
@authentication.setter |
|
92 |
def authentication(self, authentication: bool): |
|
93 |
"""Sets the authentication of this CAUsage. |
|
94 |
|
|
95 |
|
|
96 |
:param authentication: The authentication of this CAUsage. |
|
97 |
:type authentication: bool |
|
98 |
""" |
|
99 |
if authentication is None: |
|
100 |
raise ValueError("Invalid value for `authentication`, must not be `None`") # noqa: E501 |
|
101 |
|
|
102 |
self._authentication = authentication |
|
103 |
|
|
104 |
@property |
|
105 |
def digital_signature(self) -> bool: |
|
106 |
"""Gets the digital_signature of this CAUsage. |
|
107 |
|
|
108 |
|
|
109 |
:return: The digital_signature of this CAUsage. |
|
110 |
:rtype: bool |
|
111 |
""" |
|
112 |
return self._digital_signature |
|
113 |
|
|
114 |
@digital_signature.setter |
|
115 |
def digital_signature(self, digital_signature: bool): |
|
116 |
"""Sets the digital_signature of this CAUsage. |
|
117 |
|
|
118 |
|
|
119 |
:param digital_signature: The digital_signature of this CAUsage. |
|
120 |
:type digital_signature: bool |
|
121 |
""" |
|
122 |
if digital_signature is None: |
|
123 |
raise ValueError("Invalid value for `digital_signature`, must not be `None`") # noqa: E501 |
|
124 |
|
|
125 |
self._digital_signature = digital_signature |
|
126 |
|
|
127 |
@property |
|
128 |
def ssl(self) -> bool: |
|
129 |
"""Gets the ssl of this CAUsage. |
|
130 |
|
|
131 |
|
|
132 |
:return: The ssl of this CAUsage. |
|
133 |
:rtype: bool |
|
134 |
""" |
|
135 |
return self._ssl |
|
136 |
|
|
137 |
@ssl.setter |
|
138 |
def ssl(self, ssl: bool): |
|
139 |
"""Sets the ssl of this CAUsage. |
|
140 |
|
|
141 |
|
|
142 |
:param ssl: The ssl of this CAUsage. |
|
143 |
:type ssl: bool |
|
144 |
""" |
|
145 |
if ssl is None: |
|
146 |
raise ValueError("Invalid value for `ssl`, must not be `None`") # noqa: E501 |
|
147 |
|
|
148 |
self._ssl = ssl |
swagger_server/models/certificate.py | ||
---|---|---|
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 |
swagger_server/models/certificate_list_item.py | ||
---|---|---|
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.issuer_list_item import IssuerListItem # noqa: F401,E501 |
|
11 |
from swagger_server import util |
|
12 |
|
|
13 |
|
|
14 |
class CertificateListItem(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, id: int=None, cn: str=None, not_before: date=None, not_after: date=None, usage: CAUsage=None, issuer: IssuerListItem=None): # noqa: E501 |
|
20 |
"""CertificateListItem - a model defined in Swagger |
|
21 |
|
|
22 |
:param id: The id of this CertificateListItem. # noqa: E501 |
|
23 |
:type id: int |
|
24 |
:param cn: The cn of this CertificateListItem. # noqa: E501 |
|
25 |
:type cn: str |
|
26 |
:param not_before: The not_before of this CertificateListItem. # noqa: E501 |
|
27 |
:type not_before: date |
|
28 |
:param not_after: The not_after of this CertificateListItem. # noqa: E501 |
|
29 |
:type not_after: date |
|
30 |
:param usage: The usage of this CertificateListItem. # noqa: E501 |
|
31 |
:type usage: CAUsage |
|
32 |
:param issuer: The issuer of this CertificateListItem. # noqa: E501 |
|
33 |
:type issuer: IssuerListItem |
|
34 |
""" |
|
35 |
self.swagger_types = { |
|
36 |
'id': int, |
|
37 |
'cn': str, |
|
38 |
'not_before': date, |
|
39 |
'not_after': date, |
|
40 |
'usage': CAUsage, |
|
41 |
'issuer': IssuerListItem |
|
42 |
} |
|
43 |
|
|
44 |
self.attribute_map = { |
|
45 |
'id': 'id', |
|
46 |
'cn': 'CN', |
|
47 |
'not_before': 'notBefore', |
|
48 |
'not_after': 'notAfter', |
|
49 |
'usage': 'usage', |
|
50 |
'issuer': 'issuer' |
|
51 |
} |
|
52 |
self._id = id |
|
53 |
self._cn = cn |
|
54 |
self._not_before = not_before |
|
55 |
self._not_after = not_after |
|
56 |
self._usage = usage |
|
57 |
self._issuer = issuer |
|
58 |
|
|
59 |
@classmethod |
|
60 |
def from_dict(cls, dikt) -> 'CertificateListItem': |
|
61 |
"""Returns the dict as a model |
|
62 |
|
|
63 |
:param dikt: A dict. |
|
64 |
:type: dict |
|
65 |
:return: The CertificateListItem of this CertificateListItem. # noqa: E501 |
|
66 |
:rtype: CertificateListItem |
|
67 |
""" |
|
68 |
return util.deserialize_model(dikt, cls) |
|
69 |
|
|
70 |
@property |
|
71 |
def id(self) -> int: |
|
72 |
"""Gets the id of this CertificateListItem. |
|
73 |
|
|
74 |
|
|
75 |
:return: The id of this CertificateListItem. |
|
76 |
:rtype: int |
|
77 |
""" |
|
78 |
return self._id |
|
79 |
|
|
80 |
@id.setter |
|
81 |
def id(self, id: int): |
|
82 |
"""Sets the id of this CertificateListItem. |
|
83 |
|
|
84 |
|
|
85 |
:param id: The id of this CertificateListItem. |
|
86 |
:type id: int |
|
87 |
""" |
|
88 |
|
|
89 |
self._id = id |
|
90 |
|
|
91 |
@property |
|
92 |
def cn(self) -> str: |
|
93 |
"""Gets the cn of this CertificateListItem. |
|
94 |
|
|
95 |
|
|
96 |
:return: The cn of this CertificateListItem. |
|
97 |
:rtype: str |
|
98 |
""" |
|
99 |
return self._cn |
|
100 |
|
|
101 |
@cn.setter |
|
102 |
def cn(self, cn: str): |
|
103 |
"""Sets the cn of this CertificateListItem. |
|
104 |
|
|
105 |
|
|
106 |
:param cn: The cn of this CertificateListItem. |
|
107 |
:type cn: str |
|
108 |
""" |
|
109 |
|
|
110 |
self._cn = cn |
|
111 |
|
|
112 |
@property |
|
113 |
def not_before(self) -> date: |
|
114 |
"""Gets the not_before of this CertificateListItem. |
|
115 |
|
|
116 |
|
|
117 |
:return: The not_before of this CertificateListItem. |
|
118 |
:rtype: date |
|
119 |
""" |
|
120 |
return self._not_before |
|
121 |
|
|
122 |
@not_before.setter |
|
123 |
def not_before(self, not_before: date): |
|
124 |
"""Sets the not_before of this CertificateListItem. |
|
125 |
|
|
126 |
|
|
127 |
:param not_before: The not_before of this CertificateListItem. |
|
128 |
:type not_before: date |
|
129 |
""" |
|
130 |
|
|
131 |
self._not_before = not_before |
|
132 |
|
|
133 |
@property |
|
134 |
def not_after(self) -> date: |
|
135 |
"""Gets the not_after of this CertificateListItem. |
|
136 |
|
|
137 |
|
|
138 |
:return: The not_after of this CertificateListItem. |
|
139 |
:rtype: date |
|
140 |
""" |
|
141 |
return self._not_after |
|
142 |
|
|
143 |
@not_after.setter |
|
144 |
def not_after(self, not_after: date): |
|
145 |
"""Sets the not_after of this CertificateListItem. |
|
146 |
|
|
147 |
|
|
148 |
:param not_after: The not_after of this CertificateListItem. |
|
149 |
:type not_after: date |
|
150 |
""" |
|
151 |
|
|
152 |
self._not_after = not_after |
|
153 |
|
|
154 |
@property |
|
155 |
def usage(self) -> CAUsage: |
|
156 |
"""Gets the usage of this CertificateListItem. |
|
157 |
|
|
158 |
|
|
159 |
:return: The usage of this CertificateListItem. |
|
160 |
:rtype: CAUsage |
|
161 |
""" |
|
162 |
return self._usage |
|
163 |
|
|
164 |
@usage.setter |
|
165 |
def usage(self, usage: CAUsage): |
|
166 |
"""Sets the usage of this CertificateListItem. |
|
167 |
|
|
168 |
|
|
169 |
:param usage: The usage of this CertificateListItem. |
|
170 |
:type usage: CAUsage |
|
171 |
""" |
|
172 |
|
|
173 |
self._usage = usage |
|
174 |
|
|
175 |
@property |
|
176 |
def issuer(self) -> IssuerListItem: |
|
177 |
"""Gets the issuer of this CertificateListItem. |
|
178 |
|
|
179 |
|
|
180 |
:return: The issuer of this CertificateListItem. |
|
181 |
:rtype: IssuerListItem |
|
182 |
""" |
|
183 |
return self._issuer |
|
184 |
|
|
185 |
@issuer.setter |
|
186 |
def issuer(self, issuer: IssuerListItem): |
|
187 |
"""Sets the issuer of this CertificateListItem. |
|
188 |
|
|
189 |
|
|
190 |
:param issuer: The issuer of this CertificateListItem. |
|
191 |
:type issuer: IssuerListItem |
|
192 |
""" |
|
193 |
|
|
194 |
self._issuer = issuer |
swagger_server/models/certificate_list_response.py | ||
---|---|---|
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.certificate_list_item import CertificateListItem # noqa: F401,E501 |
|
10 |
from swagger_server import util |
|
11 |
|
|
12 |
|
|
13 |
class CertificateListResponse(Model): |
|
14 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
15 |
|
|
16 |
Do not edit the class manually. |
|
17 |
""" |
|
18 |
def __init__(self, success: bool=None, data: List[CertificateListItem]=None): # noqa: E501 |
|
19 |
"""CertificateListResponse - a model defined in Swagger |
|
20 |
|
|
21 |
:param success: The success of this CertificateListResponse. # noqa: E501 |
|
22 |
:type success: bool |
|
23 |
:param data: The data of this CertificateListResponse. # noqa: E501 |
|
24 |
:type data: List[CertificateListItem] |
|
25 |
""" |
|
26 |
self.swagger_types = { |
|
27 |
'success': bool, |
|
28 |
'data': List[CertificateListItem] |
|
29 |
} |
|
30 |
|
|
31 |
self.attribute_map = { |
|
32 |
'success': 'success', |
|
33 |
'data': 'data' |
|
34 |
} |
|
35 |
self._success = success |
|
36 |
self._data = data |
|
37 |
|
|
38 |
@classmethod |
|
39 |
def from_dict(cls, dikt) -> 'CertificateListResponse': |
|
40 |
"""Returns the dict as a model |
|
41 |
|
|
42 |
:param dikt: A dict. |
|
43 |
:type: dict |
|
44 |
:return: The CertificateListResponse of this CertificateListResponse. # noqa: E501 |
|
45 |
:rtype: CertificateListResponse |
|
46 |
""" |
|
47 |
return util.deserialize_model(dikt, cls) |
|
48 |
|
|
49 |
@property |
|
50 |
def success(self) -> bool: |
|
51 |
"""Gets the success of this CertificateListResponse. |
|
52 |
|
|
53 |
|
|
54 |
:return: The success of this CertificateListResponse. |
|
55 |
:rtype: bool |
|
56 |
""" |
|
57 |
return self._success |
|
58 |
|
|
59 |
@success.setter |
|
60 |
def success(self, success: bool): |
|
61 |
"""Sets the success of this CertificateListResponse. |
|
62 |
|
|
63 |
|
|
64 |
:param success: The success of this CertificateListResponse. |
|
65 |
:type success: bool |
|
66 |
""" |
|
67 |
|
|
68 |
self._success = success |
|
69 |
|
|
70 |
@property |
|
71 |
def data(self) -> List[CertificateListItem]: |
|
72 |
"""Gets the data of this CertificateListResponse. |
|
73 |
|
|
74 |
|
|
75 |
:return: The data of this CertificateListResponse. |
|
76 |
:rtype: List[CertificateListItem] |
|
77 |
""" |
|
78 |
return self._data |
|
79 |
|
|
80 |
@data.setter |
|
81 |
def data(self, data: List[CertificateListItem]): |
|
82 |
"""Sets the data of this CertificateListResponse. |
|
83 |
|
|
84 |
|
|
85 |
:param data: The data of this CertificateListResponse. |
|
86 |
:type data: List[CertificateListItem] |
|
87 |
""" |
|
88 |
|
|
89 |
self._data = data |
swagger_server/models/certificate_request.py | ||
---|---|---|
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 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 |
swagger_server/models/certificate_response.py | ||
---|---|---|
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.certificate import Certificate # noqa: F401,E501 |
|
10 |
from swagger_server import util |
|
11 |
|
|
12 |
|
|
13 |
class CertificateResponse(Model): |
|
14 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
15 |
|
|
16 |
Do not edit the class manually. |
|
17 |
""" |
|
18 |
def __init__(self, success: bool=None, data: Certificate=None): # noqa: E501 |
|
19 |
"""CertificateResponse - a model defined in Swagger |
|
20 |
|
|
21 |
:param success: The success of this CertificateResponse. # noqa: E501 |
|
22 |
:type success: bool |
|
23 |
:param data: The data of this CertificateResponse. # noqa: E501 |
|
24 |
:type data: Certificate |
|
25 |
""" |
|
26 |
self.swagger_types = { |
|
27 |
'success': bool, |
|
28 |
'data': Certificate |
|
29 |
} |
|
30 |
|
|
31 |
self.attribute_map = { |
|
32 |
'success': 'success', |
|
33 |
'data': 'data' |
|
34 |
} |
|
35 |
self._success = success |
|
36 |
self._data = data |
|
37 |
|
|
38 |
@classmethod |
|
39 |
def from_dict(cls, dikt) -> 'CertificateResponse': |
|
40 |
"""Returns the dict as a model |
|
41 |
|
|
42 |
:param dikt: A dict. |
|
43 |
:type: dict |
|
44 |
:return: The CertificateResponse of this CertificateResponse. # noqa: E501 |
|
45 |
:rtype: CertificateResponse |
|
46 |
""" |
|
47 |
return util.deserialize_model(dikt, cls) |
|
48 |
|
|
49 |
@property |
|
50 |
def success(self) -> bool: |
|
51 |
"""Gets the success of this CertificateResponse. |
|
52 |
|
|
53 |
|
|
54 |
:return: The success of this CertificateResponse. |
|
55 |
:rtype: bool |
|
56 |
""" |
|
57 |
return self._success |
|
58 |
|
|
59 |
@success.setter |
|
60 |
def success(self, success: bool): |
|
61 |
"""Sets the success of this CertificateResponse. |
|
62 |
|
|
63 |
|
|
64 |
:param success: The success of this CertificateResponse. |
|
65 |
:type success: bool |
|
66 |
""" |
|
67 |
if success is None: |
|
68 |
raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501 |
|
69 |
|
|
70 |
self._success = success |
|
71 |
|
|
72 |
@property |
|
73 |
def data(self) -> Certificate: |
|
74 |
"""Gets the data of this CertificateResponse. |
|
75 |
|
|
76 |
|
|
77 |
:return: The data of this CertificateResponse. |
|
78 |
:rtype: Certificate |
|
79 |
""" |
|
80 |
return self._data |
|
81 |
|
|
82 |
@data.setter |
|
83 |
def data(self, data: Certificate): |
|
84 |
"""Sets the data of this CertificateResponse. |
|
85 |
|
|
86 |
|
|
87 |
:param data: The data of this CertificateResponse. |
|
88 |
:type data: Certificate |
|
89 |
""" |
|
90 |
if data is None: |
|
91 |
raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 |
|
92 |
|
|
93 |
self._data = data |
swagger_server/models/created_response.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class CreatedResponse(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, success: bool=None, data: int=None): # noqa: E501 |
|
18 |
"""CreatedResponse - a model defined in Swagger |
|
19 |
|
|
20 |
:param success: The success of this CreatedResponse. # noqa: E501 |
|
21 |
:type success: bool |
|
22 |
:param data: The data of this CreatedResponse. # noqa: E501 |
|
23 |
:type data: int |
|
24 |
""" |
|
25 |
self.swagger_types = { |
|
26 |
'success': bool, |
|
27 |
'data': int |
|
28 |
} |
|
29 |
|
|
30 |
self.attribute_map = { |
|
31 |
'success': 'success', |
|
32 |
'data': 'data' |
|
33 |
} |
|
34 |
self._success = success |
|
35 |
self._data = data |
|
36 |
|
|
37 |
@classmethod |
|
38 |
def from_dict(cls, dikt) -> 'CreatedResponse': |
|
39 |
"""Returns the dict as a model |
|
40 |
|
|
41 |
:param dikt: A dict. |
|
42 |
:type: dict |
|
43 |
:return: The CreatedResponse of this CreatedResponse. # noqa: E501 |
|
44 |
:rtype: CreatedResponse |
|
45 |
""" |
|
46 |
return util.deserialize_model(dikt, cls) |
|
47 |
|
|
48 |
@property |
|
49 |
def success(self) -> bool: |
|
50 |
"""Gets the success of this CreatedResponse. |
|
51 |
|
|
52 |
|
|
53 |
:return: The success of this CreatedResponse. |
|
54 |
:rtype: bool |
|
55 |
""" |
|
56 |
return self._success |
|
57 |
|
|
58 |
@success.setter |
|
59 |
def success(self, success: bool): |
|
60 |
"""Sets the success of this CreatedResponse. |
|
61 |
|
|
62 |
|
|
63 |
:param success: The success of this CreatedResponse. |
|
64 |
:type success: bool |
|
65 |
""" |
|
66 |
if success is None: |
|
67 |
raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501 |
|
68 |
|
|
69 |
self._success = success |
|
70 |
|
|
71 |
@property |
|
72 |
def data(self) -> int: |
|
73 |
"""Gets the data of this CreatedResponse. |
|
74 |
|
|
75 |
|
|
76 |
:return: The data of this CreatedResponse. |
|
77 |
:rtype: int |
|
78 |
""" |
|
79 |
return self._data |
|
80 |
|
|
81 |
@data.setter |
|
82 |
def data(self, data: int): |
|
83 |
"""Sets the data of this CreatedResponse. |
|
84 |
|
|
85 |
|
|
86 |
:param data: The data of this CreatedResponse. |
|
87 |
:type data: int |
|
88 |
""" |
|
89 |
if data is None: |
|
90 |
raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 |
|
91 |
|
|
92 |
self._data = data |
swagger_server/models/error_response.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class ErrorResponse(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, success: bool=None, data: str=None): # noqa: E501 |
|
18 |
"""ErrorResponse - a model defined in Swagger |
|
19 |
|
|
20 |
:param success: The success of this ErrorResponse. # noqa: E501 |
|
21 |
:type success: bool |
|
22 |
:param data: The data of this ErrorResponse. # noqa: E501 |
|
23 |
:type data: str |
|
24 |
""" |
|
25 |
self.swagger_types = { |
|
26 |
'success': bool, |
|
27 |
'data': str |
|
28 |
} |
|
29 |
|
|
30 |
self.attribute_map = { |
|
31 |
'success': 'success', |
|
32 |
'data': 'data' |
|
33 |
} |
|
34 |
self._success = success |
|
35 |
self._data = data |
|
36 |
|
|
37 |
@classmethod |
|
38 |
def from_dict(cls, dikt) -> 'ErrorResponse': |
|
39 |
"""Returns the dict as a model |
|
40 |
|
|
41 |
:param dikt: A dict. |
|
42 |
:type: dict |
|
43 |
:return: The ErrorResponse of this ErrorResponse. # noqa: E501 |
|
44 |
:rtype: ErrorResponse |
|
45 |
""" |
|
46 |
return util.deserialize_model(dikt, cls) |
|
47 |
|
|
48 |
@property |
|
49 |
def success(self) -> bool: |
|
50 |
"""Gets the success of this ErrorResponse. |
|
51 |
|
|
52 |
|
|
53 |
:return: The success of this ErrorResponse. |
|
54 |
:rtype: bool |
|
55 |
""" |
|
56 |
return self._success |
|
57 |
|
|
58 |
@success.setter |
|
59 |
def success(self, success: bool): |
|
60 |
"""Sets the success of this ErrorResponse. |
|
61 |
|
|
62 |
|
|
63 |
:param success: The success of this ErrorResponse. |
|
64 |
:type success: bool |
|
65 |
""" |
|
66 |
if success is None: |
|
67 |
raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501 |
|
68 |
|
|
69 |
self._success = success |
|
70 |
|
|
71 |
@property |
|
72 |
def data(self) -> str: |
|
73 |
"""Gets the data of this ErrorResponse. |
|
74 |
|
|
75 |
|
|
76 |
:return: The data of this ErrorResponse. |
|
77 |
:rtype: str |
|
78 |
""" |
|
79 |
return self._data |
|
80 |
|
|
81 |
@data.setter |
|
82 |
def data(self, data: str): |
|
83 |
"""Sets the data of this ErrorResponse. |
|
84 |
|
|
85 |
|
|
86 |
:param data: The data of this ErrorResponse. |
|
87 |
:type data: str |
|
88 |
""" |
|
89 |
if data is None: |
|
90 |
raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 |
|
91 |
|
|
92 |
self._data = data |
swagger_server/models/filtering.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class Filtering(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, ca: bool=None): # noqa: E501 |
|
18 |
"""Filtering - a model defined in Swagger |
|
19 |
|
|
20 |
:param ca: The ca of this Filtering. # noqa: E501 |
|
21 |
:type ca: bool |
|
22 |
""" |
|
23 |
self.swagger_types = { |
|
24 |
'ca': bool |
|
25 |
} |
|
26 |
|
|
27 |
self.attribute_map = { |
|
28 |
'ca': 'CA' |
|
29 |
} |
|
30 |
self._ca = ca |
|
31 |
|
|
32 |
@classmethod |
|
33 |
def from_dict(cls, dikt) -> 'Filtering': |
|
34 |
"""Returns the dict as a model |
|
35 |
|
|
36 |
:param dikt: A dict. |
|
37 |
:type: dict |
|
38 |
:return: The Filtering of this Filtering. # noqa: E501 |
|
39 |
:rtype: Filtering |
|
40 |
""" |
|
41 |
return util.deserialize_model(dikt, cls) |
|
42 |
|
|
43 |
@property |
|
44 |
def ca(self) -> bool: |
|
45 |
"""Gets the ca of this Filtering. |
|
46 |
|
|
47 |
|
|
48 |
:return: The ca of this Filtering. |
|
49 |
:rtype: bool |
|
50 |
""" |
|
51 |
return self._ca |
|
52 |
|
|
53 |
@ca.setter |
|
54 |
def ca(self, ca: bool): |
|
55 |
"""Sets the ca of this Filtering. |
|
56 |
|
|
57 |
|
|
58 |
:param ca: The ca of this Filtering. |
|
59 |
:type ca: bool |
|
60 |
""" |
|
61 |
|
|
62 |
self._ca = ca |
swagger_server/models/id_parameter.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class IdParameter(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, id: int=None): # noqa: E501 |
|
18 |
"""IdParameter - a model defined in Swagger |
|
19 |
|
|
20 |
:param id: The id of this IdParameter. # noqa: E501 |
|
21 |
:type id: int |
|
22 |
""" |
|
23 |
self.swagger_types = { |
|
24 |
'id': int |
|
25 |
} |
|
26 |
|
|
27 |
self.attribute_map = { |
|
28 |
'id': 'id' |
|
29 |
} |
|
30 |
self._id = id |
|
31 |
|
|
32 |
@classmethod |
|
33 |
def from_dict(cls, dikt) -> 'IdParameter': |
|
34 |
"""Returns the dict as a model |
|
35 |
|
|
36 |
:param dikt: A dict. |
|
37 |
:type: dict |
|
38 |
:return: The IdParameter of this IdParameter. # noqa: E501 |
|
39 |
:rtype: IdParameter |
|
40 |
""" |
|
41 |
return util.deserialize_model(dikt, cls) |
|
42 |
|
|
43 |
@property |
|
44 |
def id(self) -> int: |
|
45 |
"""Gets the id of this IdParameter. |
|
46 |
|
|
47 |
|
|
48 |
:return: The id of this IdParameter. |
|
49 |
:rtype: int |
|
50 |
""" |
|
51 |
return self._id |
|
52 |
|
|
53 |
@id.setter |
|
54 |
def id(self, id: int): |
|
55 |
"""Sets the id of this IdParameter. |
|
56 |
|
|
57 |
|
|
58 |
:param id: The id of this IdParameter. |
|
59 |
:type id: int |
|
60 |
""" |
|
61 |
if id is None: |
|
62 |
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 |
|
63 |
|
|
64 |
self._id = id |
swagger_server/models/issuer_list_item.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class IssuerListItem(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, id: int=None, cn: str=None): # noqa: E501 |
|
18 |
"""IssuerListItem - a model defined in Swagger |
|
19 |
|
|
20 |
:param id: The id of this IssuerListItem. # noqa: E501 |
|
21 |
:type id: int |
|
22 |
:param cn: The cn of this IssuerListItem. # noqa: E501 |
|
23 |
:type cn: str |
|
24 |
""" |
|
25 |
self.swagger_types = { |
|
26 |
'id': int, |
|
27 |
'cn': str |
|
28 |
} |
|
29 |
|
|
30 |
self.attribute_map = { |
|
31 |
'id': 'id', |
|
32 |
'cn': 'CN' |
|
33 |
} |
|
34 |
self._id = id |
|
35 |
self._cn = cn |
|
36 |
|
|
37 |
@classmethod |
|
38 |
def from_dict(cls, dikt) -> 'IssuerListItem': |
|
39 |
"""Returns the dict as a model |
|
40 |
|
|
41 |
:param dikt: A dict. |
|
42 |
:type: dict |
|
43 |
:return: The IssuerListItem of this IssuerListItem. # noqa: E501 |
|
44 |
:rtype: IssuerListItem |
|
45 |
""" |
|
46 |
return util.deserialize_model(dikt, cls) |
|
47 |
|
|
48 |
@property |
|
49 |
def id(self) -> int: |
|
50 |
"""Gets the id of this IssuerListItem. |
|
51 |
|
|
52 |
|
|
53 |
:return: The id of this IssuerListItem. |
|
54 |
:rtype: int |
|
55 |
""" |
|
56 |
return self._id |
|
57 |
|
|
58 |
@id.setter |
|
59 |
def id(self, id: int): |
|
60 |
"""Sets the id of this IssuerListItem. |
|
61 |
|
|
62 |
|
|
63 |
:param id: The id of this IssuerListItem. |
|
64 |
:type id: int |
|
65 |
""" |
|
66 |
if id is None: |
|
67 |
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 |
|
68 |
|
|
69 |
self._id = id |
|
70 |
|
|
71 |
@property |
|
72 |
def cn(self) -> str: |
|
73 |
"""Gets the cn of this IssuerListItem. |
|
74 |
|
|
75 |
|
|
76 |
:return: The cn of this IssuerListItem. |
|
77 |
:rtype: str |
|
78 |
""" |
|
79 |
return self._cn |
|
80 |
|
|
81 |
@cn.setter |
|
82 |
def cn(self, cn: str): |
|
83 |
"""Sets the cn of this IssuerListItem. |
|
84 |
|
|
85 |
|
|
86 |
:param cn: The cn of this IssuerListItem. |
|
87 |
:type cn: str |
|
88 |
""" |
|
89 |
if cn is None: |
|
90 |
raise ValueError("Invalid value for `cn`, must not be `None`") # noqa: E501 |
|
91 |
|
|
92 |
self._cn = cn |
swagger_server/models/pem_response.py | ||
---|---|---|
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 import util |
|
10 |
|
|
11 |
|
|
12 |
class PemResponse(Model): |
|
13 |
"""NOTE: This class is auto generated by the swagger code generator program. |
|
14 |
|
|
15 |
Do not edit the class manually. |
|
16 |
""" |
|
17 |
def __init__(self, success: bool=None, data: str=None): # noqa: E501 |
|
18 |
"""PemResponse - a model defined in Swagger |
|
19 |
|
|
20 |
:param success: The success of this PemResponse. # noqa: E501 |
|
21 |
:type success: bool |
|
22 |
:param data: The data of this PemResponse. # noqa: E501 |
|
23 |
:type data: str |
|
24 |
""" |
|
25 |
self.swagger_types = { |
|
26 |
'success': bool, |
Také k dispozici: Unified diff
Re #8476 - Added swagger-generated server stub.