o
    .&ßa+
  ã                   @   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   úA/usr/lib/python3/dist-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-fileÚblobT)Ú	help_textÚcli_type_nameÚrequiredzterminology-dataÚFileFÚevent_emitterÚTerminologyData)ÚnameÚargument_modelÚoperation_modelÚis_requiredr   Úserialized_name)	ÚFileArgumentÚFILE_DOCSTRINGÚcopyÚdeepcopyr   ÚmembersÚTerminologyDataArgumentÚ_operation_modelÚget_component)ÚsessionÚargument_tableÚkwargsÚfile_argumentÚ
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ÚvalueÚ
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   z„File cannot be provided as part of the '--terminology-data' argument. Please use the '--data-file' option instead to specify a file.r   )Ú_unpack_argumentÚ
ValueErrorr$   r%   )r&   r'   r(   Úunpackedr   r   r   r*   7   s   

z%TerminologyDataArgument.add_to_paramsNr+   r   r   r   r   r   6   r/   r   )	r   Úawscli.argumentsr   r   r   r	   r   r   r   r   r   r   r   Ú<module>   s   