
    	                     \    S r SSKJr  SSKJr  SS jr " S S\5      r " S S	\5      rS
 r	g)z6Shared utilities to access the Google Model Armor API.    )apis)baseNc                 j    [         R                  " SU =(       d    [         R                  " S5      5      $ )zGet the default client.
modelarmor)r   GetClientInstanceResolveVersionversions    -lib/googlecloudsdk/api_lib/model_armor/api.py	GetClientr      s*    			G@t22<@
     c                   "    \ rS rSrSrSS jrSrg)Client   zBase class for all clients.Nc                 z    U=(       d	    [        US9U l        U=(       d    U R                  R                  U l        g Nr	   )r   clientMESSAGES_MODULEmessages)selfr   r   api_versions       r   __init__Client.__init__    s)    :Ik:DK; ; ;DMr   )r   r   NNN)__name__
__module____qualname____firstlineno____doc__r   __static_attributes__ r   r   r   r      s
    #<r   r   c                   B   ^  \ rS rSrSrSU 4S jjrS rS rS rSr	U =r
$ )	FloorSettings%   z%High-level client for floor-settings.c                    > U=(       d	    [        US9n[        [        U ]  X5        U R                  R
                  U l        g r   )r   superr#   r   r   projects_locationsservice)r   r   r   r   	__class__s       r   r   FloorSettings.__init__(   s2    5y5F	-'9;;11DLr   c                     U R                   R                  U l        U R                  R	                  US9nU R                  R                  U5      $ )z*Get the floor-setting with the given name.)name)r   r'   r(   r   1ModelarmorProjectsLocationsGetFloorSettingRequestGetFloorSetting)r   r,   reqs      r   GetFloorSettings.Get-   sG    ;;11DL
--
I
I J C <<'',,r   c                     U R                   R                  U l        U R                  R	                  UUSR                  U5      S9nU R                  R                  U5      $ )z-Update the floor-setting with the given name.,)floorSettingr,   
updateMask)r   folders_locationsr(   r   3ModelarmorFoldersLocationsUpdateFloorSettingRequestjoinUpdateFloorSetting)r   r,   floor_settingupdate_maskr/   s        r   UpdateFloorSettings.Update5   sV    ;;00DL
--
K
K"88K( L C
 <<**3//r   c                     U R                   $ )z2Returns the messages module for the given version.)r   )r   s    r   GetMessagesFloorSettings.GetMessages?   s    ==r   )r(   r   )r   r   r   r   r   r   r0   r<   r?   r    __classcell__)r)   s   @r   r#   r#   %   s    -2
-0 r   r#   c                     U [         R                  R                  :X  a  gU [         R                  R                  :X  a  gU [         R                  R                  :X  a  gg)z'Returns api version based on the track.v1alphav1betav1N)r   ReleaseTrackALPHABETAGA)tracks    r   GetApiFromTrackrK   D   sL    
d%%%!!&&&!!$$$ %r   )N)
r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   r   objectr   r#   rK   r!   r   r   <module>rO      s4    = - (<V <F >r   