Source code for sdkms.v1.models.group

# 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 Group(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 = { 'name': 'str', 'group_id': 'str', 'description': 'str', 'acct_id': 'str', 'creator': 'CreatorType', 'created_at': 'str', 'hmg': 'dict(str, HmgConfig)', 'key_undo_policy': 'KeyUndoPolicy' } attribute_map = { 'name': 'name', 'group_id': 'group_id', 'description': 'description', 'acct_id': 'acct_id', 'creator': 'creator', 'created_at': 'created_at', 'hmg': 'hmg', 'key_undo_policy': 'key_undo_policy' }
[docs] def __init__(self, name=None, group_id=None, description=None, acct_id=None, creator=None, created_at=None, hmg=None, key_undo_policy=None): """ Group - a model defined in Swagger """ self._name = None self._group_id = None self._description = None self._acct_id = None self._creator = None self._created_at = None self._hmg = None self._key_undo_policy = None if name is not None: self.name = name if group_id is not None: self.group_id = group_id if description is not None: self.description = description if acct_id is not None: self.acct_id = acct_id if creator is not None: self.creator = creator if created_at is not None: self.created_at = created_at if hmg is not None: self.hmg = hmg if key_undo_policy is not None: self.key_undo_policy = key_undo_policy
@property def name(self): """ Gets the name of this Group. Name of the group. Group names must be unique within an account. Type: `str` :setter: Sets the name of this Group. """ return self._name @name.setter def name(self, name): """ Sets the name of this Group. Name of the group. Group names must be unique within an account. """ self._name = name @property def group_id(self): """ Gets the group_id of this Group. Group ID uniquely identifying this group. Type: `str` :setter: Sets the group_id of this Group. """ return self._group_id @group_id.setter def group_id(self, group_id): """ Sets the group_id of this Group. Group ID uniquely identifying this group. """ self._group_id = group_id @property def description(self): """ Gets the description of this Group. Description of the group. Type: `str` :setter: Sets the description of this Group. """ return self._description @description.setter def description(self, description): """ Sets the description of this Group. Description of the group. """ self._description = description @property def acct_id(self): """ Gets the acct_id of this Group. Account ID of the account this Group belongs to. Type: `str` :setter: Sets the acct_id of this Group. """ return self._acct_id @acct_id.setter def acct_id(self, acct_id): """ Sets the acct_id of this Group. Account ID of the account this Group belongs to. """ self._acct_id = acct_id @property def creator(self): """ Gets the creator of this Group. Type: `CreatorType` :setter: Sets the creator of this Group. """ return self._creator @creator.setter def creator(self, creator): """ Sets the creator of this Group. """ self._creator = creator @property def created_at(self): """ Gets the created_at of this Group. When this group was created. Type: `str` :setter: Sets the created_at of this Group. """ return self._created_at @created_at.setter def created_at(self, created_at): """ Sets the created_at of this Group. When this group was created. """ self._created_at = created_at @property def hmg(self): """ Gets the hmg of this Group. Map from UUIDs to HmgConfig objects Type: map[`HmgConfig`] :setter: Sets the hmg of this Group. """ return self._hmg @hmg.setter def hmg(self, hmg): """ Sets the hmg of this Group. Map from UUIDs to HmgConfig objects """ self._hmg = hmg @property def key_undo_policy(self): """ Gets the key_undo_policy of this Group. Type: `KeyUndoPolicy` :setter: Sets the key_undo_policy of this Group. """ return self._key_undo_policy @key_undo_policy.setter def key_undo_policy(self, key_undo_policy): """ Sets the key_undo_policy of this Group. """ self._key_undo_policy = key_undo_policy 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, Group): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other