1212from ..._compat import cached_property
1313from ..._resource import SyncAPIResource , AsyncAPIResource
1414from ..._response import to_streamed_response_wrapper , async_to_streamed_response_wrapper
15- from ...types .jobs import automated_list_params , automated_create_params
15+ from ...types .jobs import automated_list_params , automated_create_params , automated_retrieve_params
1616from ..._base_client import make_request_options
1717from ...types .jobs .automated_async_job import AutomatedAsyncJob
1818from ...types .jobs .automated_list_response import AutomatedListResponse
@@ -156,6 +156,7 @@ def retrieve(
156156 self ,
157157 job_id : str ,
158158 * ,
159+ entity_id : str | NotGiven = NOT_GIVEN ,
159160 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
160161 # The extra values given here take precedence over values defined on the client or passed to this method.
161162 extra_headers : Headers | None = None ,
@@ -167,6 +168,10 @@ def retrieve(
167168 Get an automated job by `job_id`.
168169
169170 Args:
171+ entity_id: The entity ID to use when authenticating with a multi-account token. Required
172+ when using a multi-account token to specify which entity's data to access.
173+ Example: `123e4567-e89b-12d3-a456-426614174000`
174+
170175 extra_headers: Send extra headers
171176
172177 extra_query: Add additional query parameters to the request
@@ -180,14 +185,19 @@ def retrieve(
180185 return self ._get (
181186 f"/jobs/automated/{ job_id } " ,
182187 options = make_request_options (
183- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
188+ extra_headers = extra_headers ,
189+ extra_query = extra_query ,
190+ extra_body = extra_body ,
191+ timeout = timeout ,
192+ query = maybe_transform ({"entity_id" : entity_id }, automated_retrieve_params .AutomatedRetrieveParams ),
184193 ),
185194 cast_to = AutomatedAsyncJob ,
186195 )
187196
188197 def list (
189198 self ,
190199 * ,
200+ entity_id : str | NotGiven = NOT_GIVEN ,
191201 limit : int | NotGiven = NOT_GIVEN ,
192202 offset : int | NotGiven = NOT_GIVEN ,
193203 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -204,6 +214,10 @@ def list(
204214 as data syncs, only the next scheduled job is shown.
205215
206216 Args:
217+ entity_id: The entity ID to use when authenticating with a multi-account token. Required
218+ when using a multi-account token to specify which entity's data to access.
219+ Example: `123e4567-e89b-12d3-a456-426614174000`
220+
207221 limit: Number of items to return
208222
209223 offset: Index to start from (defaults to 0)
@@ -225,6 +239,7 @@ def list(
225239 timeout = timeout ,
226240 query = maybe_transform (
227241 {
242+ "entity_id" : entity_id ,
228243 "limit" : limit ,
229244 "offset" : offset ,
230245 },
@@ -370,6 +385,7 @@ async def retrieve(
370385 self ,
371386 job_id : str ,
372387 * ,
388+ entity_id : str | NotGiven = NOT_GIVEN ,
373389 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
374390 # The extra values given here take precedence over values defined on the client or passed to this method.
375391 extra_headers : Headers | None = None ,
@@ -381,6 +397,10 @@ async def retrieve(
381397 Get an automated job by `job_id`.
382398
383399 Args:
400+ entity_id: The entity ID to use when authenticating with a multi-account token. Required
401+ when using a multi-account token to specify which entity's data to access.
402+ Example: `123e4567-e89b-12d3-a456-426614174000`
403+
384404 extra_headers: Send extra headers
385405
386406 extra_query: Add additional query parameters to the request
@@ -394,14 +414,21 @@ async def retrieve(
394414 return await self ._get (
395415 f"/jobs/automated/{ job_id } " ,
396416 options = make_request_options (
397- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
417+ extra_headers = extra_headers ,
418+ extra_query = extra_query ,
419+ extra_body = extra_body ,
420+ timeout = timeout ,
421+ query = await async_maybe_transform (
422+ {"entity_id" : entity_id }, automated_retrieve_params .AutomatedRetrieveParams
423+ ),
398424 ),
399425 cast_to = AutomatedAsyncJob ,
400426 )
401427
402428 async def list (
403429 self ,
404430 * ,
431+ entity_id : str | NotGiven = NOT_GIVEN ,
405432 limit : int | NotGiven = NOT_GIVEN ,
406433 offset : int | NotGiven = NOT_GIVEN ,
407434 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -418,6 +445,10 @@ async def list(
418445 as data syncs, only the next scheduled job is shown.
419446
420447 Args:
448+ entity_id: The entity ID to use when authenticating with a multi-account token. Required
449+ when using a multi-account token to specify which entity's data to access.
450+ Example: `123e4567-e89b-12d3-a456-426614174000`
451+
421452 limit: Number of items to return
422453
423454 offset: Index to start from (defaults to 0)
@@ -439,6 +470,7 @@ async def list(
439470 timeout = timeout ,
440471 query = await async_maybe_transform (
441472 {
473+ "entity_id" : entity_id ,
442474 "limit" : limit ,
443475 "offset" : offset ,
444476 },
0 commit comments