Module mailslurp_client.models.extract_codes_options
MailSlurp API
MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - Homepage - Get an API KEY - Generated SDK Clients - Examples repository # noqa: E501
The version of the OpenAPI document: 6.5.2 Contact: contact@mailslurp.dev Generated by: https://openapi-generator.tech
Classes
class ExtractCodesOptions (method=None, allow_fallback=True, min_length=4, max_length=10, max_candidates=5, custom_patterns=None, local_vars_configuration=None)-
NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech
Do not edit the class manually.
ExtractCodesOptions - a model defined in OpenAPI
Expand source code
class ExtractCodesOptions(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_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. """ openapi_types = { 'method': 'str', 'allow_fallback': 'bool', 'min_length': 'int', 'max_length': 'int', 'max_candidates': 'int', 'custom_patterns': 'list[str]' } attribute_map = { 'method': 'method', 'allow_fallback': 'allowFallback', 'min_length': 'minLength', 'max_length': 'maxLength', 'max_candidates': 'maxCandidates', 'custom_patterns': 'customPatterns' } def __init__(self, method=None, allow_fallback=True, min_length=4, max_length=10, max_candidates=5, custom_patterns=None, local_vars_configuration=None): # noqa: E501 """ExtractCodesOptions - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._method = None self._allow_fallback = None self._min_length = None self._max_length = None self._max_candidates = None self._custom_patterns = None self.discriminator = None self.method = method if allow_fallback is not None: self.allow_fallback = allow_fallback if min_length is not None: self.min_length = min_length if max_length is not None: self.max_length = max_length if max_candidates is not None: self.max_candidates = max_candidates self.custom_patterns = custom_patterns @property def method(self): """Gets the method of this ExtractCodesOptions. # noqa: E501 Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true. # noqa: E501 :return: The method of this ExtractCodesOptions. # noqa: E501 :rtype: str """ return self._method @method.setter def method(self, method): """Sets the method of this ExtractCodesOptions. Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true. # noqa: E501 :param method: The method of this ExtractCodesOptions. # noqa: E501 :type: str """ allowed_values = [None,"AUTO", "PATTERN", "LLM", "OCR", "OCR_THEN_LLM"] # noqa: E501 if self.local_vars_configuration.client_side_validation and method not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `method` ({0}), must be one of {1}" # noqa: E501 .format(method, allowed_values) ) self._method = method @property def allow_fallback(self): """Gets the allow_fallback of this ExtractCodesOptions. # noqa: E501 Allow fallback to deterministic pattern extraction when the selected method is unavailable. # noqa: E501 :return: The allow_fallback of this ExtractCodesOptions. # noqa: E501 :rtype: bool """ return self._allow_fallback @allow_fallback.setter def allow_fallback(self, allow_fallback): """Sets the allow_fallback of this ExtractCodesOptions. Allow fallback to deterministic pattern extraction when the selected method is unavailable. # noqa: E501 :param allow_fallback: The allow_fallback of this ExtractCodesOptions. # noqa: E501 :type: bool """ self._allow_fallback = allow_fallback @property def min_length(self): """Gets the min_length of this ExtractCodesOptions. # noqa: E501 Minimum code length to consider. Typical OTP values are between 4 and 8 characters. # noqa: E501 :return: The min_length of this ExtractCodesOptions. # noqa: E501 :rtype: int """ return self._min_length @min_length.setter def min_length(self, min_length): """Sets the min_length of this ExtractCodesOptions. Minimum code length to consider. Typical OTP values are between 4 and 8 characters. # noqa: E501 :param min_length: The min_length of this ExtractCodesOptions. # noqa: E501 :type: int """ self._min_length = min_length @property def max_length(self): """Gets the max_length of this ExtractCodesOptions. # noqa: E501 Maximum code length to consider. # noqa: E501 :return: The max_length of this ExtractCodesOptions. # noqa: E501 :rtype: int """ return self._max_length @max_length.setter def max_length(self, max_length): """Sets the max_length of this ExtractCodesOptions. Maximum code length to consider. # noqa: E501 :param max_length: The max_length of this ExtractCodesOptions. # noqa: E501 :type: int """ self._max_length = max_length @property def max_candidates(self): """Gets the max_candidates of this ExtractCodesOptions. # noqa: E501 Maximum number of code candidates to return. Best candidate is also returned separately. # noqa: E501 :return: The max_candidates of this ExtractCodesOptions. # noqa: E501 :rtype: int """ return self._max_candidates @max_candidates.setter def max_candidates(self, max_candidates): """Sets the max_candidates of this ExtractCodesOptions. Maximum number of code candidates to return. Best candidate is also returned separately. # noqa: E501 :param max_candidates: The max_candidates of this ExtractCodesOptions. # noqa: E501 :type: int """ self._max_candidates = max_candidates @property def custom_patterns(self): """Gets the custom_patterns of this ExtractCodesOptions. # noqa: E501 Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly. # noqa: E501 :return: The custom_patterns of this ExtractCodesOptions. # noqa: E501 :rtype: list[str] """ return self._custom_patterns @custom_patterns.setter def custom_patterns(self, custom_patterns): """Sets the custom_patterns of this ExtractCodesOptions. Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly. # noqa: E501 :param custom_patterns: The custom_patterns of this ExtractCodesOptions. # noqa: E501 :type: list[str] """ self._custom_patterns = custom_patterns def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_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 pprint.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, ExtractCodesOptions): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, ExtractCodesOptions): return True return self.to_dict() != other.to_dict()Class variables
var attribute_mapvar openapi_types
Instance variables
prop allow_fallback-
Gets the allow_fallback of this ExtractCodesOptions. # noqa: E501
Allow fallback to deterministic pattern extraction when the selected method is unavailable. # noqa: E501
:return: The allow_fallback of this ExtractCodesOptions. # noqa: E501 :rtype: bool
Expand source code
@property def allow_fallback(self): """Gets the allow_fallback of this ExtractCodesOptions. # noqa: E501 Allow fallback to deterministic pattern extraction when the selected method is unavailable. # noqa: E501 :return: The allow_fallback of this ExtractCodesOptions. # noqa: E501 :rtype: bool """ return self._allow_fallback prop custom_patterns-
Gets the custom_patterns of this ExtractCodesOptions. # noqa: E501
Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly. # noqa: E501
:return: The custom_patterns of this ExtractCodesOptions. # noqa: E501 :rtype: list[str]
Expand source code
@property def custom_patterns(self): """Gets the custom_patterns of this ExtractCodesOptions. # noqa: E501 Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly. # noqa: E501 :return: The custom_patterns of this ExtractCodesOptions. # noqa: E501 :rtype: list[str] """ return self._custom_patterns prop max_candidates-
Gets the max_candidates of this ExtractCodesOptions. # noqa: E501
Maximum number of code candidates to return. Best candidate is also returned separately. # noqa: E501
:return: The max_candidates of this ExtractCodesOptions. # noqa: E501 :rtype: int
Expand source code
@property def max_candidates(self): """Gets the max_candidates of this ExtractCodesOptions. # noqa: E501 Maximum number of code candidates to return. Best candidate is also returned separately. # noqa: E501 :return: The max_candidates of this ExtractCodesOptions. # noqa: E501 :rtype: int """ return self._max_candidates prop max_length-
Gets the max_length of this ExtractCodesOptions. # noqa: E501
Maximum code length to consider. # noqa: E501
:return: The max_length of this ExtractCodesOptions. # noqa: E501 :rtype: int
Expand source code
@property def max_length(self): """Gets the max_length of this ExtractCodesOptions. # noqa: E501 Maximum code length to consider. # noqa: E501 :return: The max_length of this ExtractCodesOptions. # noqa: E501 :rtype: int """ return self._max_length prop method-
Gets the method of this ExtractCodesOptions. # noqa: E501
Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true. # noqa: E501
:return: The method of this ExtractCodesOptions. # noqa: E501 :rtype: str
Expand source code
@property def method(self): """Gets the method of this ExtractCodesOptions. # noqa: E501 Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true. # noqa: E501 :return: The method of this ExtractCodesOptions. # noqa: E501 :rtype: str """ return self._method prop min_length-
Gets the min_length of this ExtractCodesOptions. # noqa: E501
Minimum code length to consider. Typical OTP values are between 4 and 8 characters. # noqa: E501
:return: The min_length of this ExtractCodesOptions. # noqa: E501 :rtype: int
Expand source code
@property def min_length(self): """Gets the min_length of this ExtractCodesOptions. # noqa: E501 Minimum code length to consider. Typical OTP values are between 4 and 8 characters. # noqa: E501 :return: The min_length of this ExtractCodesOptions. # noqa: E501 :rtype: int """ return self._min_length
Methods
def to_dict(self)-
Returns the model properties as a dict
def to_str(self)-
Returns the string representation of the model