o .&a @sddlmZddlmZddlmZddddZdd d d d d d d d d dgdd dd ddd d ddd ddZddddZdd dd d d dd d ddZddZ GdddeZ Gddde Z Gd d!d!e Z d"S)#)unpack_cli_arg)CustomArgument)!create_argument_model_from_schemaz s3-locationFzInformation about the location of the application revision in Amazon S3. You must specify the bucket, the key, and bundleType. Optionally, you can also specify an eTag and version.)namerequired help_textobjectstringzThe Amazon S3 bucket name.T)type descriptionrzThe Amazon S3 object key name.z-The format of the bundle stored in Amazon S3.)tartgzzip)r r enumrzThe Amazon S3 object eTag.zThe Amazon S3 object version.)bucketkey bundleTypeeTagversion)r propertieszgithub-locationa4Information about the location of the application revision in GitHub. You must specify the repository and commit ID that references the application revision. For the repository, use the format GitHub-account/repository-name or GitHub-org/repository-name. For the commit ID, use the SHA1 Git commit reference.zqThe GitHub account or organization and repository. Specify as GitHub-account/repository or GitHub-org/repository.zThe SHA1 Git commit reference. repositorycommitIdcKsVtt}td||dt|td<tt}td||dt|td<d|d_dS)N)argument_modelsessionrFrevision)rS3_LOCATION_SCHEMAS3LocationArgumentS3_LOCATION_ARG_DESCRIPTIONGITHUB_LOCATION_SCHEMAGitHubLocationArgumentGITHUB_LOCATION_ARG_DESCRIPTIONr)argument_tablerkwargss3_model github_modelrrO/usr/lib/python3/dist-packages/awscli/customizations/codedeploy/locationargs.pymodify_revision_arguments\s"  r(cs,eZdZfddZddZddZZS)LocationArgumentcs tt|j|i|||_dS)N)superr)__init___session)selfrargsr$ __class__rr'r+qs zLocationArgument.__init__cCsN|durdS|jjd|j|j||dd}|durt||}|||d<dS)Nzprocess-cli-arg.codedeploy.%s)param cli_argumentvalue operationr)r,emit_first_non_none_responserrrbuild_revision_location)r- parametersr3parsedrrr' add_to_paramsus zLocationArgument.add_to_paramscCstd)zE Repack the input structure into a revisionLocation. r6)NotImplementedError)r- value_dictrrr'r6sz(LocationArgument.build_revision_location)__name__ __module__ __qualname__r+r9r6 __classcell__rrr/r'r)ps r)c@eZdZddZdS)rcs|gd}fdd}tt||stddddddd }d vr0d |d d <d vr<d |d d <|S) N)rrrc |dSNFgetkr;rr' z.z6--s3-location must specify bucket, key and bundleType.S3rrr) revisionType s3LocationrrLrallmap RuntimeError)r-r;rvalidrrrGr'r6s" z*S3LocationArgument.build_revision_locationNr<r=r>r6rrrr'r rc@r@)r!csBddg}fdd}tt||stddddddS) NrrcrArBrCrErGrr'rHrIz@GitHubLocationArgument.build_revision_location..z7--github-location must specify repository and commitId.GitHubr)rKgitHubLocationrM)r-r;rrQrrGr'r6s z.GitHubLocationArgument.build_revision_locationNrRrrrr'r!rSr!N) awscli.argprocessrawscli.argumentsrrrrr"r r(r)rr!rrrr'sd   !