Files
Labvoice/vendor/elabapi-python/elabapi_python/models/idp_cert.py
T
2026-08-30 20:44:00 +02:00

313 lines
8.8 KiB
Python

# coding: utf-8
"""
eLabFTW REST API v2 Documentation
This document describes all available endpoints and methods for eLabFTW's API version 2. # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class IdpCert(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
swagger_types = {
'id': 'int',
'x509': 'str',
'sha256': 'str',
'purpose': 'int',
'not_before': 'str',
'not_after': 'str',
'created_at': 'str',
'modified_at': 'str'
}
attribute_map = {
'id': 'id',
'x509': 'x509',
'sha256': 'sha256',
'purpose': 'purpose',
'not_before': 'not_before',
'not_after': 'not_after',
'created_at': 'created_at',
'modified_at': 'modified_at'
}
def __init__(self, id=None, x509=None, sha256=None, purpose=None, not_before=None, not_after=None, created_at=None, modified_at=None): # noqa: E501
"""IdpCert - a model defined in Swagger""" # noqa: E501
self._id = None
self._x509 = None
self._sha256 = None
self._purpose = None
self._not_before = None
self._not_after = None
self._created_at = None
self._modified_at = None
self.discriminator = None
self.id = id
self.x509 = x509
self.sha256 = sha256
self.purpose = purpose
if not_before is not None:
self.not_before = not_before
if not_after is not None:
self.not_after = not_after
self.created_at = created_at
self.modified_at = modified_at
@property
def id(self):
"""Gets the id of this IdpCert. # noqa: E501
:return: The id of this IdpCert. # noqa: E501
:rtype: int
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this IdpCert.
:param id: The id of this IdpCert. # noqa: E501
:type: int
"""
if id is None:
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
self._id = id
@property
def x509(self):
"""Gets the x509 of this IdpCert. # noqa: E501
Base64 encoded DER representation of the X.509 certificate (as stored in the database). # noqa: E501
:return: The x509 of this IdpCert. # noqa: E501
:rtype: str
"""
return self._x509
@x509.setter
def x509(self, x509):
"""Sets the x509 of this IdpCert.
Base64 encoded DER representation of the X.509 certificate (as stored in the database). # noqa: E501
:param x509: The x509 of this IdpCert. # noqa: E501
:type: str
"""
if x509 is None:
raise ValueError("Invalid value for `x509`, must not be `None`") # noqa: E501
self._x509 = x509
@property
def sha256(self):
"""Gets the sha256 of this IdpCert. # noqa: E501
Hex encoded SHA 256 fingerprint of the certificate. # noqa: E501
:return: The sha256 of this IdpCert. # noqa: E501
:rtype: str
"""
return self._sha256
@sha256.setter
def sha256(self, sha256):
"""Sets the sha256 of this IdpCert.
Hex encoded SHA 256 fingerprint of the certificate. # noqa: E501
:param sha256: The sha256 of this IdpCert. # noqa: E501
:type: str
"""
if sha256 is None:
raise ValueError("Invalid value for `sha256`, must not be `None`") # noqa: E501
self._sha256 = sha256
@property
def purpose(self):
"""Gets the purpose of this IdpCert. # noqa: E501
Usage of the certificate. 0 for signing, 1 for encryption. # noqa: E501
:return: The purpose of this IdpCert. # noqa: E501
:rtype: int
"""
return self._purpose
@purpose.setter
def purpose(self, purpose):
"""Sets the purpose of this IdpCert.
Usage of the certificate. 0 for signing, 1 for encryption. # noqa: E501
:param purpose: The purpose of this IdpCert. # noqa: E501
:type: int
"""
if purpose is None:
raise ValueError("Invalid value for `purpose`, must not be `None`") # noqa: E501
self._purpose = purpose
@property
def not_before(self):
"""Gets the not_before of this IdpCert. # noqa: E501
Validity starting date for certificate # noqa: E501
:return: The not_before of this IdpCert. # noqa: E501
:rtype: str
"""
return self._not_before
@not_before.setter
def not_before(self, not_before):
"""Sets the not_before of this IdpCert.
Validity starting date for certificate # noqa: E501
:param not_before: The not_before of this IdpCert. # noqa: E501
:type: str
"""
self._not_before = not_before
@property
def not_after(self):
"""Gets the not_after of this IdpCert. # noqa: E501
Validity end date for certificate # noqa: E501
:return: The not_after of this IdpCert. # noqa: E501
:rtype: str
"""
return self._not_after
@not_after.setter
def not_after(self, not_after):
"""Sets the not_after of this IdpCert.
Validity end date for certificate # noqa: E501
:param not_after: The not_after of this IdpCert. # noqa: E501
:type: str
"""
self._not_after = not_after
@property
def created_at(self):
"""Gets the created_at of this IdpCert. # noqa: E501
Timestamp when the certificate was created. # noqa: E501
:return: The created_at of this IdpCert. # noqa: E501
:rtype: str
"""
return self._created_at
@created_at.setter
def created_at(self, created_at):
"""Sets the created_at of this IdpCert.
Timestamp when the certificate was created. # noqa: E501
:param created_at: The created_at of this IdpCert. # noqa: E501
:type: str
"""
if created_at is None:
raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501
self._created_at = created_at
@property
def modified_at(self):
"""Gets the modified_at of this IdpCert. # noqa: E501
Timestamp when the certificate was last modified. # noqa: E501
:return: The modified_at of this IdpCert. # noqa: E501
:rtype: str
"""
return self._modified_at
@modified_at.setter
def modified_at(self, modified_at):
"""Sets the modified_at of this IdpCert.
Timestamp when the certificate was last modified. # noqa: E501
:param modified_at: The modified_at of this IdpCert. # noqa: E501
:type: str
"""
if modified_at is None:
raise ValueError("Invalid value for `modified_at`, must not be `None`") # noqa: E501
self._modified_at = modified_at
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
if issubclass(IdpCert, dict):
for key, value in self.items():
result[key] = value
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, IdpCert):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other