Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/airflow/sdk/api/datamodels/_generated.py: 99%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

307 statements  

1# generated by datamodel-codegen: 

2# filename: http://0.0.0.0:8080/execution/openapi.json 

3# version: 0.33.0 

4 

5# Licensed to the Apache Software Foundation (ASF) under one 

6# or more contributor license agreements. See the NOTICE file 

7# distributed with this work for additional information 

8# regarding copyright ownership. The ASF licenses this file 

9# to you under the Apache License, Version 2.0 (the 

10# "License"); you may not use this file except in compliance 

11# with the License. You may obtain a copy of the License at 

12# 

13# http://www.apache.org/licenses/LICENSE-2.0 

14# 

15# Unless required by applicable law or agreed to in writing, 

16# software distributed under the License is distributed on an 

17# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 

18# KIND, either express or implied. See the License for the 

19# specific language governing permissions and limitations 

20# under the License. 

21from __future__ import annotations 

22 

23from datetime import timedelta 

24from enum import Enum 

25from typing import Annotated, Any, Final, Literal 

26from uuid import UUID 

27 

28from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, JsonValue, RootModel 

29 

30API_VERSION: Final[str] = "2026-04-06" 

31 

32 

33class AssetAliasReferenceAssetEventDagRun(BaseModel): 

34 """ 

35 Schema for AssetAliasModel used in AssetEventDagRunReference. 

36 """ 

37 

38 model_config = ConfigDict( 

39 extra="forbid", 

40 ) 

41 name: Annotated[str, Field(title="Name")] 

42 

43 

44class AssetProfile(BaseModel): 

45 """ 

46 Profile of an asset-like object. 

47 

48 Asset will have name, uri defined, with type set to 'Asset'. 

49 AssetNameRef will have name defined, type set to 'AssetNameRef'. 

50 AssetUriRef will have uri defined, type set to 'AssetUriRef'. 

51 AssetAlias will have name defined, type set to 'AssetAlias'. 

52 

53 Note that 'type' here is distinct from 'asset_type' the user declares on an 

54 Asset (or subclass). This field is for distinguishing between different 

55 asset-related types (Asset, AssetRef, or AssetAlias). 

56 """ 

57 

58 model_config = ConfigDict( 

59 extra="forbid", 

60 ) 

61 name: Annotated[str | None, Field(title="Name")] = None 

62 uri: Annotated[str | None, Field(title="Uri")] = None 

63 type: Annotated[str, Field(title="Type")] 

64 

65 

66class ConnectionResponse(BaseModel): 

67 """ 

68 Connection schema for responses with fields that are needed for Runtime. 

69 """ 

70 

71 conn_id: Annotated[str, Field(title="Conn Id")] 

72 conn_type: Annotated[str, Field(title="Conn Type")] 

73 host: Annotated[str | None, Field(title="Host")] = None 

74 schema_: Annotated[str | None, Field(alias="schema", title="Schema")] = None 

75 login: Annotated[str | None, Field(title="Login")] = None 

76 password: Annotated[str | None, Field(title="Password")] = None 

77 port: Annotated[int | None, Field(title="Port")] = None 

78 extra: Annotated[str | None, Field(title="Extra")] = None 

79 

80 

81class DagResponse(BaseModel): 

82 """ 

83 Schema for DAG response. 

84 """ 

85 

86 dag_id: Annotated[str, Field(title="Dag Id")] 

87 is_paused: Annotated[bool, Field(title="Is Paused")] 

88 bundle_name: Annotated[str | None, Field(title="Bundle Name")] = None 

89 bundle_version: Annotated[str | None, Field(title="Bundle Version")] = None 

90 relative_fileloc: Annotated[str | None, Field(title="Relative Fileloc")] = None 

91 owners: Annotated[str | None, Field(title="Owners")] = None 

92 tags: Annotated[list[str], Field(title="Tags")] 

93 next_dagrun: Annotated[AwareDatetime | None, Field(title="Next Dagrun")] = None 

