
    
                     \   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  G d de      Z e
j"                  e
j$                  j&                  e
j$                  j(                  e
j$                  j*                         G d dee
j,                               Zy)ARetrieves information about an SSL cert for a Cloud SQL instance.    )absolute_import)division)unicode_literals)api_util)cert)validate)base)flags)
propertiesc                   &    e Zd ZdZed        Zd Zy)_BaseGetz"Base class for sql ssl_certs list.c                 T    | j                  dd       t        j                  |        y)zArgs is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use it to add arguments that go
          on the command line after this command. Positional arguments are
          allowed.
    common_namez7User supplied name. Constrained to ```[a-zA-Z.-_ ]+```.)helpN)add_argumentr   AddInstance)parsers    %lib/surface/sql/ssl_certs/describe.pyArgsz_BaseGet.Args    s.     F  H 
f    c                    t        j                  t         j                        }|j                  }|j                  }t        j                  |j                         |j                  j                  |j                  dt        j                  j                  j                  j                  id      }t        j                   ||||j"                        S )a  Retrieves information about an SSL cert for a Cloud SQL instance.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
          with.

    Returns:
      A dict object representing the sslCerts resource if the api request was
      successful.
    projectzsql.instances)params
collection)r   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagesr	   ValidateInstanceNameinstanceresource_parserParser   VALUEScorer   	GetOrFailr   GetCertFromNamer   )selfargsclientr   r   instance_refs         r   Runz_BaseGet.Run.   s      < <=F""J&&L!!$--0))//:,,1199CCD" 0 $L 
L, $ 0 02 2r   N)__name__
__module____qualname____doc__staticmethodr   r,    r   r   r   r      s    * 2r   r   c                       e Zd ZdZy)Getr   N)r-   r.   r/   r0   r2   r   r   r4   r4   H   s     Jr   r4   N)r0   
__future__r   r   r   googlecloudsdk.api_lib.sqlr   r   r	   googlecloudsdk.callioper
   googlecloudsdk.command_lib.sqlr   googlecloudsdk.corer   objectr   ReleaseTracksReleaseTrackGABETAALPHADescribeCommandr4   r2   r   r   <module>rA      s    H &  ' / + / ( 0 *(2v (2V D%%(($*;*;*@*@%%++-(D(( -r   