o
    1j                     @   s   U d dl mZmZmZ d dlmZmZmZmZ g dZ	e
dhZee ed< G dd deZG dd	 d	eZd
eee  dee fddZd
eee  ddfddZG dd deZdS )    )	FrozenSetListOptional)	BaseModel
ConfigDictFieldfield_validator)SUPPORTED_OUTPUT_FORMATSExportContentDocumentExportsnormalize_output_formatsdocxr	   c                   @   s"   e Zd ZU dZeed< eed< dS )r
   zRSingle exported artifact. `content` holds Base64 or a URL, mirroring image fields.contentfileNameN)__name__
__module____qualname____doc__str__annotations__ r   r   p/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/paddlex/inference/serving/schemas/shared/export.pyr
      s   
 r
   c                   @   s,   e Zd ZU dZeddZdZee e	d< dS )r   zPStructured export payload; extend with optional fields as new formats are added.Zforbid)extraNr   )
r   r   r   r   r   Zmodel_configr   r   r
   r   r   r   r   r   r   $   s   
 
r   formatsreturnc                 C   s   | sg S t | S N)list)r   r   r   r   r   ,   s   r   Nc                 C   s6   | sdS | D ]}|t vrtd|dtt  qdS )z5Raise ValueError if any format string is unsupported.Nz"Unsupported `outputFormats` entry z. Supported values: )r	   
ValueErrorsorted)r   fmtr   r   r   validate_output_formats_list2   s   r    c                   @   sX   e Zd ZU edddZeee  ed< e	de
deee  deee  fddZdS )	OutputFormatsMixinNz8Optional list of extra formats to return, e.g. ["docx"].)defaultdescriptionoutputFormatsvr   c                 C   s   |d u r|S t | |S r   )r    )clsr%   r   r   r   _check_output_formatsD   s   z(OutputFormatsMixin._check_output_formats)r   r   r   r   r$   r   r   r   r   r   classmethodr'   r   r   r   r   r!   >   s   
 *r!   )typingr   r   r   Zpydanticr   r   r   r   __all__	frozensetr	   r   r   r
   r   r   r    r!   r   r   r   r   <module>   s   