94 

95 

96class DagRunAssetReference(BaseModel): 

97 """ 

98 DagRun serializer for asset responses. 

99 """ 

100 

101 model_config = ConfigDict( 

102 extra="forbid", 

103 ) 

104 run_id: Annotated[str, Field(title="Run Id")] 

105 dag_id: Annotated[str, Field(title="Dag Id")] 

106 logical_date: Annotated[AwareDatetime | None, Field(title="Logical Date")] = None 

107 start_date: Annotated[AwareDatetime, Field(title="Start Date")] 

108 end_date: Annotated[AwareDatetime | None, Field(title="End Date")] = None 

109 state: Annotated[str, Field(title="State")] 

110 data_interval_start: Annotated[AwareDatetime | None, Field(title="Data Interval Start")] = None 

111 data_interval_end: Annotated[AwareDatetime | None, Field(title="Data Interval End")] = None 

112 partition_key: Annotated[str | None, Field(title="Partition Key")] = None 

113 

114 

115class DagRunState(str, Enum): 

116 """ 

117 All possible states that a DagRun can be in. 

118 

119 These are "shared" with TaskInstanceState in some parts of the code, 

120 so please ensure that their values always match the ones with the 

121 same name in TaskInstanceState. 

122 """ 

123 

124 QUEUED = "queued" 

125 RUNNING = "running" 

126 SUCCESS = "success" 

127 FAILED = "failed" 

128 

129 

130class DagRunStateResponse(BaseModel): 

131 """ 

132 Schema for DAG Run State response. 

133 """ 

134 

135 state: DagRunState 

136 

137 

138class DagRunType(str, Enum): 

139 """ 

140 Class with DagRun types. 

141 """ 

142 

143 BACKFILL = "backfill" 

144 SCHEDULED = "scheduled" 

145 MANUAL = "manual" 

146 ASSET_TRIGGERED = "asset_triggered" 

147 ASSET_MATERIALIZATION = "asset_materialization" 

148 

149 

150class HITLUser(BaseModel): 

151 """ 

152 Schema for a Human-in-the-loop users. 

153 """ 

154 

155 id: Annotated[str, Field(title="Id")] 

156 name: Annotated[str, Field(title="Name")] 

157 

158 

159class InactiveAssetsResponse(BaseModel): 

160 """ 

161 Response for inactive assets. 

162 """ 

163 

164 inactive_assets: Annotated[list[AssetProfile] | None, Field(title="Inactive Assets")] = None 

165 

166 

167class IntermediateTIState(str, Enum): 

168 """ 

169 States that a Task Instance can be in that indicate it is not yet in a terminal or running state. 

170 """ 

171 

172 SCHEDULED = "scheduled" 

173 QUEUED = "queued" 

174 RESTARTING = "restarting" 

175 UP_FOR_RETRY = "up_for_retry" 

176 UP_FOR_RESCHEDULE = "up_for_reschedule" 

177 DEFERRED = "deferred" 

178 

179 

180class PrevSuccessfulDagRunResponse(BaseModel): 

181 """ 

182 Schema for response with previous successful DagRun information for Task Template Context. 

183 """ 

184 

185 data_interval_start: Annotated[AwareDatetime | None, Field(title="Data Interval Start")] = None 

186 data_interval_end: Annotated[AwareDatetime | None, Field(title="Data Interval End")] = None 

187 start_date: Annotated[AwareDatetime | None, Field(title="Start Date")] = None 

188 end_date: Annotated[AwareDatetime | None, Field(title="End Date")] = None 

189 

190 

191class PreviousTIResponse(BaseModel): 

192 """ 

193 Schema for response with previous TaskInstance information. 

194 """ 

195 

196 task_id: Annotated[str, Field(title="Task Id")] 

197 dag_id: Annotated[str, Field(title="Dag Id")] 

198 run_id: Annotated[str, Field(title="Run Id")] 

199 logical_date: Annotated[AwareDatetime | None, Field(title="Logical Date")] = None 

