
                         p    S r SSKJr  SSKJr  SSKJr  SSKJrJrJrJ	r	  SSK
Jr  SSKJr   " S S	5      rg
)zDModule for storing converters to be used in the remediation intents.    )absolute_import)division)unicode_literals)MappingSequenceAnyDict)sps_api)basec                       \ rS rSrSr\R                  R                  4S jrS\	\
\
4   S\\   4S jrS\\   S\	\
\
4   4S jrS	rg
)RemediationIntentConverter   z5Converter related to the Remediation Intent resource.c                 :    [         R                  " U5      U l        g)zrInitializes the RemediationIntentConverter.

Args:
  release_track: The release track to use for the API version.
N)r
   GetMessagesModulemessages)selfrelease_tracks     @lib/googlecloudsdk/api_lib/scc/remediation_intents/converters.py__init__#RemediationIntentConverter.__init__   s     --m<DM    
files_dictreturnc           	          UR                  5        VVs/ s H  u  p#U R                  R                  X#S9PM      snn$ s  snnf )zConverts a dictionary of files with their content to the message.

Args:
  files_dict: A dictionary of files with their content. [path: content]

Returns:
  List of message of type [securityposture.messages.FileData]
filePathfileContent)itemsr   FileData)r   r   pathcontents       r   DictFilesToMessage-RemediationIntentConverter.DictFilesToMessage&   sF     (--//MD 	B/  s   %=
files_datac                 ^    U Vs0 s H  nUR                   UR                  _M     nnU$ s  snf )zConverts a list of file messages to a dictionary.

Args:
  files_data: A list of file messages. [securityposture.messages.FileData]

Returns:
  A dictionary of files with their content. [path: content]
r   )r   r$   	file_dataresults       r   MessageFilesToDict-RemediationIntentConverter.MessageFilesToDict4   sA     $#I 	I111#   M	s   !*)r   N)__name__
__module____qualname____firstlineno____doc__r   ReleaseTrackALPHAr   r   strr   r   r"   r(   __static_attributes__ r   r   r   r      sY    =#'#4#4#:#: =738+< # 8C= WS#X=N r   r   N)r.   
__future__r   r   r   typingr   r   r   r	   .googlecloudsdk.api_lib.scc.remediation_intentsr
   googlecloudsdk.callioper   r   r3   r   r   <module>r8      s*    K &  ' / / B (& &r   