# 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 HmgConfig(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 = {
'kind': 'HmgKind',
'url': 'str',
'tls': 'TlsConfig',
'pin': 'str',
'slot': 'int',
'access_key': 'str',
'secret_key': 'str',
'hsm_order': 'int',
'tenant_id': 'str',
'client_id': 'str',
'subscription_id': 'str',
'key_vault_type': 'AzureKeyVaultType'
}
attribute_map = {
'kind': 'kind',
'url': 'url',
'tls': 'tls',
'pin': 'pin',
'slot': 'slot',
'access_key': 'access_key',
'secret_key': 'secret_key',
'hsm_order': 'hsm_order',
'tenant_id': 'tenant_id',
'client_id': 'client_id',
'subscription_id': 'subscription_id',
'key_vault_type': 'key_vault_type'
}
[docs] def __init__(self, kind=None, url=None, tls=None, pin=None, slot=None, access_key=None, secret_key=None, hsm_order=None, tenant_id=None, client_id=None, subscription_id=None, key_vault_type=None):
"""
HmgConfig - a model defined in Swagger
"""
self._kind = None
self._url = None
self._tls = None
self._pin = None
self._slot = None
self._access_key = None
self._secret_key = None
self._hsm_order = None
self._tenant_id = None
self._client_id = None
self._subscription_id = None
self._key_vault_type = None
self.kind = kind
self.url = url
self.tls = tls
if pin is not None:
self.pin = pin
if slot is not None:
self.slot = slot
if access_key is not None:
self.access_key = access_key
if secret_key is not None:
self.secret_key = secret_key
if hsm_order is not None:
self.hsm_order = hsm_order
if tenant_id is not None:
self.tenant_id = tenant_id
if client_id is not None:
self.client_id = client_id
if subscription_id is not None:
self.subscription_id = subscription_id
if key_vault_type is not None:
self.key_vault_type = key_vault_type
@property
def kind(self):
"""
Gets the kind of this HmgConfig.
Type: `HmgKind`
:setter: Sets the kind of this HmgConfig.
"""
return self._kind
@kind.setter
def kind(self, kind):
"""
Sets the kind of this HmgConfig.
"""
self._kind = kind
@property
def url(self):
"""
Gets the url of this HmgConfig.
Type: `str`
:setter: Sets the url of this HmgConfig.
"""
return self._url
@url.setter
def url(self, url):
"""
Sets the url of this HmgConfig.
"""
self._url = url
@property
def tls(self):
"""
Gets the tls of this HmgConfig.
Type: `TlsConfig`
:setter: Sets the tls of this HmgConfig.
"""
return self._tls
@tls.setter
def tls(self, tls):
"""
Sets the tls of this HmgConfig.
"""
self._tls = tls
@property
def pin(self):
"""
Gets the pin of this HmgConfig.
Type: `str`
:setter: Sets the pin of this HmgConfig.
"""
return self._pin
@pin.setter
def pin(self, pin):
"""
Sets the pin of this HmgConfig.
"""
self._pin = pin
@property
def slot(self):
"""
Gets the slot of this HmgConfig.
Type: `int`
:setter: Sets the slot of this HmgConfig.
"""
return self._slot
@slot.setter
def slot(self, slot):
"""
Sets the slot of this HmgConfig.
"""
self._slot = slot
@property
def access_key(self):
"""
Gets the access_key of this HmgConfig.
Type: `str`
:setter: Sets the access_key of this HmgConfig.
"""
return self._access_key
@access_key.setter
def access_key(self, access_key):
"""
Sets the access_key of this HmgConfig.
"""
self._access_key = access_key
@property
def secret_key(self):
"""
Gets the secret_key of this HmgConfig.
Type: `str`
:setter: Sets the secret_key of this HmgConfig.
"""
return self._secret_key
@secret_key.setter
def secret_key(self, secret_key):
"""
Sets the secret_key of this HmgConfig.
"""
self._secret_key = secret_key
@property
def hsm_order(self):
"""
Gets the hsm_order of this HmgConfig.
Type: `int`
:setter: Sets the hsm_order of this HmgConfig.
"""
return self._hsm_order
@hsm_order.setter
def hsm_order(self, hsm_order):
"""
Sets the hsm_order of this HmgConfig.
"""
self._hsm_order = hsm_order
@property
def tenant_id(self):
"""
Gets the tenant_id of this HmgConfig.
Type: `str`
:setter: Sets the tenant_id of this HmgConfig.
"""
return self._tenant_id
@tenant_id.setter
def tenant_id(self, tenant_id):
"""
Sets the tenant_id of this HmgConfig.
"""
self._tenant_id = tenant_id
@property
def client_id(self):
"""
Gets the client_id of this HmgConfig.
Type: `str`
:setter: Sets the client_id of this HmgConfig.
"""
return self._client_id
@client_id.setter
def client_id(self, client_id):
"""
Sets the client_id of this HmgConfig.
"""
self._client_id = client_id
@property
def subscription_id(self):
"""
Gets the subscription_id of this HmgConfig.
Type: `str`
:setter: Sets the subscription_id of this HmgConfig.
"""
return self._subscription_id
@subscription_id.setter
def subscription_id(self, subscription_id):
"""
Sets the subscription_id of this HmgConfig.
"""
self._subscription_id = subscription_id
@property
def key_vault_type(self):
"""
Gets the key_vault_type of this HmgConfig.
Type: `AzureKeyVaultType`
:setter: Sets the key_vault_type of this HmgConfig.
"""
return self._key_vault_type
@key_vault_type.setter
def key_vault_type(self, key_vault_type):
"""
Sets the key_vault_type of this HmgConfig.
"""
self._key_vault_type = key_vault_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, HmgConfig):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other