200 start_date: Annotated[AwareDatetime | None, Field(title="Start Date")] = None 

201 end_date: Annotated[AwareDatetime | None, Field(title="End Date")] = None 

202 state: Annotated[str | None, Field(title="State")] = None 

203 try_number: Annotated[int, Field(title="Try Number")] 

204 map_index: Annotated[int | None, Field(title="Map Index")] = -1 

205 duration: Annotated[float | None, Field(title="Duration")] = None 

206 

207 

208class TIDeferredStatePayload(BaseModel): 

209 """ 

210 Schema for updating TaskInstance to a deferred state. 

211 """ 

212 

213 model_config = ConfigDict( 

214 extra="forbid", 

215 ) 

216 state: Annotated[Literal["deferred"] | None, Field(title="State")] = "deferred" 

217 classpath: Annotated[str, Field(title="Classpath")] 

218 trigger_kwargs: Annotated[dict[str, JsonValue] | str | None, Field(title="Trigger Kwargs")] = None 

219 trigger_timeout: Annotated[timedelta | None, Field(title="Trigger Timeout")] = None 

220 queue: Annotated[str | None, Field(title="Queue")] = None 

221 next_method: Annotated[str, Field(title="Next Method")] 

222 next_kwargs: Annotated[dict[str, JsonValue] | None, Field(title="Next Kwargs")] = None 

223 rendered_map_index: Annotated[str | None, Field(title="Rendered Map Index")] = None 

224 

225 

226class TIEnterRunningPayload(BaseModel): 

227 """ 

228 Schema for updating TaskInstance to 'RUNNING' state with minimal required fields. 

229 """ 

230 

231 model_config = ConfigDict( 

232 extra="forbid", 

233 ) 

234 state: Annotated[Literal["running"] | None, Field(title="State")] = "running" 

235 hostname: Annotated[str, Field(title="Hostname")] 

236 unixname: Annotated[str, Field(title="Unixname")] 

237 pid: Annotated[int, Field(title="Pid")] 

238 start_date: Annotated[AwareDatetime, Field(title="Start Date")] 

239 

240 

241class TIHeartbeatInfo(BaseModel): 

242 """ 

243 Schema for TaskInstance heartbeat endpoint. 

244 """ 

245 

246 model_config = ConfigDict( 

247 extra="forbid", 

248 ) 

249 hostname: Annotated[str, Field(title="Hostname")] 

250 pid: Annotated[int, Field(title="Pid")] 

251 

252 

253class TIRescheduleStatePayload(BaseModel): 

254 """ 

255 Schema for updating TaskInstance to a up_for_reschedule state. 

256 """ 

257 

258 model_config = ConfigDict( 

259 extra="forbid", 

260 ) 

261 state: Annotated[Literal["up_for_reschedule"] | None, Field(title="State")] = "up_for_reschedule" 

262 reschedule_date: Annotated[AwareDatetime, Field(title="Reschedule Date")] 

263 end_date: Annotated[AwareDatetime, Field(title="End Date")] 

264 

265 

266class TIRetryStatePayload(BaseModel): 

267 """ 

268 Schema for updating TaskInstance to up_for_retry. 

269 """ 

270 

271 model_config = ConfigDict( 

272 extra="forbid", 

273 ) 

274 state: Annotated[Literal["up_for_retry"] | None, Field(title="State")] = "up_for_retry" 

275 end_date: Annotated[AwareDatetime, Field(title="End Date")] 

276 rendered_map_index: Annotated[str | None, Field(title="Rendered Map Index")] = None 

277 

278 

279class TISkippedDownstreamTasksStatePayload(BaseModel): 

280 """ 

281 Schema for updating downstream tasks to a skipped state. 

282 """ 

283 

284 model_config = ConfigDict( 

285 extra="forbid", 

286 ) 

287 tasks: Annotated[list[str | tuple[str, int]], Field(title="Tasks")] 

288 

289 

