
    _j{                       S SK Jr  S SKrS SKJrJrJrJrJrJ	r	J
r
  S SKJr  S SKJr  S SKrSSKJrJrJrJrJrJrJr  SSKJrJrJrJrJr  SS	KJr  SS
KJ r J!r!  SSK"J#r#J$r$J%r%J&r&  SSK'J(r(J)r)  SSK*J+r+J,r,J-r-J.r.  SSK/J0r0  SSK1J2r2  SSK3J4r4  SSK5J6r6  SSK7J8r8  SSK9J:r:  SSK;J<r<  SSK=J>r>  SS/r? " S S\ 5      r@ " S S\!5      rA " S S5      rB " S S5      rC " S S5      rD " S  S!5      rEg)"    )annotationsN)AnyDictListUnionIterableOptionalcast)chain)Literal   )BodyOmitQueryHeadersNotGivenomit	not_given)is_givenpath_templatemaybe_transformstrip_not_givenasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperto_streamed_response_wrapperasync_to_raw_response_wrapper"async_to_streamed_response_wrapper)StreamAsyncStream)task_group_create_paramstask_group_events_paramstask_group_add_runs_paramstask_group_get_runs_params)make_request_options)	TaskGroup)TaskSpecParam)TaskGroupRunResponse)ParallelBetaParam)BetaRunInputParam)TaskGroupEventsResponse)TaskGroupGetRunsResponseTaskGroupResourceAsyncTaskGroupResourcec            
      4   \ rS rSrSr\SS j5       r\SS j5       r\R                  " S5      \
SSS\S.           SS jj5       r\R                  " S5      SSS\S	.           SS
 jj5       r\R                  " S5      \
\
\
SSS\S.                   SS jj5       r\R                  " S5      \
\
SSS\S.               SS jj5       r\R                  " S5      \
\
\
\
SSS\S.                   SS jj5       rSrg)r/   )   Tasks (Beta)c                    [        U 5      $ z
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/parallel-web/parallel-sdk-python#accessing-raw-response-data-eg-headers
) TaskGroupResourceWithRawResponseselfs    W/home/rurouni/.local/lib/python3.13/site-packages/parallel/resources/beta/task_group.pywith_raw_response#TaskGroupResource.with_raw_response,   s     055    c                    [        U 5      $ z
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/parallel-web/parallel-sdk-python#with_streaming_response
)&TaskGroupResourceWithStreamingResponser7   s    r9   with_streaming_response)TaskGroupResource.with_streaming_response6   s     6d;;r<   Use GA Task Group insteadNmetadataextra_headersextra_query
extra_bodytimeoutc                   SS0U=(       d    0 EnU R                  S[        SU0[        R                  5      [	        X#XES9[
        S9$ )s  
Initiates a TaskGroup to group and track multiple runs.

Args:
  metadata: User-provided metadata stored with the task group.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
parallel-betasearch-extract-2025-10-10/v1beta/tasks/groupsrD   rE   rF   rG   rH   bodyoptionscast_to)_postr   r#   TaskGroupCreateParamsr'   r(   r8   rD   rE   rF   rG   rH   s         r9   createTaskGroupResource.create?   s\    4 )*E_-J][]_zz" *h!79Q9g9gh(+Q[   
 	
r<   rN   c          
         U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        X#XES9[        S9$ )3  
Retrieves aggregated status across runs in a TaskGroup.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
<Expected a non-empty value for `task_group_id` but received rK   rL   $/v1beta/tasks/groups/{task_group_id}task_group_idrN   rQ   rR   
ValueError_getr   r'   r(   r8   r]   rE   rF   rG   rH   s         r9   retrieveTaskGroupResource.retrievec   sg    0 [\i[lmnn(*E_-J][]_yy@P]^(+Q[   
 	
r<   refresh_statusdefault_task_specbetasrE   rF   rG   rH   c                  U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUS.[        R                  5      [        UUUU	[        S	U0[        R                  5      S
9[        S9$ )J  
Initiates multiple task runs within a TaskGroup.

Args:
  inputs: List of task runs to execute. Up to 1,000 runs can be specified per request. If
      you'd like to add more runs, split them across multiple TaskGroup POST requests.

  default_task_spec: Specification for a task.

      Auto output schemas can be specified by setting `output_schema={"type":"auto"}`.
      Not specifying a TaskSpec is the same as setting an auto output schema.

      For convenience bare strings are also accepted as input or output schemas.

  betas: Optional header to specify the beta version(s) to enable.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rZ   rK   ,c              3  8   #    U  H  n[        U5      v   M     g 7fNstr.0es     r9   	<genexpr>-TaskGroupResource.add_runs.<locals>.<genexpr>        4KUSVVU   rL   )/v1beta/tasks/groups/{task_group_id}/runsr\   inputsrg   rf   rE   rF   rG   rH   queryrO   )r`   r   r   joinr   r   rS   r   r   r%   TaskGroupAddRunsParamsr'   r*   
r8   r]   ry   rf   rg   rh   rE   rF   rG   rH   s
             r9   add_runsTaskGroupResource.add_runs   s    P [\i[lmnn	
# &)XXe4KU4KNiMj.k%l"	
 "	
 )*E_-J][]_zzEUbc $): +AA )+'%%%~68R8i8i )%  
 	
r<   last_event_idapi_timeoutrE   rF   rG   rH   c               &   U(       d  [        SU< 35      eSS0U=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUU[	        UUS.[
        R                  5      S	9[        [        [        5      S
[        [           S9$ )  
Streams events from a TaskGroup: status updates and run completions.

The connection will remain open for up to an hour as long as at least one run in
the group is still active.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rZ   Accepttext/event-streamrK   rL   +/v1beta/tasks/groups/{task_group_id}/eventsr\   r   r   rz   TrQ   rR   stream
stream_cls)r`   ra   r   r'   r   r$   TaskGroupEventsParamsr
   r   r-   r!   r8   r]   r   r   rE   rF   rG   rH   s           r9   eventsTaskGroupResource.events   s    : [\i[lmnn!#6P=;NBP(*E_-J][]_yyGWde(+'%%)6'2 -BB , 56'  
 	
r<   include_inputinclude_outputr   statusrE   rF   rG   rH   c               *   U(       d  [        SU< 35      eSS0U=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUU	[	        UUUUS.[
        R                  5      S	9[        [        [        5      S
[        [           S9$ )  
Retrieves task runs in a TaskGroup and optionally their inputs and outputs.

All runs within a TaskGroup are returned as a stream. To get the inputs and/or
outputs back in the stream, set the corresponding `include_input` and
`include_output` parameters to `true`.

The stream is resumable using the `event_id` as the cursor. To resume a stream,
specify the `last_event_id` parameter with the `event_id` of the last event in
the stream. The stream will resume from the next event after the
`last_event_id`.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rZ   r   r   rK   rL   rw   r\   r   r   r   r   rz   Tr   )r`   ra   r   r'   r   r&   TaskGroupGetRunsParamsr
   r   r.   r!   
r8   r]   r   r   r   r   rE   rF   rG   rH   s
             r9   get_runsTaskGroupResource.get_runs  s    P [\i[lmnn!#6P=;NBP(*E_-J][]_yyEUbc(+'%%)6*8)6"(	 /EE - 67+  
 	
r<    )returnr6   )r   r?   rD   z3Optional[Dict[str, Union[str, float, bool]]] | OmitrE   Headers | NonerF   Query | NonerG   Body | NonerH   'float | httpx.Timeout | None | NotGivenr   r(   r]   ro   rE   r   rF   r   rG   r   rH   r   r   r(   r]   ro   ry   zIterable[BetaRunInputParam]rf   bool | Omitrg   zOptional[TaskSpecParam] | Omitrh   zList[ParallelBetaParam] | OmitrE   r   rF   r   rG   r   rH   r   r   r*   )r]   ro   r   Optional[str] | Omitr   Optional[float] | OmitrE   r   rF   r   rG   r   rH   r   r   zStream[TaskGroupEventsResponse])r]   ro   r   r   r   r   r   r   r   rOptional[Literal['queued', 'action_required', 'running', 'completed', 'failed', 'cancelling', 'cancelled']] | OmitrE   r   rF   r   rG   r   rH   r   r   z Stream[TaskGroupGetRunsResponse]__name__
__module____qualname____firstlineno____doc__r   r:   r@   typing_extensions
deprecatedr   r   rV   rc   r   r   r   __static_attributes__r   r<   r9   r/   r/   )   s   6 6 < < !!"=> IM )-$("&;D!
 F!
 &!
 "!
  !
 9!
 
!
 ?!
F !!"=> )-$("&;D 
 
 & 
 " 
   
 9 
 
 
 ? 
D !!"=> '+<@04 )-$("&;DG
G
 ,	G

 $G
 :G
 .G
 &G
 "G
  G
 9G
 
G
 ?G
R !!"=>
 /3.2 )-$("&;D4
4
 ,	4

 ,4
 &4
 "4
  4
 94
 
)4
 ?4
l !!"=>
 &*&*.2  )-$("&;D!A
A
 #	A

 $A
 ,A
A
 &A
 "A
  A
  9!A
" 
*#A
 ?A
r<   c            
      4   \ rS rSrSr\SS j5       r\SS j5       r\R                  " S5      \
SSS\S.           SS jj5       r\R                  " S5      SSS\S	.           SS
 jj5       r\R                  " S5      \
\
\
SSS\S.                   SS jj5       r\R                  " S5      \
\
SSS\S.               SS jj5       r\R                  " S5      \
\
\
\
SSS\S.                   SS jj5       rSrg)r0   iL  r3   c                    [        U 5      $ r5   )%AsyncTaskGroupResourceWithRawResponser7   s    r9   r:   (AsyncTaskGroupResource.with_raw_responseO  s     5T::r<   c                    [        U 5      $ r>   )+AsyncTaskGroupResourceWithStreamingResponser7   s    r9   r@   .AsyncTaskGroupResource.with_streaming_responseY  s     ;4@@r<   rB   NrC   c                  #    SS0U=(       d    0 EnU R                  S[        SU0[        R                  5      I Sh  vN [	        X#XES9[
        S9I Sh  vN $  N N7f)rJ   rK   rL   rM   rD   NrN   rO   )rS   r   r#   rT   r'   r(   rU   s         r9   rV   AsyncTaskGroupResource.createb  so     4 )*E_-J][]_ZZ",j(-CE]EsEstt(+Q[    
 
 	
t
s!   ;AA
AAAArN   c          
        #    U(       d  [        SU< 35      eSS0U=(       d    0 EnU R                  [        SUS9[        X#XES9[        S9I Sh  vN $  N7f)	rY   rZ   rK   rL   r[   r\   rN   r^   Nr_   rb   s         r9   rc   AsyncTaskGroupResource.retrieve  st     0 [\i[lmnn(*E_-J][]_YY@P]^(+Q[   
 
 	
 
s   AAAAre   c                 #    U(       d  [        SU< 35      e0 [        S[        U5      (       a#  SR                  [	        S U 5       S/5      5      O[
        05      EU=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUS.[        R                  5      I S	h  vN [        UUUU	[        S
U0[        R                  5      I S	h  vN S9[        S9I S	h  vN $  NA N N7f)rj   rZ   rK   rk   c              3  8   #    U  H  n[        U5      v   M     g 7frm   rn   rp   s     r9   rs   2AsyncTaskGroupResource.add_runs.<locals>.<genexpr>  ru   rv   rL   rw   r\   rx   Nrf   rz   rO   )r`   r   r   r|   r   r   rS   r   r   r%   r}   r'   r*   r~   s
             r9   r   AsyncTaskGroupResource.add_runs  s     P [\i[lmnn	
# &)XXe4KU4KNiMj.k%l"	
 "	
 )*E_-J][]_ZZEUbc,$): +AA  )+'%1%~68R8i8i  )%   
 
 	

s6   B+C5-C/
.+C5C1C5*C3+C51C53C5r   c               V  #    U(       d  [        SU< 35      eSS0U=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUU[	        UUS.[
        R                  5      I S	h  vN S
9[        [        [        5      S[        [           S9I S	h  vN $  N0 N7f)r   rZ   r   r   rK   rL   r   r\   r   Nrz   Tr   )r`   ra   r   r'   r   r$   r   r
   r   r-   r"   r   s           r9   r   AsyncTaskGroupResource.events  s     : [\i[lmnn!#6P=;NBP(*E_-J][]_YYGWde(+'%1)6'2 -BB  , "#:;'  
 
 	

s$   A2B)4B%5+B) B'!B)'B)r   c               Z  #    U(       d  [        SU< 35      eSS0U=(       d    0 EnSS0U=(       d    0 EnU R                  [        SUS9[        UUUU	[	        UUUUS.[
        R                  5      I S	h  vN S
9[        [        [        5      S[        [           S9I S	h  vN $  N0 N7f)r   rZ   r   r   rK   rL   rw   r\   r   Nrz   Tr   )r`   ra   r   r'   r   r&   r   r
   r   r.   r"   r   s
             r9   r   AsyncTaskGroupResource.get_runs*  s     P [\i[lmnn!#6P=;NBP(*E_-J][]_YYEUbc(+'%1)6*8)6"(	 /EE  - "#;<+  
 
 	

s$   A4B+6B'7+B+"B)#B+)B+r   )r   r   )r   r   r   r   r   )r]   ro   r   r   r   r   rE   r   rF   r   rG   r   rH   r   r   z$AsyncStream[TaskGroupEventsResponse])r]   ro   r   r   r   r   r   r   r   r   rE   r   rF   r   rG   r   rH   r   r   z%AsyncStream[TaskGroupGetRunsResponse]r   r   r<   r9   r0   r0   L  s   ; ; A A !!"=> IM )-$("&;D!
 F!
 &!
 "!
  !
 9!
 
!
 ?!
F !!"=> )-$("&;D 
 
 & 
 " 
   
 9 
 
 
 ? 
D !!"=> '+<@04 )-$("&;DG
G
 ,	G

 $G
 :G
 .G
 &G
 "G
  G
 9G
 
G
 ?G
R !!"=>
 /3.2 )-$("&;D4
4
 ,	4

 ,4
 &4
 "4
  4
 94
 
.4
 ?4
l !!"=>
 &*&*.2  )-$("&;D!A
A
 #	A

 $A
 ,A
A
 &A
 "A
  A
  9!A
" 
/#A
 ?A
r<   c                      \ rS rSrSS jrSrg)r6   io  c                   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        g rm   )_task_groupr   rV   rc   r   r   r   r8   
task_groups     r9   __init__)TaskGroupResourceWithRawResponse.__init__p  s    % $!! 	 $## 	 $## 	 $!! 	 $## 	r<   r   r   rV   r   r   rc   Nr   r/   r   Noner   r   r   r   r   r   r   r<   r9   r6   r6   o      
r<   r6   c                      \ rS rSrSS jrSrg)r   i  c                   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        g rm   )r   r   rV   rc   r   r   r   r   s     r9   r   .AsyncTaskGroupResourceWithRawResponse.__init__  s    % *!! 	 *## 	 *## 	 *!! 	 *## 	r<   r   Nr   r0   r   r   r   r   r<   r9   r   r     r   r<   r   c                      \ rS rSrSS jrSrg)r?   i  c                   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        g rm   )r   r   rV   rc   r   r   r   r   s     r9   r   /TaskGroupResourceWithStreamingResponse.__init__  s    % )!! 	 )## 	 )## 	 )!! 	 )## 	r<   r   Nr   r   r   r<   r9   r?   r?     r   r<   r?   c                      \ rS rSrSS jrSrg)r   i  c                   Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        [        UR                  5      U l        g rm   )r   r    rV   rc   r   r   r   r   s     r9   r   4AsyncTaskGroupResourceWithStreamingResponse.__init__  s    % /!! 	 /## 	 /## 	 /!! 	 /## 	r<   r   Nr   r   r   r<   r9   r   r     r   r<   r   )F
__future__r   r   typingr   r   r   r   r   r	   r
   	itertoolsr   r   httpx_typesr   r   r   r   r   r   r   _utilsr   r   r   r   r   _compatr   	_resourcer   r   	_responser   r   r   r    
_streamingr!   r"   
types.betar#   r$   r%   r&   _base_clientr'   types.task_groupr(   types.task_spec_paramr)   types.task_group_run_responser*   types.beta.parallel_beta_paramr+   types.beta.beta_run_input_paramr,   %types.beta.task_group_events_responser-   'types.beta.task_group_get_runs_responser.   __all__r/   r0   r6   r   r?   r   r   r<   r9   <module>r      s    #  C C C  %  K K K f f & :  .  1 ) 2 A ? @ L O 8
9`
 `
F	`
- `
F	
 
>
 
>
 
>
 
r<   