
                         N    d 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y)	z*API helpers for interacting with policies.    )absolute_import)division)unicode_literals)apisc                   $    e Zd ZdZddZd Zd Zy)Clientz'A client for interacting with policies.Nc                 l    t        j                  |      | _        t        j                  |      | _        y N)r   GetClientInstanceclientGetMessagesModulemessages)selfapi_versions     9lib/googlecloudsdk/api_lib/container/binauthz/policies.py__init__zClient.__init__   s&    ((5DK**;7DM    c                     | j                   j                  j                  | j                  j	                  |j                                     S )z3Get the Policy associated with the current project.)name)r   projects	GetPolicyr   +BinaryauthorizationProjectsGetPolicyRequestRelativeName)r   
policy_refs     r   Getz
Client.Get    sC    ;;))AA((* 	B 	
 r   c                 v    |j                         |_        | j                  j                  j	                  |      S )z5Set the current project's Policy to the one provided.)r   r   r   r   UpdatePolicy)r   r   policys      r   Setz
Client.Set'   s-    ))+FK;;,,V44r   r
   )__name__
__module____qualname____doc__r   r   r    r   r   r   r      s    /85r   r   N)	r#   
__future__r   r   r   )googlecloudsdk.api_lib.container.binauthzr   objectr   r$   r   r   <module>r(      s"     1 &  ' :5V 5r   