290class TISuccessStatePayload(BaseModel): 

291 """ 

292 Schema for updating TaskInstance to success state. 

293 """ 

294 

295 model_config = ConfigDict( 

296 extra="forbid", 

297 ) 

298 state: Annotated[Literal["success"] | None, Field(title="State")] = "success" 

299 end_date: Annotated[AwareDatetime, Field(title="End Date")] 

300 task_outlets: Annotated[list[AssetProfile] | None, Field(title="Task Outlets")] = None 

301 outlet_events: Annotated[list[dict[str, Any]] | None, Field(title="Outlet Events")] = None 

302 rendered_map_index: Annotated[str | None, Field(title="Rendered Map Index")] = None 

303 

304 

305class TITargetStatePayload(BaseModel): 

306 """ 

307 Schema for updating TaskInstance to a target state, excluding terminal and running states. 

308 """ 

309 

310 model_config = ConfigDict( 

311 extra="forbid", 

312 ) 

313 state: IntermediateTIState 

314 

315 

316class TaskBreadcrumbsResponse(BaseModel): 

317 """ 

318 Response for task breadcrumbs. 

319 """ 

320 

321 breadcrumbs: Annotated[list[dict[str, Any]], Field(title="Breadcrumbs")] 

322 

323 

324class TaskInstanceState(str, Enum): 

325 """ 

326 All possible states that a Task Instance can be in. 

327 

328 Note that None is also allowed, so always use this in a type hint with Optional. 

329 """ 

330 

331 REMOVED = "removed" 

332 SCHEDULED = "scheduled" 

333 QUEUED = "queued" 

334 RUNNING = "running" 

335 SUCCESS = "success" 

336 RESTARTING = "restarting" 

337 FAILED = "failed" 

338 UP_FOR_RETRY = "up_for_retry" 

339 UP_FOR_RESCHEDULE = "up_for_reschedule" 

340 UPSTREAM_FAILED = "upstream_failed" 

341 SKIPPED = "skipped" 

342 DEFERRED = "deferred" 

343 

344 

345class TaskStatesResponse(BaseModel): 

346 """ 

347 Response for task states with run_id, task and state. 

348 """ 

349 

350 task_states: Annotated[dict[str, Any], Field(title="Task States")] 

351 

352 

353class TerminalStateNonSuccess(str, Enum): 

354 """ 

355 TaskInstance states that can be reported without extra information. 

356 """ 

357 

358 FAILED = "failed" 

359 SKIPPED = "skipped" 

360 REMOVED = "removed" 

361 UPSTREAM_FAILED = "upstream_failed" 

362 

363 

364class TriggerDAGRunPayload(BaseModel): 

365 """ 

366 Schema for Trigger DAG Run API request. 

367 """ 

368 

369 model_config = ConfigDict( 

370 extra="forbid", 

371 ) 

372 logical_date: Annotated[AwareDatetime | None, Field(title="Logical Date")] = None 

373 conf: Annotated[dict[str, Any] | None, Field(title="Conf")] = None 

374 reset_dag_run: Annotated[bool | None, Field(title="Reset Dag Run")] = False 

375 partition_key: Annotated[str | None, Field(title="Partition Key")] = None 

376 note: Annotated[str | None, Field(title="Note")] = None 

377 

378 

379class UpdateHITLDetailPayload(BaseModel): 

380 """ 

381 Schema for writing the response part of a Human-in-the-loop detail for a specific task instance. 

382 """ 

383 

384 ti_id: Annotated[UUID, Field(title="Ti Id")] 

385 chosen_options: Annotated[list[str], Field(min_length=1, title="Chosen Options")] 

386 params_input: Annotated[dict[str, Any] | None, Field(title="Params Input")] = None 

387 

388 

389class ValidationError(BaseModel): 

390 loc: Annotated[list[str | int], Field(title="Location")] 

391 msg: Annotated[str, Field(title="Message")] 

392 type: Annotated[str, Field(title="Error Type")] 

