
    E                     V    d Z ddlmZ ddlmZ ddlmZ ddlmZ dZdZ G d d	e	      Z
y
)zSourceRepo APIs layer.

Parse methods accepts strings from command-line arguments, and it can accept
more formats like "https://...". Get methods are strict about the arguments.
    )absolute_import)division)unicode_literals)apis
sourcerepov1c                   "    e Zd ZdZd Zd Zd Zy)ProjectConfigz2Base class for source project config api wrappers.c                     t        j                  t        t              | _        t        j
                  t        t              | _        y )N)r   GetClientInstance	_API_NAME_API_VERSION_clientGetMessagesModulemessages)selfs    4lib/googlecloudsdk/api_lib/source/project_configs.py__init__zProjectConfig.__init__"   s*    )))\BDL**9lCDM    c                     | j                   j                  |j                               }| j                  j                  j                  |      S )zGet a project configuration.)name)r   "SourcerepoProjectsGetConfigRequestRelativeNamer   projects	GetConfig)r   project_refreqs      r   GetzProjectConfig.Get&   sB    
--
:
:%%' ; )C<<  **3//r   c                     | j                   j                  |j                  | j                   j                  ||            }| j                  j
                  j                  |      S )zUpdate a project configuration.)projectConfig
updateMask)r   updateProjectConfigRequest)r   %SourcerepoProjectsUpdateConfigRequestr   UpdateProjectConfigRequestr   r   UpdateConfig)r   project_configupdate_maskr   s       r   UpdatezProjectConfig.Update,   s`    
--
=
=  #'==#K#K([ $L $B > CC <<  --c22r   N)__name__
__module____qualname____doc__r   r   r(    r   r   r
   r
      s    :D03r   r
   N)r,   
__future__r   r   r   googlecloudsdk.api_lib.utilr   r   r   objectr
   r-   r   r   <module>r1      s.    '  ' ,	3F 3r   