Source code for sdkms.v1.models.group_request

# 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 GroupRequest(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', 'description': 'str', 'acct_id': 'str', 'add_hmg': 'list[HmgConfig]', 'mod_hmg': 'dict(str, HmgConfig)', 'del_hmg': 'list[str]', 'key_undo_policy': 'KeyUndoPolicy' } attribute_map = { 'name': 'name', 'description': 'description', 'acct_id': 'acct_id', 'add_hmg': 'add_hmg', 'mod_hmg': 'mod_hmg', 'del_hmg': 'del_hmg', 'key_undo_policy': 'key_undo_policy' }
[docs] def __init__(self, name=None, description=None, acct_id=None, add_hmg=None, mod_hmg=None, del_hmg=None, key_undo_policy=None): """ GroupRequest - a model defined in Swagger """ self._name = None self._description = None self._acct_id = None self._add_hmg = None self._mod_hmg = None self._del_hmg = None self._key_undo_policy = None self.name = name if description is not None: self.description = description if acct_id is not None: self.acct_id = acct_id if add_hmg is not None: self.add_hmg = add_hmg if mod_hmg is not None: self.mod_hmg = mod_hmg if del_hmg is not None: self.del_hmg = del_hmg if key_undo_policy is not None: self.key_undo_policy = key_undo_policy
@property def name(self): """ Gets the name of this GroupRequest. Name of the group. Group names must be unique within an account. Type: `str` :setter: Sets the name of this GroupRequest. """ return self._name @name.setter def name(self, name): """ Sets the name of this GroupRequest. Name of the group. Group names must be unique within an account. """ self._name = name @property def description(self): """ Gets the description of this GroupRequest. Description of the group. Type: `str` :setter: Sets the description of this GroupRequest. """ return self._description @description.setter def description(self, description): """ Sets the description of this GroupRequest. Description of the group. """ self._description = description @property def acct_id(self): """ Gets the acct_id of this GroupRequest. Account ID of the account the new group will belong to. Type: `str` :setter: Sets the acct_id of this GroupRequest. """ return self._acct_id @acct_id.setter def acct_id(self, acct_id): """ Sets the acct_id of this GroupRequest. Account ID of the account the new group will belong to. """ self._acct_id = acct_id @property def add_hmg(self): """ Gets the add_hmg of this GroupRequest. List of HmgConfig objects to add Type: list[`HmgConfig`] :setter: Sets the add_hmg of this GroupRequest. """ return self._add_hmg @add_hmg.setter def add_hmg(self, add_hmg): """ Sets the add_hmg of this GroupRequest. List of HmgConfig objects to add """ self._add_hmg = add_hmg @property def mod_hmg(self): """ Gets the mod_hmg of this GroupRequest. Map from UUIDs to HmgConfig objects to update Type: map[`HmgConfig`] :setter: Sets the mod_hmg of this GroupRequest. """ return self._mod_hmg @mod_hmg.setter def mod_hmg(self, mod_hmg): """ Sets the mod_hmg of this GroupRequest. Map from UUIDs to HmgConfig objects to update """ self._mod_hmg = mod_hmg @property def del_hmg(self): """ Gets the del_hmg of this GroupRequest. List of HmgConfig UUIDs to delete Type: list[`str`] :setter: Sets the del_hmg of this GroupRequest. """ return self._del_hmg @del_hmg.setter def del_hmg(self, del_hmg): """ Sets the del_hmg of this GroupRequest. List of HmgConfig UUIDs to delete """ self._del_hmg = del_hmg @property def key_undo_policy(self): """ Gets the key_undo_policy of this GroupRequest. Type: `KeyUndoPolicy` :setter: Sets the key_undo_policy of this GroupRequest. """ return self._key_undo_policy @key_undo_policy.setter def key_undo_policy(self, key_undo_policy): """ Sets the key_undo_policy of this GroupRequest. """ 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, GroupRequest): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other