
    s	                         S r SSKJr  SSKJ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
 S\
R                  5      rS rS rS rg)z*CLI Utilities for beyondcorp app commands.    )absolute_import)division)unicode_literals)base)labels_util)
exceptionszVError parsing member [{}]: member must be prefixed of the form serviceAccount:<value>.serviceAccountc                       \ rS rSrSrSrg)MemberParseError   z+Error if a member is not in correct format. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       5lib/googlecloudsdk/command_lib/beyondcorp/app/util.pyr   r      s    3r   r   c                     U R                  S5      n[        U5      S:X  a  US   [        :X  a  US   $ [        [        R                  U 5      5      e)aP  Validates and parses a service account from member string.

Expects string.

Args:
  member: string in format of 'serviceAccount:<value>'.

Raises:
  MemberParseError: if string is not in valid format 'serviceAccount:<value>',
  raises exception MemberParseError.

Returns:
  string: Returns <value> part from 'serviceAccount:<value>'.
:   r      )splitlenMEMBER_PREFIXr   MEMBER_PARSE_ERRORformat)membermember_arrays     r   MemberProcessorr!   #   sO     c",!Q= @?
!!&)+ +r   c                      [         R                  " SS9n U R                  [        R                  " 5       5        U R                  [        R
                  " S5      5        [        R                  " S5      U /$ )z"Defines flags for updating labels.T)mutex )r   ArgumentGroupAddArgumentr   GetClearLabelsFlagGetRemoveLabelsFlagGetUpdateLabelsFlag)remove_groups    r   UpdateLabelsFlagsr+   ;   sX    ##$/,;99;<;::2>?

)
)"
-|	<<r   c                     UR                   nU(       a$  UR                  U 5      S:X  a  US-   U -   Ul         U$ Xl         U$ )z"Adds name of field to update mask.r   ,)
updateMaskcount)fieldpatch_requestupdate_masks      r   AddFieldToUpdateMaskr3   C   sK    ((+1$!,s!2U!:m 
  %	r   N)r   
__future__r   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r   r   Errorr   r!   r+   r3   r   r   r   <module>r9      sJ     1 &  ' ( < *9  4z'' 4+0=r   