
    p                        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SK
Jr  SSKJr  S	S
0r\R                   " \R"                  R$                  5       " S S\	R&                  5      5       r\R                   " \R"                  R*                  5       " S S\5      5       r\R                   " \R"                  R.                  5       " S S\5      5       rg).Triggers execution of a Google Cloud Function.    )absolute_import)division)unicode_literals)base)flags)util)commandEXAMPLESa{  
        To call a function, giving it 'Hello World!' in the message field of its event
        argument (depending on your environment you might need to escape
        characters in `--data` flag value differently), run:

            $ {command} helloWorld --data='{"message": "Hello World!"}'

        Note that this method has a limited quota which cannot be increased. It is
        intended for testing and debugging and should not be used in production.

        Calls to HTTP-triggered functions are sent as HTTP POST requests. To use other
        HTTP methods, use a dedicated HTTP request tool such as cURL or wget.

        c                   8    \ rS rSrSr\r\S 5       rS r	S r
Srg)Call.   r   c                     [         R                  " U S5        U R                  5       n[         R                  " U5        [         R                  " U SS9  [         R
                  " U5        g)z!Registers flags for this command.z
to executeT)hiddenN)r   AddFunctionResourceArgadd_mutually_exclusive_groupAddDataFlagAddGen2FlagAddCloudEventsFlag)parserdata_flag_groups     lib/surface/functions/call.pyArgs	Call.Args4   sP     
  699;O	o& 
fT*	_-    c                 J    [         R                  " XR                  5       5      $ N)
command_v1RunReleaseTrackselfargss     r   _RunV1Call._RunV1?       >>$ 1 1 344r   c                 J    [         R                  " XR                  5       5      $ r   )
command_v2r   r    r!   s     r   _RunV2Call._RunV2B   r&   r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   r$   r)   __static_attributes__r+   r   r   r   r   .   s&    6 -. .55r   r   c                   (    \ rS rSrSr\S 5       rSrg)CallBetaF   r   c                 Z    [         R                  U 5        [        R                  " U 5        g)z<Register beta (and implicitly alpha) flags for this command.N)r   r   r   AddGcloudHttpTimeoutFlag)r   s    r   r   CallBeta.ArgsJ   s      	IIf 
""6*r   r+   N)r,   r-   r.   r/   r0   r3   r   r4   r+   r   r   r6   r6   F   s    6+ +r   r6   c                       \ rS rSrSrSrg)	CallAlphaS   r   r+   N)r,   r-   r.   r/   r0   r4   r+   r   r   r<   r<   S   s    6r   r<   N)r0   
__future__r   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.functionsr   r	   ,googlecloudsdk.command_lib.functions.v1.callr
   r   ,googlecloudsdk.command_lib.functions.v2.callr(   r1   ReleaseTracksr    GAFunctionResourceCommandr   BETAr6   ALPHAr<   r+   r   r   <module>rH      s    5 &  ' ( 6 5 N N  $ D%%(()54'' 5 *5. D%%**+	+t 	+ ,	+ D%%++,7 7 -7r   