Module mailslurp_client.models.extract_attachment_text_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 ExtractAttachmentTextOptions (method=None, allow_fallback=True, max_bytes=1048576, local_vars_configuration=None)

NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech

Do not edit the class manually.

ExtractAttachmentTextOptions - a model defined in OpenAPI

Expand source code
class ExtractAttachmentTextOptions(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',
        'max_bytes': 'int'
    }

    attribute_map = {
        'method': 'method',
        'allow_fallback': 'allowFallback',
        'max_bytes': 'maxBytes'
    }

    def __init__(self, method=None, allow_fallback=True, max_bytes=1048576, local_vars_configuration=None):  # noqa: E501
        """ExtractAttachmentTextOptions - 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._max_bytes = None
        self.discriminator = None

        self.method = method
        if allow_fallback is not None:
            self.allow_fallback = allow_fallback
        self.max_bytes = max_bytes

    @property
    def method(self):
        """Gets the method of this ExtractAttachmentTextOptions.  # noqa: E501

        Method for extracting text from attachments.  # noqa: E501

        :return: The method of this ExtractAttachmentTextOptions.  # noqa: E501
        :rtype: str
        """
        return self._method

    @method.setter
    def method(self, method):
        """Sets the method of this ExtractAttachmentTextOptions.

        Method for extracting text from attachments.  # noqa: E501

        :param method: The method of this ExtractAttachmentTextOptions.  # noqa: E501
        :type: str
        """
        allowed_values = [None,"AUTO", "NATIVE", "OCR", "LLM", "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 ExtractAttachmentTextOptions.  # noqa: E501

        Allow fallback to native extraction when the selected method is unavailable.  # noqa: E501

        :return: The allow_fallback of this ExtractAttachmentTextOptions.  # noqa: E501
        :rtype: bool
        """
        return self._allow_fallback

    @allow_fallback.setter
    def allow_fallback(self, allow_fallback):
        """Sets the allow_fallback of this ExtractAttachmentTextOptions.

        Allow fallback to native extraction when the selected method is unavailable.  # noqa: E501

        :param allow_fallback: The allow_fallback of this ExtractAttachmentTextOptions.  # noqa: E501
        :type: bool
        """

        self._allow_fallback = allow_fallback

    @property
    def max_bytes(self):
        """Gets the max_bytes of this ExtractAttachmentTextOptions.  # noqa: E501

        Maximum bytes to read from attachment for native text extraction.  # noqa: E501

        :return: The max_bytes of this ExtractAttachmentTextOptions.  # noqa: E501
        :rtype: int
        """
        return self._max_bytes

    @max_bytes.setter
    def max_bytes(self, max_bytes):
        """Sets the max_bytes of this ExtractAttachmentTextOptions.

        Maximum bytes to read from attachment for native text extraction.  # noqa: E501

        :param max_bytes: The max_bytes of this ExtractAttachmentTextOptions.  # noqa: E501
        :type: int
        """

        self._max_bytes = max_bytes

    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, ExtractAttachmentTextOptions):
            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, ExtractAttachmentTextOptions):
            return True

        return self.to_dict() != other.to_dict()

Class variables

var attribute_map
var openapi_types

Instance variables

prop allow_fallback

Gets the allow_fallback of this ExtractAttachmentTextOptions. # noqa: E501

Allow fallback to native extraction when the selected method is unavailable. # noqa: E501

:return: The allow_fallback of this ExtractAttachmentTextOptions. # noqa: E501 :rtype: bool

Expand source code
@property
def allow_fallback(self):
    """Gets the allow_fallback of this ExtractAttachmentTextOptions.  # noqa: E501

    Allow fallback to native extraction when the selected method is unavailable.  # noqa: E501

    :return: The allow_fallback of this ExtractAttachmentTextOptions.  # noqa: E501
    :rtype: bool
    """
    return self._allow_fallback
prop max_bytes

Gets the max_bytes of this ExtractAttachmentTextOptions. # noqa: E501

Maximum bytes to read from attachment for native text extraction. # noqa: E501

:return: The max_bytes of this ExtractAttachmentTextOptions. # noqa: E501 :rtype: int

Expand source code
@property
def max_bytes(self):
    """Gets the max_bytes of this ExtractAttachmentTextOptions.  # noqa: E501

    Maximum bytes to read from attachment for native text extraction.  # noqa: E501

    :return: The max_bytes of this ExtractAttachmentTextOptions.  # noqa: E501
    :rtype: int
    """
    return self._max_bytes
prop method

Gets the method of this ExtractAttachmentTextOptions. # noqa: E501

Method for extracting text from attachments. # noqa: E501

:return: The method of this ExtractAttachmentTextOptions. # noqa: E501 :rtype: str

Expand source code
@property
def method(self):
    """Gets the method of this ExtractAttachmentTextOptions.  # noqa: E501

    Method for extracting text from attachments.  # noqa: E501

    :return: The method of this ExtractAttachmentTextOptions.  # noqa: E501
    :rtype: str
    """
    return self._method

Methods

def to_dict(self)

Returns the model properties as a dict

def to_str(self)

Returns the string representation of the model