393 input: Annotated[Any | None, Field(title="Input")] = None 

394 ctx: Annotated[dict[str, Any] | None, Field(title="Context")] = None 

395 

396 

397class VariablePostBody(BaseModel): 

398 """ 

399 Request body schema for creating variables. 

400 """ 

401 

402 model_config = ConfigDict( 

403 extra="forbid", 

404 ) 

405 val: Annotated[str | None, Field(title="Val")] = None 

406 description: Annotated[str | None, Field(title="Description")] = None 

407 

408 

409class VariableResponse(BaseModel): 

410 """ 

411 Variable schema for responses with fields that are needed for Runtime. 

412 """ 

413 

414 model_config = ConfigDict( 

415 extra="forbid", 

416 ) 

417 key: Annotated[str, Field(title="Key")] 

418 value: Annotated[str | None, Field(title="Value")] = None 

419 

420 

421class XComResponse(BaseModel): 

422 """ 

423 XCom schema for responses with fields that are needed for Runtime. 

424 """ 

425 

426 key: Annotated[str, Field(title="Key")] 

427 value: JsonValue 

428 

429 

430class XComSequenceIndexResponse(RootModel[JsonValue]): 

431 root: Annotated[ 

432 JsonValue, 

433 Field( 

434 description="XCom schema with minimal structure for index-based access.", 

435 title="XComSequenceIndexResponse", 

436 ), 

437 ] 

438 

439 

440class XComSequenceSliceResponse(RootModel[list[JsonValue]]): 

441 """ 

442 XCom schema with minimal structure for slice-based access. 

443 """ 

444 

445 root: Annotated[ 

446 list[JsonValue], 

447 Field( 

448 description="XCom schema with minimal structure for slice-based access.", 

449 title="XComSequenceSliceResponse", 

450 ), 

451 ] 

452 

453 

454class TaskInstance(BaseModel): 

455 """ 

456 Schema for TaskInstance model with minimal required fields needed for Runtime. 

457 """ 

458 

459 id: Annotated[UUID, Field(title="Id")] 

460 task_id: Annotated[str, Field(title="Task Id")] 

461 dag_id: Annotated[str, Field(title="Dag Id")] 

462 run_id: Annotated[str, Field(title="Run Id")] 

463 try_number: Annotated[int, Field(title="Try Number")] 

464 dag_version_id: Annotated[UUID, Field(title="Dag Version Id")] 

465 map_index: Annotated[int | None, Field(title="Map Index")] = -1 

466 hostname: Annotated[str | None, Field(title="Hostname")] = None 

467 context_carrier: Annotated[dict[str, Any] | None, Field(title="Context Carrier")] = None 

468 

469 

470class BundleInfo(BaseModel): 

471 """ 

472 Schema for telling task which bundle to run with. 

473 """ 

474 

475 name: Annotated[str, Field(title="Name")] 

476 version: Annotated[str | None, Field(title="Version")] = None 

477 

478 

479class TerminalTIState(str, Enum): 

480 SUCCESS = "success" 

481 FAILED = "failed" 

482 SKIPPED = "skipped" 

483 UPSTREAM_FAILED = "upstream_failed" 

484 REMOVED = "removed" 

485 

486 

487class WeightRule(str, Enum): 

488 DOWNSTREAM = "downstream" 

489 UPSTREAM = "upstream" 

490 ABSOLUTE = "absolute" 

491 

492 

493class TriggerRule(str, Enum): 

494 ALL_SUCCESS = "all_success" 

495 ALL_FAILED = "all_failed" 

496 ALL_DONE = "all_done" 

497 ALL_DONE_MIN_ONE_SUCCESS = "all_done_min_one_success" 

498 ALL_DONE_SETUP_SUCCESS = "all_done_setup_success" 

499 ONE_SUCCESS = "one_success" 

500 ONE_FAILED = "one_failed" 

501 ONE_DONE = "one_done" 

502 NONE_FAILED = "none_failed" 

