Source code for sdkms.v1.models.fpe_options_basic

# 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 FpeOptionsBasic(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 = { 'radix': 'int', 'min_length': 'int', 'max_length': 'int', 'preserve': 'list[int]', 'mask': 'list[int]', 'luhn_check': 'bool', 'name': 'str' } attribute_map = { 'radix': 'radix', 'min_length': 'min_length', 'max_length': 'max_length', 'preserve': 'preserve', 'mask': 'mask', 'luhn_check': 'luhn_check', 'name': 'name' }
[docs] def __init__(self, radix=None, min_length=None, max_length=None, preserve=None, mask=None, luhn_check=None, name=None): """ FpeOptionsBasic - a model defined in Swagger """ self._radix = None self._min_length = None self._max_length = None self._preserve = None self._mask = None self._luhn_check = None self._name = None self.radix = radix if min_length is not None: self.min_length = min_length if max_length is not None: self.max_length = max_length if preserve is not None: self.preserve = preserve if mask is not None: self.mask = mask if luhn_check is not None: self.luhn_check = luhn_check if name is not None: self.name = name
@property def radix(self): """ Gets the radix of this FpeOptionsBasic. The base for input data. The radix should be a number from 2 to 36, inclusive. Each radix corresponds to a subset of ASCII alphanumeric characters (with all letters being uppercase). For instance, a radix of 10 corresponds to a character set consisting of the digits from 0 to 9, while a character set of 16 corresponds to a character set consisting of all hexadecimal digits (with letters A-F being uppercase). Type: `int` :setter: Sets the radix of this FpeOptionsBasic. """ return self._radix @radix.setter def radix(self, radix): """ Sets the radix of this FpeOptionsBasic. The base for input data. The radix should be a number from 2 to 36, inclusive. Each radix corresponds to a subset of ASCII alphanumeric characters (with all letters being uppercase). For instance, a radix of 10 corresponds to a character set consisting of the digits from 0 to 9, while a character set of 16 corresponds to a character set consisting of all hexadecimal digits (with letters A-F being uppercase). """ self._radix = radix @property def min_length(self): """ Gets the min_length of this FpeOptionsBasic. The minimum allowed length for the input data. If not specified, as a default, the min length will be set to the smallest value that allows the condition radix^min_length >= 100 to be satisfied. Type: `int` :setter: Sets the min_length of this FpeOptionsBasic. """ return self._min_length @min_length.setter def min_length(self, min_length): """ Sets the min_length of this FpeOptionsBasic. The minimum allowed length for the input data. If not specified, as a default, the min length will be set to the smallest value that allows the condition radix^min_length >= 100 to be satisfied. """ self._min_length = min_length @property def max_length(self): """ Gets the max_length of this FpeOptionsBasic. The maximum allowed length for the input data. If not specified, a default max length of 2^16 will be used. Type: `int` :setter: Sets the max_length of this FpeOptionsBasic. """ return self._max_length @max_length.setter def max_length(self, max_length): """ Sets the max_length of this FpeOptionsBasic. The maximum allowed length for the input data. If not specified, a default max length of 2^16 will be used. """ self._max_length = max_length @property def preserve(self): """ Gets the preserve of this FpeOptionsBasic. The list of indices of characters to be preserved while performing encryption/decryption. Indices are Python-like, where negative indices index from the back of the token, with -1 referring to the end of the token. It is an error to specify indices greater than (min_length - 1) or less than (-min_length). Type: list[`int`] :setter: Sets the preserve of this FpeOptionsBasic. """ return self._preserve @preserve.setter def preserve(self, preserve): """ Sets the preserve of this FpeOptionsBasic. The list of indices of characters to be preserved while performing encryption/decryption. Indices are Python-like, where negative indices index from the back of the token, with -1 referring to the end of the token. It is an error to specify indices greater than (min_length - 1) or less than (-min_length). """ self._preserve = preserve @property def mask(self): """ Gets the mask of this FpeOptionsBasic. The list of indices of characters to be masked while performing masked decryption. Indices are Python-like, where negative indices index from the back of the token, with -1 referring to the end of the token. It is an error to specify indices greater than (min_length - 1) or less than (-min_length). Type: list[`int`] :setter: Sets the mask of this FpeOptionsBasic. """ return self._mask @mask.setter def mask(self, mask): """ Sets the mask of this FpeOptionsBasic. The list of indices of characters to be masked while performing masked decryption. Indices are Python-like, where negative indices index from the back of the token, with -1 referring to the end of the token. It is an error to specify indices greater than (min_length - 1) or less than (-min_length). """ self._mask = mask @property def luhn_check(self): """ Gets the luhn_check of this FpeOptionsBasic. Whether encrypted/decrypted data should satisfy LUHN checksum formula. Type: `bool` :setter: Sets the luhn_check of this FpeOptionsBasic. """ return self._luhn_check @luhn_check.setter def luhn_check(self, luhn_check): """ Sets the luhn_check of this FpeOptionsBasic. Whether encrypted/decrypted data should satisfy LUHN checksum formula. """ self._luhn_check = luhn_check @property def name(self): """ Gets the name of this FpeOptionsBasic. The user-friendly name for the data type that represents the input data. Type: `str` :setter: Sets the name of this FpeOptionsBasic. """ return self._name @name.setter def name(self, name): """ Sets the name of this FpeOptionsBasic. The user-friendly name for the data type that represents the input data. """ self._name = name 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, FpeOptionsBasic): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other