
                         T    S r SSKJr  SSKJr  SSKJr  SSKJr  SrS rS r	S	 r
S
 rg)zCUseful commands for interacting with the Cloud Firestore Admin API.    )absolute_import)division)unicode_literals)apisv1c                  8    [         R                  " S[        5      $ )z8Import and return the appropriate admin messages module.	firestore)r   GetMessagesModuleFIRESTORE_API_VERSION     1lib/googlecloudsdk/api_lib/firestore/api_utils.pyGetMessagesr          			-B	CCr   c                  8    [         R                  " S[        5      $ )zEReturns the Cloud Firestore client for the appropriate release track.r	   )r   GetClientInstancer   r   r   r   	GetClientr   !   r   r   c                 $    SR                  U 5      $ )zReturns the duration string.

Args:
  duration: the duration, an int. The unit is seconds.

Returns:
  a duration with string format.
z{}s)format)durations    r   FormatDurationStringr   &   s     
h	r   c           	          SnU (       a7  U R                  5        VVs/ s H  u  p4UR                  X4S9PM     nnnU" US9nU$ s  snnf )zReturns the TagsValue message.

Args:
  tags: the tags, a dictionary.
  tags_value_message_type: the TagsValue message type.

Returns:
  a TagsValue message.
N)keyvalue)additionalProperties)itemsAdditionalProperty)tagstags_value_message_type
tags_valuer   r   additional_propertiess         r   ParseTagsForTagsValuer"   2   sl     *	
 **,	 'JC 	 22 	3 	
 '	   	 !6	
 
 
s   AN)__doc__
__future__r   r   r   googlecloudsdk.api_lib.utilr   r   r   r   r   r"   r   r   r   <module>r&      s7    J '  ' ,  D
D
	 r   