
    <                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z ddl	mZ dd	l	mZ  ej                  ej                  j                   ej                  j"                         G d
 dej$                               Zy)zDCommand to describe an archive deployment in an Apigee organization.    )absolute_import)division)unicode_literals)apigee)base)archives)defaults)resource_argsc                   0    e Zd ZdZdddZed        Zd Zy)Describez&Describe an Apigee archive deployment.zQ  {description}

  `{command}` shows metadata about an Apigee archive deployment.a    To describe an archive deployment with the id ``abcdef1234'' in the Apigee
  environment called ``my-env'' using the active Cloud Platform project, run:

      $ {command} abcdef1234 --environment=my-env

  To describe an archive deployment with the id ``1234abcdef'', in the Apigee
  environment called ``my-env'', in an organization called ``my-org'', as a JSON
  object, run:

      $ {command} 1234abcdef --environment=my-env --organization=my-org --format=json
  )DESCRIPTIONEXAMPLESc           
      b    t        j                  | dddddt        j                         g       y )Nz+organization.environment.archive_deploymentzpArchive deployment to be described. To get a list of available archive deployments, run `{parent_command} list`.archive_deploymentT)	help_textargument_name
positionalrequiredfallthroughs)r
   AddSingleResourceArgumentr	   !GCPProductOrganizationFallthrough)parsers    'lib/surface/apigee/archives/describe.pyArgszDescribe.Args4   s5    ++5F*@@BCE    c                    |j                   j                  j                         j                         }|d   }dj	                  ||d   |d         }t
        j                  j                  |      }|st
        j                  j                  |      S t        j                  |      j                  |      }|D ]  }|d   |k(  s|c S  t
        j                  j                  |      S )zRun the describe command.organizationsIdz6organizations/{}/environments/{}/archiveDeployments/{}environmentsIdarchiveDeploymentsIdname)CONCEPTSr   ParseAsDictformatr   ArchivesClientListr   archive_helperListArchivesExtendedArchives)selfargsidentifiersorgarchive_namearchive_list_responseextended_archivesas           r   RunzDescribe.Run@   s    --2288:AACK
'
(C@GG-../	1 
 #1166{C ""++K88&33C8II	
6l	"    ))+66r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r2    r   r   r   r      s2    .D
-* 	E 	E7r   r   N)r6   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apigeer   r'   r	   r
   ReleaseTracksReleaseTrackALPHABETADescribeCommandr   r9   r   r   <module>rC      sl    K &  ' ) ( H 6 ; D%%++T->->-C-CD67t## 67 E67r   