
                         P    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
g
)z;Utilities for "gcloud metastore services backups" commands.    )absolute_import)division)unicode_literals)	resourcesc                     [        XUSS9$ )Nv1alphaapi_version_UpdateBackuprefargsrequests      Alib/googlecloudsdk/command_lib/metastore/services/backups/util.pyUpdateBackupV1Alphar      s    	s'y	AA    c                     [        XUSS9$ )Nv1betar	   r   r   s      r   UpdateBackupV1Betar      s    	s'x	@@r   c                     [        XUSS9$ )Nv1r	   r   r   s      r   UpdateBackupV1r       s    	s't	<<r   c                     UR                   c  U$ [        R                  R                  UR                   U R                  U R
                  U R                  S.USS9R                  5       UR                  l         U$ )aP  Returns a modified create request with the `backup` field updated if the `backup` is passed.

If the user passes in a single resource like `my-backup`, convert it to a
relative resource name. If the user passes in a relative resource name, parse
to make sure it's valid. This will always overwrite the `backup` field in the
request, however, it might be overwritten with the same value.

Args:
  ref: A resource ref to the parsed Service resource.
  args: The parsed args namespace from CLI.
  request: The framework generated request to modify.
  api_version: The API version of the backup.
)
projectsIdlocationsId
servicesIdz-metastore.projects.locations.services.backups)paramsr
   
collection)	backupr   REGISTRYParser   r   r   RelativeNamerestoreServiceRequest)r   r   r   r
   s       r   r   r   $   s{     
[[N)2););)A)A
kk
 @ *B *B CO, C 
& 
.r   N)__doc__
__future__r   r   r   googlecloudsdk.corer   r   r   r   r    r   r   <module>r)      s-    B &  ' )BA=r   