Source code for sdkms.v1.models.history_item_state

# coding: utf-8

"""
    Fortanix DSM REST API

    This is a set of REST APIs for accessing the Fortanix Data Security Manager. This includes APIs for managing accounts, and for performing cryptographic and key management operations. 

    OpenAPI spec version: 1.0.0-20200608
    Contact: support@fortanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
        http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from pprint import pformat
from six import iteritems
import re




# NOTE: This class is auto generated by the swagger code generator program.
# Do not edit the class manually.
[docs]class HistoryItemState(object): """ 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 = { 'activation_date': 'str', 'revocation_reason': 'RevocationReasonCode', 'compromise_date': 'str', 'deactivation_date': 'str', 'destruction_date': 'str', 'deletion_date': 'str', 'state': 'KeyObjectState', 'key_ops': 'list[KeyOperations]', 'public_only': 'bool', 'rotation_policy': 'RotationPolicy', 'group_id': 'str' } attribute_map = { 'activation_date': 'activation_date', 'revocation_reason': 'revocation_reason', 'compromise_date': 'compromise_date', 'deactivation_date': 'deactivation_date', 'destruction_date': 'destruction_date', 'deletion_date': 'deletion_date', 'state': 'state', 'key_ops': 'key_ops', 'public_only': 'public_only', 'rotation_policy': 'rotation_policy', 'group_id': 'group_id' }
[docs] def __init__(self, activation_date=None, revocation_reason=None, compromise_date=None, deactivation_date=None, destruction_date=None, deletion_date=None, state=None, key_ops=None, public_only=None, rotation_policy=None, group_id=None): """ HistoryItemState - a model defined in Swagger """ self._activation_date = None self._revocation_reason = None self._compromise_date = None self._deactivation_date = None self._destruction_date = None self._deletion_date = None self._state = None self._key_ops = None self._public_only = None self._rotation_policy = None self._group_id = None if activation_date is not None: self.activation_date = activation_date if revocation_reason is not None: self.revocation_reason = revocation_reason if compromise_date is not None: self.compromise_date = compromise_date if deactivation_date is not None: self.deactivation_date = deactivation_date if destruction_date is not None: self.destruction_date = destruction_date if deletion_date is not None: self.deletion_date = deletion_date if state is not None: self.state = state if key_ops is not None: self.key_ops = key_ops if public_only is not None: self.public_only = public_only if rotation_policy is not None: self.rotation_policy = rotation_policy if group_id is not None: self.group_id = group_id
@property def activation_date(self): """ Gets the activation_date of this HistoryItemState. When this KeyObject will become active Type: `str` :setter: Sets the activation_date of this HistoryItemState. """ return self._activation_date @activation_date.setter def activation_date(self, activation_date): """ Sets the activation_date of this HistoryItemState. When this KeyObject will become active """ self._activation_date = activation_date @property def revocation_reason(self): """ Gets the revocation_reason of this HistoryItemState. Type: `RevocationReasonCode` :setter: Sets the revocation_reason of this HistoryItemState. """ return self._revocation_reason @revocation_reason.setter def revocation_reason(self, revocation_reason): """ Sets the revocation_reason of this HistoryItemState. """ self._revocation_reason = revocation_reason @property def compromise_date(self): """ Gets the compromise_date of this HistoryItemState. When this security object was compromised. Type: `str` :setter: Sets the compromise_date of this HistoryItemState. """ return self._compromise_date @compromise_date.setter def compromise_date(self, compromise_date): """ Sets the compromise_date of this HistoryItemState. When this security object was compromised. """ self._compromise_date = compromise_date @property def deactivation_date(self): """ Gets the deactivation_date of this HistoryItemState. When this security object was deactivated Type: `str` :setter: Sets the deactivation_date of this HistoryItemState. """ return self._deactivation_date @deactivation_date.setter def deactivation_date(self, deactivation_date): """ Sets the deactivation_date of this HistoryItemState. When this security object was deactivated """ self._deactivation_date = deactivation_date @property def destruction_date(self): """ Gets the destruction_date of this HistoryItemState. When this security object was destroyed Type: `str` :setter: Sets the destruction_date of this HistoryItemState. """ return self._destruction_date @destruction_date.setter def destruction_date(self, destruction_date): """ Sets the destruction_date of this HistoryItemState. When this security object was destroyed """ self._destruction_date = destruction_date @property def deletion_date(self): """ Gets the deletion_date of this HistoryItemState. When the security object was deleted Type: `str` :setter: Sets the deletion_date of this HistoryItemState. """ return self._deletion_date @deletion_date.setter def deletion_date(self, deletion_date): """ Sets the deletion_date of this HistoryItemState. When the security object was deleted """ self._deletion_date = deletion_date @property def state(self): """ Gets the state of this HistoryItemState. Type: `KeyObjectState` :setter: Sets the state of this HistoryItemState. """ return self._state @state.setter def state(self, state): """ Sets the state of this HistoryItemState. """ self._state = state @property def key_ops(self): """ Gets the key_ops of this HistoryItemState. Array of key operations enabled for this security object. Type: list[`KeyOperations`] :setter: Sets the key_ops of this HistoryItemState. """ return self._key_ops @key_ops.setter def key_ops(self, key_ops): """ Sets the key_ops of this HistoryItemState. Array of key operations enabled for this security object. """ self._key_ops = key_ops @property def public_only(self): """ Gets the public_only of this HistoryItemState. Whether the key object contains only a public part Type: `bool` :setter: Sets the public_only of this HistoryItemState. """ return self._public_only @public_only.setter def public_only(self, public_only): """ Sets the public_only of this HistoryItemState. Whether the key object contains only a public part """ self._public_only = public_only @property def rotation_policy(self): """ Gets the rotation_policy of this HistoryItemState. Type: `RotationPolicy` :setter: Sets the rotation_policy of this HistoryItemState. """ return self._rotation_policy @rotation_policy.setter def rotation_policy(self, rotation_policy): """ Sets the rotation_policy of this HistoryItemState. """ self._rotation_policy = rotation_policy @property def group_id(self): """ Gets the group_id of this HistoryItemState. Group ID (UUID) of the security group that this security object belonged to. Expect this property to always exist. Type: `str` :setter: Sets the group_id of this HistoryItemState. """ return self._group_id @group_id.setter def group_id(self, group_id): """ Sets the group_id of this HistoryItemState. Group ID (UUID) of the security group that this security object belonged to. Expect this property to always exist. """ self._group_id = group_id def to_dict(self): """ Returns the model properties as a dict """ result = {} for attr, _ in 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 return result def to_str(self): """ Returns the string representation of the model """ return 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, HistoryItemState): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other