503 NONE_SKIPPED = "none_skipped" 

504 ALWAYS = "always" 

505 NONE_FAILED_MIN_ONE_SUCCESS = "none_failed_min_one_success" 

506 ALL_SKIPPED = "all_skipped" 

507 

508 

509class DagAttributeTypes(str, Enum): 

510 OP = "operator" 

511 TASK_GROUP = "taskgroup" 

512 

513 

514class AssetReferenceAssetEventDagRun(BaseModel): 

515 """ 

516 Schema for AssetModel used in AssetEventDagRunReference. 

517 """ 

518 

519 model_config = ConfigDict( 

520 extra="forbid", 

521 ) 

522 name: Annotated[str, Field(title="Name")] 

523 uri: Annotated[str, Field(title="Uri")] 

524 extra: Annotated[dict[str, JsonValue], Field(title="Extra")] 

525 

526 

527class AssetResponse(BaseModel): 

528 """ 

529 Asset schema for responses with fields that are needed for Runtime. 

530 """ 

531 

532 name: Annotated[str, Field(title="Name")] 

533 uri: Annotated[str, Field(title="Uri")] 

534 group: Annotated[str, Field(title="Group")] 

535 extra: Annotated[dict[str, JsonValue] | None, Field(title="Extra")] = None 

536 

537 

538class HITLDetailRequest(BaseModel): 

539 """ 

540 Schema for the request part of a Human-in-the-loop detail for a specific task instance. 

541 """ 

542 

543 ti_id: Annotated[UUID, Field(title="Ti Id")] 

544 options: Annotated[list[str], Field(min_length=1, title="Options")] 

545 subject: Annotated[str, Field(title="Subject")] 

546 body: Annotated[str | None, Field(title="Body")] = None 

547 defaults: Annotated[list[str] | None, Field(title="Defaults")] = None 

548 multiple: Annotated[bool | None, Field(title="Multiple")] = False 

549 params: Annotated[dict[str, Any] | None, Field(title="Params")] = None 

550 assigned_users: Annotated[list[HITLUser] | None, Field(title="Assigned Users")] = None 

551 

552 

553class HITLDetailResponse(BaseModel): 

554 """ 

555 Schema for the response part of a Human-in-the-loop detail for a specific task instance. 

556 """ 

557 

558 response_received: Annotated[bool, Field(title="Response Received")] 

559 responded_by_user: HITLUser | None = None 

560 responded_at: Annotated[AwareDatetime | None, Field(title="Responded At")] = None 

561 chosen_options: Annotated[list[str] | None, Field(title="Chosen Options")] = None 

562 params_input: Annotated[dict[str, Any] | None, Field(title="Params Input")] = None 

563 

564 

565class HTTPValidationError(BaseModel): 

566 detail: Annotated[list[ValidationError] | None, Field(title="Detail")] = None 

567 

568 

569class TITerminalStatePayload(BaseModel): 

570 """ 

571 Schema for updating TaskInstance to a terminal state except SUCCESS state. 

572 """ 

573 

574 model_config = ConfigDict( 

575 extra="forbid", 

576 ) 

577 state: TerminalStateNonSuccess 

578 end_date: Annotated[AwareDatetime, Field(title="End Date")] 

579 rendered_map_index: Annotated[str | None, Field(title="Rendered Map Index")] = None 

580 

581 

582class AssetEventDagRunReference(BaseModel): 

583 """ 

584 Schema for AssetEvent model used in DagRun. 

585 """ 

586 

587 model_config = ConfigDict( 

588 extra="forbid", 

589 ) 

590 asset: AssetReferenceAssetEventDagRun 

591 extra: Annotated[dict[str, JsonValue], Field(title="Extra")] 

592 source_task_id: Annotated[str | None, Field(title="Source Task Id")] = None 

593 source_dag_id: Annotated[str | None, Field(title="Source Dag Id")] = None 

594 source_run_id: Annotated[str | None, Field(title="Source Run Id")] = None 

