o .&a<@sDddlmZddlmZddZddZddZGd d d eZd S) )Shape)BaseCLIArgumentcKs,t|rt|}t|||dd|d<dSdS)Noutfile) response_keyoperation_modelsessionname)_has_streaming_output_get_streaming_argument_nameStreamingOutputArgument)argument_tablerrkwargsstreaming_argument_namerJ/usr/lib/python3/dist-packages/awscli/customizations/streamingoutputarg.pyadd_streaming_output_argsrcC|jSN)has_streaming_outputmodelrrrr sr cCs |jjdS)Npayload) output_shape serializationrrrrr "s r c@sveZdZdZdZ dddZeddZedd Zed d Z e j d d Z ed dZ ddZ ddZ ddZdS)r iz(Filename where the content will be savedNcCsR||_tdddi|_|dur|j}||_||_d|_||_d|_||_||_ dS)Nr typestringT) _namerargument_model BUFFER_SIZE _buffer_size _response_key _output_file _required_operation_model_session)selfrrrr buffer_sizerrr__init__+s z StreamingOutputArgument.__init__cCrr)rr%rrrcli_name<sz StreamingOutputArgument.cli_namecCsdS)Nrrr(rrr cli_type_nameCsz%StreamingOutputArgument.cli_type_namecCrrr"r(rrrrequiredGz StreamingOutputArgument.requiredcCs ||_dSrr+)r%valuerrrr,Ks cCrr)HELPr(rrr documentationOr-z%StreamingOutputArgument.documentationcCs|j|j|j|jddS)N)metavarhelp) add_argumentrpy_namer/)r%parserrrr add_to_parserSs  z%StreamingOutputArgument.add_to_parsercCs8||_|jjj}|jj}|jd||f|jdS)Nzafter-call.%s.%s) r!r# service_model service_id hyphenizerr$register save_file)r% parametersr.r8operation_namerrr add_to_paramsWsz%StreamingOutputArgument.add_to_paramscKs||j|vrdS||j}|j}t|jd}||}|r)||||}|sWdn1s3wY||j=dS)Nwb)r ropenr!readwrite)r%parsedr bodyr&fpdatarrrr;^s      z!StreamingOutputArgument.save_filer)__name__ __module__ __qualname__rr/r'propertyr)r*r,setterr0r6r>r;rrrrr &s$       r N)botocore.modelrawscli.argumentsrrr r r rrrrs