
                            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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.    )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.Args1   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._RunV2?   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)CallBetaC   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.ArgsG   s      	IIf 
""6*r   r(   N)r)   r*   r+   r,   r-   r0   r   r1   r(   r   r   r3   r3   C   s    6+ +r   r3   c                       \ rS rSrSrSrg)	CallAlphaP   r   r(   N)r)   r*   r+   r,   r-   r1   r(   r   r   r9   r9   P   s    6r   r9   N)r-   googlecloudsdk.callioper   $googlecloudsdk.command_lib.functionsr   r   ,googlecloudsdk.command_lib.functions.v1.callr   r   ,googlecloudsdk.command_lib.functions.v2.callr%   r.   ReleaseTracksr   GAFunctionResourceCommandr
   BETAr3   ALPHAr9   r(   r   r   <module>rD      s    5 ) 6 5 N N  $ D%%(()54'' 5 *5. D%%**+	+t 	+ ,	+ D%%++,7 7 -7r   