595 source_map_index: Annotated[int | None, Field(title="Source Map Index")] = None 

596 source_aliases: Annotated[list[AssetAliasReferenceAssetEventDagRun], Field(title="Source Aliases")] 

597 timestamp: Annotated[AwareDatetime, Field(title="Timestamp")] 

598 

599 

600class AssetEventResponse(BaseModel): 

601 """ 

602 Asset event schema with fields that are needed for Runtime. 

603 """ 

604 

605 id: Annotated[int, Field(title="Id")] 

606 timestamp: Annotated[AwareDatetime, Field(title="Timestamp")] 

607 extra: Annotated[dict[str, JsonValue] | None, Field(title="Extra")] = None 

608 asset: AssetResponse 

609 created_dagruns: Annotated[list[DagRunAssetReference], Field(title="Created Dagruns")] 

610 source_task_id: Annotated[str | None, Field(title="Source Task Id")] = None 

611 source_dag_id: Annotated[str | None, Field(title="Source Dag Id")] = None 

612 source_run_id: Annotated[str | None, Field(title="Source Run Id")] = None 

613 source_map_index: Annotated[int | None, Field(title="Source Map Index")] = None 

614 partition_key: Annotated[str | None, Field(title="Partition Key")] = None 

615 

616 

617class AssetEventsResponse(BaseModel): 

618 """ 

619 Collection of AssetEventResponse. 

620 """ 

621 

622 asset_events: Annotated[list[AssetEventResponse], Field(title="Asset Events")] 

623 

624 

625class DagRun(BaseModel): 

626 """ 

627 Schema for DagRun model with minimal required fields needed for Runtime. 

628 """ 

629 

630 model_config = ConfigDict( 

631 extra="forbid", 

632 ) 

633 dag_id: Annotated[str, Field(title="Dag Id")] 

634 run_id: Annotated[str, Field(title="Run Id")] 

635 logical_date: Annotated[AwareDatetime | None, Field(title="Logical Date")] = None 

636 data_interval_start: Annotated[AwareDatetime | None, Field(title="Data Interval Start")] = None 

637 data_interval_end: Annotated[AwareDatetime | None, Field(title="Data Interval End")] = None 

638 run_after: Annotated[AwareDatetime, Field(title="Run After")] 

639 start_date: Annotated[AwareDatetime | None, Field(title="Start Date")] = None 

640 end_date: Annotated[AwareDatetime | None, Field(title="End Date")] = None 

641 clear_number: Annotated[int | None, Field(title="Clear Number")] = 0 

642 run_type: DagRunType 

643 state: DagRunState 

644 conf: Annotated[dict[str, Any] | None, Field(title="Conf")] = None 

645 triggering_user_name: Annotated[str | None, Field(title="Triggering User Name")] = None 

646 consumed_asset_events: Annotated[list[AssetEventDagRunReference], Field(title="Consumed Asset Events")] 

647 partition_key: Annotated[str | None, Field(title="Partition Key")] = None 

648 note: Annotated[str | None, Field(title="Note")] = None 

649 

650 

651class TIRunContext(BaseModel): 

652 """ 

653 Response schema for TaskInstance run context. 

654 """ 

655 

656 dag_run: DagRun 

657 task_reschedule_count: Annotated[int | None, Field(title="Task Reschedule Count")] = 0 

658 max_tries: Annotated[int, Field(title="Max Tries")] 

659 variables: Annotated[list[VariableResponse] | None, Field(title="Variables")] = None 

660 connections: Annotated[list[ConnectionResponse] | None, Field(title="Connections")] = None 

661 next_method: Annotated[str | None, Field(title="Next Method")] = None 

662 next_kwargs: Annotated[dict[str, Any] | str | None, Field(title="Next Kwargs")] = None 

663 xcom_keys_to_clear: Annotated[list[str] | None, Field(title="Xcom Keys To Clear")] = None 

664 should_retry: Annotated[bool | None, Field(title="Should Retry")] = False