Source code for sdkms.v1.models.fpe_compound_part

# 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 FpeCompoundPart(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 = { '_or': 'list[FpeDataPart]', 'concat': 'list[FpeDataPart]', 'multiple': 'FpeDataPart', 'min_repetitions': 'int', 'max_repetitions': 'int', 'constraints': 'FpeConstraints', 'preserve': 'bool', 'mask': 'bool', 'min_length': 'int', 'max_length': 'int' } attribute_map = { '_or': 'or', 'concat': 'concat', 'multiple': 'multiple', 'min_repetitions': 'min_repetitions', 'max_repetitions': 'max_repetitions', 'constraints': 'constraints', 'preserve': 'preserve', 'mask': 'mask', 'min_length': 'min_length', 'max_length': 'max_length' }
[docs] def __init__(self, _or=None, concat=None, multiple=None, min_repetitions=None, max_repetitions=None, constraints=None, preserve=None, mask=None, min_length=None, max_length=None): """ FpeCompoundPart - a model defined in Swagger """ self.__or = None self._concat = None self._multiple = None self._min_repetitions = None self._max_repetitions = None self._constraints = None self._preserve = None self._mask = None self._min_length = None self._max_length = None if _or is not None: self._or = _or if concat is not None: self.concat = concat if multiple is not None: self.multiple = multiple if min_repetitions is not None: self.min_repetitions = min_repetitions if max_repetitions is not None: self.max_repetitions = max_repetitions if constraints is not None: self.constraints = constraints if preserve is not None: self.preserve = preserve if mask is not None: self.mask = mask if min_length is not None: self.min_length = min_length if max_length is not None: self.max_length = max_length
@property def _or(self): """ Gets the _or of this FpeCompoundPart. Represents an OR of multiple structures. This cannot be specified alongside the `concat` or `multiple` fields. ***Implementation note: the order of the choices matters, as the parser will pick the first structure that matches. (The parser is locally \"greedy\"; see the description of `FpeDataPart` for more information about why this matters.)*** Type: list[`FpeDataPart`] :setter: Sets the _or of this FpeCompoundPart. """ return self.__or @_or.setter def _or(self, _or): """ Sets the _or of this FpeCompoundPart. Represents an OR of multiple structures. This cannot be specified alongside the `concat` or `multiple` fields. ***Implementation note: the order of the choices matters, as the parser will pick the first structure that matches. (The parser is locally \"greedy\"; see the description of `FpeDataPart` for more information about why this matters.)*** """ self.__or = _or @property def concat(self): """ Gets the concat of this FpeCompoundPart. Represents a concatentation of multiple structures (in a particular order). This cannot be specified alongside the `or` or `multiple` fields. Type: list[`FpeDataPart`] :setter: Sets the concat of this FpeCompoundPart. """ return self._concat @concat.setter def concat(self, concat): """ Sets the concat of this FpeCompoundPart. Represents a concatentation of multiple structures (in a particular order). This cannot be specified alongside the `or` or `multiple` fields. """ self._concat = concat @property def multiple(self): """ Gets the multiple of this FpeCompoundPart. Type: `FpeDataPart` :setter: Sets the multiple of this FpeCompoundPart. """ return self._multiple @multiple.setter def multiple(self, multiple): """ Sets the multiple of this FpeCompoundPart. """ self._multiple = multiple @property def min_repetitions(self): """ Gets the min_repetitions of this FpeCompoundPart. The minimum number of times the subpart can be repeated. This field should only be used if the `multiple` field is being used. Type: `int` :setter: Sets the min_repetitions of this FpeCompoundPart. """ return self._min_repetitions @min_repetitions.setter def min_repetitions(self, min_repetitions): """ Sets the min_repetitions of this FpeCompoundPart. The minimum number of times the subpart can be repeated. This field should only be used if the `multiple` field is being used. """ self._min_repetitions = min_repetitions @property def max_repetitions(self): """ Gets the max_repetitions of this FpeCompoundPart. The maximum number of times the subpart can be repeated. This field should only be used if the `multiple` field is being used. Type: `int` :setter: Sets the max_repetitions of this FpeCompoundPart. """ return self._max_repetitions @max_repetitions.setter def max_repetitions(self, max_repetitions): """ Sets the max_repetitions of this FpeCompoundPart. The maximum number of times the subpart can be repeated. This field should only be used if the `multiple` field is being used. """ self._max_repetitions = max_repetitions @property def constraints(self): """ Gets the constraints of this FpeCompoundPart. Type: `FpeConstraints` :setter: Sets the constraints of this FpeCompoundPart. """ return self._constraints @constraints.setter def constraints(self, constraints): """ Sets the constraints of this FpeCompoundPart. """ self._constraints = constraints @property def preserve(self): """ Gets the preserve of this FpeCompoundPart. Whether the entire part should be preserved as-is (i.e., not tokenized). If this is set, any descendant subparts cannot contain any preserve-related fields set. Type: `bool` :setter: Sets the preserve of this FpeCompoundPart. """ return self._preserve @preserve.setter def preserve(self, preserve): """ Sets the preserve of this FpeCompoundPart. Whether the entire part should be preserved as-is (i.e., not tokenized). If this is set, any descendant subparts cannot contain any preserve-related fields set. """ self._preserve = preserve @property def mask(self): """ Gets the mask of this FpeCompoundPart. Whether the entire part should be masked when doing masked decryption. If this is set, any descendant subparts cannot contain any mask-related fields set. Type: `bool` :setter: Sets the mask of this FpeCompoundPart. """ return self._mask @mask.setter def mask(self, mask): """ Sets the mask of this FpeCompoundPart. Whether the entire part should be masked when doing masked decryption. If this is set, any descendant subparts cannot contain any mask-related fields set. """ self._mask = mask @property def min_length(self): """ Gets the min_length of this FpeCompoundPart. The minimum allowed length for this part (in chars). Type: `int` :setter: Sets the min_length of this FpeCompoundPart. """ return self._min_length @min_length.setter def min_length(self, min_length): """ Sets the min_length of this FpeCompoundPart. The minimum allowed length for this part (in chars). """ self._min_length = min_length @property def max_length(self): """ Gets the max_length of this FpeCompoundPart. The minimum allowed length for this part (in chars). Type: `int` :setter: Sets the max_length of this FpeCompoundPart. """ return self._max_length @max_length.setter def max_length(self, max_length): """ Sets the max_length of this FpeCompoundPart. The minimum allowed length for this part (in chars). """ self._max_length = max_length 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, FpeCompoundPart): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other