ó
    €Ï+  ã            
       óÂ   • S r SSKJr  Sr\4S\4S jjr\4S\4S jjr\4S\4S jjrS\S	\" 5       R                  4S
 jr	 SS\S\
S\S	\" 5       R                  4S jjrg)zCRM API Capability utilities.é    )ÚapisÚv3Úapi_versionc                 ó0   • [         R                  " SU 5      $ ©NÚcloudresourcemanager)r   ÚGetClientInstance©r   s    Ú;lib/googlecloudsdk/api_lib/resource_manager/capabilities.pyÚCapabilitiesClientr      ó   € Ü	×	Ò	Ð 6¸Ó	DÐDó    c                 ó,   • [        U 5      R                  $ )N)r   Úfolders_capabilitiesr
   s    r   ÚCapabilitiesServicer      s   € Ü	˜KÓ	(×	=Ñ	=Ð=r   c                 ó0   • [         R                  " SU 5      $ r   )r   ÚGetMessagesModuler
   s    r   ÚCapabilitiesMessagesr      r   r   Úcapability_idÚreturnc                 ó’   • [        5       R                  [        5       R                  U S95      nUR                  (       d  SUl        U$ )a¥  Get a particular Capability using capability_id.

The method explicitly sets Capability.value to False in case Capability is not
enabled, because the default response does not populate the value field if the
capability is disabled.

Args:
  capability_id: The capability_id to get.

Returns:
  The response from the Get Request. In case the value is False, it is
  explicitly populated with the proper value for clarity.
)ÚnameF)r   ÚGetr   Ú1CloudresourcemanagerFoldersCapabilitiesGetRequestÚvalue)r   Úget_capability_responses     r   ÚGetCapabilityr   "   sL   € ô 0Ó1×5Ñ5ÜÓ×NÑNØð Oð óÐð
 
!×	&×	&Ø$)ÐÔ!Ø	 Ð r   r   Úupdate_maskc                 óŒ   • [        5       R                  [        5       R                  U U[        5       R	                  XS9S95      $ )aà  Send an Update Request for the capability.

Capability is a singleton resource, and only certain capability_types are
allowed. Currently, "app-management" is the only possible capability_type.

Args:
  capability_id: The capability_id to update. Should be in the format:
      folders/{folder_id}/capabilities/{capability_type}.
  value: The value to set for the capability.
  update_mask: The update mask to use for the request.

Returns:
  The response from the Update Request.
)r   r   )r   Ú
updateMaskÚ
capability)r   ÚPatchr   Ú3CloudresourcemanagerFoldersCapabilitiesPatchRequestÚ
Capability)r   r   r   s      r   ÚUpdateCapabilityr%   :   sP   € ô" 
Ó	×	$Ñ	$ÜÓ×PÑPØØ Ü)Ó+×6Ñ6Ø ð 7ð ð Qð ó
ð r   N)Ú )Ú__doc__Úgooglecloudsdk.api_lib.utilr   ÚAPI_VERSIONÚstrr   r   r   r$   r   ÚboolÚ	Operationr%   © r   r   Ú<module>r.      s™   ðñ $å ,à€ð +6ñ E Cõ Eð ,7ñ > Sõ >ð -8ñ E cõ Eð! ð !Ñ)=Ó)?×)JÑ)Jô !ð2 9;ñØðØ#ðØ25ðáÓ×%Ñ%ör   