o
    !d+
                     @   sP   d dl Z d dlmZmZ dZdd Zdd ZG dd	 d	eZG d
d deZdS )    N)CustomArgumentCLIArgumentzT<p>The path to the file of the code you are uploading. Example: fileb://data.csv</p>c                 C   s   |  dt d S )Nz4building-argument-table.translate.import-terminology)register_hoist_file_parameter)cli r   Cusr/lib/python3.10/site-packages/awscli/customizations/translate.py%register_translate_import_terminology   s   r	   c                 K   sT   t dtddd|d< |d }t|j}|jd= td||jd| dd	d
|d< d S )Nz	data-fileZblobT)Z	help_textZcli_type_namerequiredzterminology-dataFileFevent_emitterTerminologyData)nameargument_modelZoperation_modelZis_requiredr   Zserialized_name)	FileArgumentFILE_DOCSTRINGcopydeepcopyr   membersTerminologyDataArgumentZ_operation_modelZget_component)ZsessionZargument_tablekwargsZfile_argumentZ
file_modelr   r   r   r      s   
r   c                   @      e Zd Zdd ZdS )r   c                 C   s<   |d u rd S d|i}| dr|d | d S ||d< d S )Nr   r   )getupdate)self
parametersvalueZ
file_paramr   r   r   add_to_params,   s   
zFileArgument.add_to_paramsN__name__
__module____qualname__r   r   r   r   r   r   +       r   c                   @   r   )r   c                 C   sN   |d u rd S |  |}d|v rtd|dr!|d | d S ||d< d S )Nr   zFile cannot be provided as part of the '--terminology-data' argument. Please use the '--data-file' option instead to specify a file.r   )Z_unpack_argument
ValueErrorr   r   )r   r   r   Zunpackedr   r   r   r   7   s   

z%TerminologyDataArgument.add_to_paramsNr   r   r   r   r   r   6   r"   r   )	r   Zawscli.argumentsr   r   r   r	   r   r   r   r   r   r   r   <module>   s   