# 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 PluginRequest(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',
'add_groups': 'list[str]',
'del_groups': 'list[str]',
'default_group': 'str',
'source': 'PluginSource',
'enabled': 'bool',
'plugin_type': 'PluginType'
}
attribute_map = {
'name': 'name',
'description': 'description',
'add_groups': 'add_groups',
'del_groups': 'del_groups',
'default_group': 'default_group',
'source': 'source',
'enabled': 'enabled',
'plugin_type': 'plugin_type'
}
[docs] def __init__(self, name=None, description=None, add_groups=None, del_groups=None, default_group=None, source=None, enabled=None, plugin_type=None):
"""
PluginRequest - a model defined in Swagger
"""
self._name = None
self._description = None
self._add_groups = None
self._del_groups = None
self._default_group = None
self._source = None
self._enabled = None
self._plugin_type = None
self.name = name
if description is not None:
self.description = description
self.add_groups = add_groups
if del_groups is not None:
self.del_groups = del_groups
self.default_group = default_group
self.source = source
if enabled is not None:
self.enabled = enabled
if plugin_type is not None:
self.plugin_type = plugin_type
@property
def name(self):
"""
Gets the name of this PluginRequest.
Name of the plugin. Plugin names must be unique within an account.
Type: `str`
:setter: Sets the name of this PluginRequest.
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this PluginRequest.
Name of the plugin. Plugin names must be unique within an account.
"""
self._name = name
@property
def description(self):
"""
Gets the description of this PluginRequest.
Description of this plugin.
Type: `str`
:setter: Sets the description of this PluginRequest.
"""
return self._description
@description.setter
def description(self, description):
"""
Sets the description of this PluginRequest.
Description of this plugin.
"""
self._description = description
@property
def add_groups(self):
"""
Gets the add_groups of this PluginRequest.
An array of Security Group IDs to add to this plugin.
Type: list[`str`]
:setter: Sets the add_groups of this PluginRequest.
"""
return self._add_groups
@add_groups.setter
def add_groups(self, add_groups):
"""
Sets the add_groups of this PluginRequest.
An array of Security Group IDs to add to this plugin.
"""
self._add_groups = add_groups
@property
def del_groups(self):
"""
Gets the del_groups of this PluginRequest.
An array of security group IDs to remove from this plugin.
Type: list[`str`]
:setter: Sets the del_groups of this PluginRequest.
"""
return self._del_groups
@del_groups.setter
def del_groups(self, del_groups):
"""
Sets the del_groups of this PluginRequest.
An array of security group IDs to remove from this plugin.
"""
self._del_groups = del_groups
@property
def default_group(self):
"""
Gets the default_group of this PluginRequest.
The default group of this plugin. This is the group where security objects will be created by default by this plugin.
Type: `str`
:setter: Sets the default_group of this PluginRequest.
"""
return self._default_group
@default_group.setter
def default_group(self, default_group):
"""
Sets the default_group of this PluginRequest.
The default group of this plugin. This is the group where security objects will be created by default by this plugin.
"""
self._default_group = default_group
@property
def source(self):
"""
Gets the source of this PluginRequest.
Type: `PluginSource`
:setter: Sets the source of this PluginRequest.
"""
return self._source
@source.setter
def source(self, source):
"""
Sets the source of this PluginRequest.
"""
self._source = source
@property
def enabled(self):
"""
Gets the enabled of this PluginRequest.
Whether this plugin is enabled.
Type: `bool`
:setter: Sets the enabled of this PluginRequest.
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
"""
Sets the enabled of this PluginRequest.
Whether this plugin is enabled.
"""
self._enabled = enabled
@property
def plugin_type(self):
"""
Gets the plugin_type of this PluginRequest.
Type: `PluginType`
:setter: Sets the plugin_type of this PluginRequest.
"""
return self._plugin_type
@plugin_type.setter
def plugin_type(self, plugin_type):
"""
Sets the plugin_type of this PluginRequest.
"""
self._plugin_type = plugin_type
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, PluginRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other