
    8                        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
 dd	lmZ  ej"                  ej$                  j&                         G d
 dej(                               Zdddde_         ej"                  ej$                  j.                  ej$                  j0                         G d de             Zy)z*Command for describing instance templates.    )absolute_import)division)unicode_literals)base_classes)base)flags)scope)	arg_utilsc                   ^    e Zd ZdZdZdZed        Zed        Z	ed        Z
ed        Zd Zy	)

DescribeGAz-Describe a virtual machine instance template.TFc                     t        j                  | j                        t        _        t        j                  j                  |d       | j                  r'|j                  ddddt        j                  d	       y y )
N)include_regionaldescribe)operation_typez--viewz_Output contains all configuration details of the instance template, including partner metadata.zqDefault output view. Output contains all configuration details of the instance template, except partner metadata.)FULLBASICz9Specifies the information that the output should contain.)choicestypehelp)
r   MakeInstanceTemplateArgsupport_region_flagr   InstanceTemplateArgAddArgument	view_flagadd_argumentr
   ChoiceToEnumName)clsparsers     2lib/surface/compute/instance_templates/describe.pyArgszDescribeGA.Args#   s~    %*%B%B00&2J"""..z /  }}
;P	 ))J       c                     |j                         dk(  r| j                  j                  S | j                  j                  S Nzcompute.instanceTemplates)
Collectionapitools_clientinstanceTemplatesregionInstanceTemplatesclientrefs     r   GetServiceClientzDescribeGA.GetServiceClient;   s6    
~~66##555##;;;r!   c                     |j                         dk(  r| j                  j                  S | j                  j                  S r#   )r$   messages"ComputeInstanceTemplatesGetRequest(ComputeRegionInstanceTemplatesGetRequestr(   s     r   GetRequestMessagezDescribeGA.GetRequestMessageB   s2    
~~66__???__EEEr!   c                 p    | dk(  r|j                   j                  S | dk(  r|j                   j                  S y )Nr   r   )ViewValueValuesEnumr   r   )viewrequest_messages     r   GetViewEnumValuezDescribeGA.GetViewEnumValueI   s7    v~00555	00666r!   c                 \   t        j                  | j                               }|j                  }t        j
                  j                  ||j                  t        j                  |      t        j                  j                        }| j                  ||      }| j                  ||      }| j                  rJ|j!                  |d |di |j#                         d| j%                  |j&                  |      ifg      d   S |j!                  |d |di |j#                         fg      d   S )N)scope_listerdefault_scopeGetr3   r    )r   ComputeApiHolderReleaseTrackr)   r   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListercompute_scope	ScopeEnumGLOBALr+   r0   r   MakeRequestsAsDictr5   r3   )selfargsholderr)   instance_template_refservice_clientr4   s          r   RunzDescribeGA.RunQ   s?   **4+<+<+>?F]]F&::LL"88@#--44	 M  **63HIN,,V5JKO~~  


 %,,.(())_	# 	"	 	
 	 	 9/6689!    	
	 r!   N)__name__
__module____qualname____doc__r   r   classmethodr    staticmethodr+   r0   r5   rK   r:   r!   r   r   r      se    5) . < < F F  r!   r   z,Describe a virtual machine instance templatez        *{command}* displays all data associated with a Google Compute
        Engine virtual machine instance template.
        z{        To describe the instance template named 'INSTANCE-TEMPLATE', run:

          $ {command} INSTANCE-TEMPLATE
        )briefDESCRIPTIONEXAMPLESc                       e Zd ZdZy)DescribeBetaTN)rL   rM   rN   r   r:   r!   r   rV   rV      s    )r!   rV   N)rO   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r?   r	   rA   5googlecloudsdk.command_lib.compute.instance_templates$googlecloudsdk.command_lib.util.apisr
   ReleaseTracksr<   GADescribeCommandr   detailed_helpALPHABETArV   r:   r!   r   <module>rc      s    1 &  ' 7 ( E E G : D%%(()P%% P *Ph <
  D%%++T->->-C-CD:  Er!   