# 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 Plugin(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',
'plugin_id': 'str',
'description': 'str',
'acct_id': 'str',
'groups': 'list[str]',
'default_group': 'str',
'source': 'PluginSource',
'enabled': 'bool',
'plugin_type': 'PluginType',
'creator': 'CreatorType',
'created_at': 'str',
'lastrun_at': 'str',
'lastupdated_at': 'str'
}
attribute_map = {
'name': 'name',
'plugin_id': 'plugin_id',
'description': 'description',
'acct_id': 'acct_id',
'groups': 'groups',
'default_group': 'default_group',
'source': 'source',
'enabled': 'enabled',
'plugin_type': 'plugin_type',
'creator': 'creator',
'created_at': 'created_at',
'lastrun_at': 'lastrun_at',
'lastupdated_at': 'lastupdated_at'
}
[docs] def __init__(self, name=None, plugin_id=None, description=None, acct_id=None, groups=None, default_group=None, source=None, enabled=None, plugin_type=None, creator=None, created_at=None, lastrun_at=None, lastupdated_at=None):
"""
Plugin - a model defined in Swagger
"""
self._name = None
self._plugin_id = None
self._description = None
self._acct_id = None
self._groups = None
self._default_group = None
self._source = None
self._enabled = None
self._plugin_type = None
self._creator = None
self._created_at = None
self._lastrun_at = None
self._lastupdated_at = None
self.name = name
self.plugin_id = plugin_id
if description is not None:
self.description = description
self.acct_id = acct_id
self.groups = groups
self.default_group = default_group
self.source = source
self.enabled = enabled
self.plugin_type = plugin_type
self.creator = creator
self.created_at = created_at
self.lastrun_at = lastrun_at
self.lastupdated_at = lastupdated_at
@property
def name(self):
"""
Gets the name of this Plugin.
Name of the plugin. Plugin names must be unique within an account.
Type: `str`
:setter: Sets the name of this Plugin.
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this Plugin.
Name of the plugin. Plugin names must be unique within an account.
"""
self._name = name
@property
def plugin_id(self):
"""
Gets the plugin_id of this Plugin.
Plugin ID uniquely identifying this plugin.
Type: `str`
:setter: Sets the plugin_id of this Plugin.
"""
return self._plugin_id
@plugin_id.setter
def plugin_id(self, plugin_id):
"""
Sets the plugin_id of this Plugin.
Plugin ID uniquely identifying this plugin.
"""
self._plugin_id = plugin_id
@property
def description(self):
"""
Gets the description of this Plugin.
Description of this plugin.
Type: `str`
:setter: Sets the description of this Plugin.
"""
return self._description
@description.setter
def description(self, description):
"""
Sets the description of this Plugin.
Description of this plugin.
"""
self._description = description
@property
def acct_id(self):
"""
Gets the acct_id of this Plugin.
The account ID of the account that this plugin belongs to.
Type: `str`
:setter: Sets the acct_id of this Plugin.
"""
return self._acct_id
@acct_id.setter
def acct_id(self, acct_id):
"""
Sets the acct_id of this Plugin.
The account ID of the account that this plugin belongs to.
"""
self._acct_id = acct_id
@property
def groups(self):
"""
Gets the groups of this Plugin.
An array of security group IDs. The plugin belongs to each Security Group in this array.
Type: list[`str`]
:setter: Sets the groups of this Plugin.
"""
return self._groups
@groups.setter
def groups(self, groups):
"""
Sets the groups of this Plugin.
An array of security group IDs. The plugin belongs to each Security Group in this array.
"""
self._groups = groups
@property
def default_group(self):
"""
Gets the default_group of this Plugin.
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 Plugin.
"""
return self._default_group
@default_group.setter
def default_group(self, default_group):
"""
Sets the default_group of this Plugin.
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 Plugin.
Type: `PluginSource`
:setter: Sets the source of this Plugin.
"""
return self._source
@source.setter
def source(self, source):
"""
Sets the source of this Plugin.
"""
self._source = source
@property
def enabled(self):
"""
Gets the enabled of this Plugin.
Whether this plugin is enabled.
Type: `bool`
:setter: Sets the enabled of this Plugin.
"""
return self._enabled
@enabled.setter
def enabled(self, enabled):
"""
Sets the enabled of this Plugin.
Whether this plugin is enabled.
"""
self._enabled = enabled
@property
def plugin_type(self):
"""
Gets the plugin_type of this Plugin.
Type: `PluginType`
:setter: Sets the plugin_type of this Plugin.
"""
return self._plugin_type
@plugin_type.setter
def plugin_type(self, plugin_type):
"""
Sets the plugin_type of this Plugin.
"""
self._plugin_type = plugin_type
@property
def creator(self):
"""
Gets the creator of this Plugin.
Type: `CreatorType`
:setter: Sets the creator of this Plugin.
"""
return self._creator
@creator.setter
def creator(self, creator):
"""
Sets the creator of this Plugin.
"""
self._creator = creator
@property
def created_at(self):
"""
Gets the created_at of this Plugin.
When this plugin was created.
Type: `str`
:setter: Sets the created_at of this Plugin.
"""
return self._created_at
@created_at.setter
def created_at(self, created_at):
"""
Sets the created_at of this Plugin.
When this plugin was created.
"""
self._created_at = created_at
@property
def lastrun_at(self):
"""
Gets the lastrun_at of this Plugin.
When this plugin was last run.
Type: `str`
:setter: Sets the lastrun_at of this Plugin.
"""
return self._lastrun_at
@lastrun_at.setter
def lastrun_at(self, lastrun_at):
"""
Sets the lastrun_at of this Plugin.
When this plugin was last run.
"""
self._lastrun_at = lastrun_at
@property
def lastupdated_at(self):
"""
Gets the lastupdated_at of this Plugin.
When this plugin was last updated.
Type: `str`
:setter: Sets the lastupdated_at of this Plugin.
"""
return self._lastupdated_at
@lastupdated_at.setter
def lastupdated_at(self, lastupdated_at):
"""
Sets the lastupdated_at of this Plugin.
When this plugin was last updated.
"""
self._lastupdated_at = lastupdated_at
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, Plugin):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other