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

329 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-06-30" 

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 AssetStatePutBody(BaseModel): 

67 """ 

68 Request body for setting an asset state value. 

69 """ 

70 

71 model_config = ConfigDict( 

72 extra="forbid", 

73 ) 

74 value: Annotated[str, Field(title="Value")] 

75 

76 

77class AssetStateResponse(BaseModel): 

78 """ 

79 Asset state value returned to a worker. 

80 """ 

81 

82 model_config = ConfigDict( 

83 extra="forbid", 

84 ) 

85 value: Annotated[str, Field(title="Value")] 

86 

87 

88class ConnectionResponse(BaseModel): 

89 """ 

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

91 """ 

92 

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

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

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

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

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

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

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

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

101 

102 

103class DagResponse(BaseModel): 

104 """ 

105 Schema for DAG response. 

106 """ 

107 

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

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

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

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

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

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

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

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

116 

117 

118class DagRunAssetReference(BaseModel): 

119 """ 

120 DagRun serializer for asset responses. 

121 """ 

122 

123 model_config = ConfigDict( 

124 extra="forbid", 

125 ) 

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

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

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

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

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

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

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

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

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

135 

136 

137class DagRunState(str, Enum): 

138 """ 

139 All possible states that a DagRun can be in. 

140 

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

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

143 same name in TaskInstanceState. 

144 """ 

145 

146 QUEUED = "queued" 

147 RUNNING = "running" 

148 SUCCESS = "success" 

149 FAILED = "failed" 

150 

151 

152class DagRunStateResponse(BaseModel): 

153 """ 

154 Schema for DAG Run State response. 

155 """ 

156 

157 state: DagRunState 

158 

159 

160class DagRunType(str, Enum): 

161 """ 

162 Class with DagRun types. 

163 """ 

164 

165 BACKFILL = "backfill" 

166 SCHEDULED = "scheduled" 

167 MANUAL = "manual" 

168 OPERATOR_TRIGGERED = "operator_triggered" 

169 ASSET_TRIGGERED = "asset_triggered" 

170 ASSET_MATERIALIZATION = "asset_materialization" 

171 

172 

173class HITLUser(BaseModel): 

174 """ 

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

176 """ 

177 

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

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

180 

181 

182class InactiveAssetsResponse(BaseModel): 

183 """ 

184 Response for inactive assets. 

185 """ 

186 

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

188 

189 

190class IntermediateTIState(str, Enum): 

191 """ 

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

193 """ 

194 

195 SCHEDULED = "scheduled" 

196 QUEUED = "queued" 

197 RESTARTING = "restarting" 

198 UP_FOR_RETRY = "up_for_retry" 

199 UP_FOR_RESCHEDULE = "up_for_reschedule" 

200 DEFERRED = "deferred" 

201 

202 

203class PrevSuccessfulDagRunResponse(BaseModel): 

204 """ 

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

206 """ 

207 

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

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

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

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

212 

213 

214class PreviousTIResponse(BaseModel): 

215 """ 

216 Schema for response with previous TaskInstance information. 

217 """ 

218 

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

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

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

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

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

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

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

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

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

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

229 

230 

231class TIDeferredStatePayload(BaseModel): 

232 """ 

233 Schema for updating TaskInstance to a deferred state. 

234 """ 

235 

236 model_config = ConfigDict( 

237 extra="forbid", 

238 ) 

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

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

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

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

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

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

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

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

247 

248 

249class TIEnterRunningPayload(BaseModel): 

250 """ 

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

252 """ 

253 

254 model_config = ConfigDict( 

255 extra="forbid", 

256 ) 

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

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

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

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

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

262 

263 

264class TIHeartbeatInfo(BaseModel): 

265 """ 

266 Schema for TaskInstance heartbeat endpoint. 

267 """ 

268 

269 model_config = ConfigDict( 

270 extra="forbid", 

271 ) 

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

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

274 

275 

276class TIRescheduleStatePayload(BaseModel): 

277 """ 

278 Schema for updating TaskInstance to a up_for_reschedule state. 

279 """ 

280 

281 model_config = ConfigDict( 

282 extra="forbid", 

283 ) 

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

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

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

287 

288 

289class TIRetryStatePayload(BaseModel): 

290 """ 

291 Schema for updating TaskInstance to up_for_retry. 

292 """ 

293 

294 model_config = ConfigDict( 

295 extra="forbid", 

296 ) 

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

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

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

300 retry_delay_seconds: Annotated[float | None, Field(title="Retry Delay Seconds")] = None 

301 retry_reason: Annotated[str | None, Field(title="Retry Reason")] = None 

302 

303 

304class TISkippedDownstreamTasksStatePayload(BaseModel): 

305 """ 

306 Schema for updating downstream tasks to a skipped state. 

307 """ 

308 

309 model_config = ConfigDict( 

310 extra="forbid", 

311 ) 

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

313 

314 

315class TISuccessStatePayload(BaseModel): 

316 """ 

317 Schema for updating TaskInstance to success state. 

318 """ 

319 

320 model_config = ConfigDict( 

321 extra="forbid", 

322 ) 

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

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

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

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

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

328 

329 

330class TITargetStatePayload(BaseModel): 

331 """ 

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

333 """ 

334 

335 model_config = ConfigDict( 

336 extra="forbid", 

337 ) 

338 state: IntermediateTIState 

339 

340 

341class TaskBreadcrumbsResponse(BaseModel): 

342 """ 

343 Response for task breadcrumbs. 

344 """ 

345 

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

347 

348 

349class TaskInstanceState(str, Enum): 

350 """ 

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

352 

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

354 """ 

355 

356 REMOVED = "removed" 

357 SCHEDULED = "scheduled" 

358 QUEUED = "queued" 

359 RUNNING = "running" 

360 SUCCESS = "success" 

361 RESTARTING = "restarting" 

362 FAILED = "failed" 

363 UP_FOR_RETRY = "up_for_retry" 

364 UP_FOR_RESCHEDULE = "up_for_reschedule" 

365 UPSTREAM_FAILED = "upstream_failed" 

366 SKIPPED = "skipped" 

367 DEFERRED = "deferred" 

368 

369 

370class TaskStatePutBody(BaseModel): 

371 """ 

372 Request body for setting a task state value. 

373 """ 

374 

375 model_config = ConfigDict( 

376 extra="forbid", 

377 ) 

378 value: Annotated[str, Field(title="Value")] 

379 

380 

381class TaskStateResponse(BaseModel): 

382 """ 

383 Task state value returned to a worker. 

384 """ 

385 

386 model_config = ConfigDict( 

387 extra="forbid", 

388 ) 

389 value: Annotated[str, Field(title="Value")] 

390 

391 

392class TaskStatesResponse(BaseModel): 

393 """ 

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

395 """ 

396 

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

398 

399 

400class TerminalStateNonSuccess(str, Enum): 

401 """ 

402 TaskInstance states that can be reported without extra information. 

403 """ 

404 

405 FAILED = "failed" 

406 SKIPPED = "skipped" 

407 REMOVED = "removed" 

408 UPSTREAM_FAILED = "upstream_failed" 

409 

410 

411class TriggerDAGRunPayload(BaseModel): 

412 """ 

413 Schema for Trigger DAG Run API request. 

414 """ 

415 

416 model_config = ConfigDict( 

417 extra="forbid", 

418 ) 

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

420 run_after: Annotated[AwareDatetime | None, Field(title="Run After")] = None 

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

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

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

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

425 

426 

427class UpdateHITLDetailPayload(BaseModel): 

428 """ 

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

430 """ 

431 

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

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

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

435 

436 

437class ValidationError(BaseModel): 

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

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

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

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

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

443 

444 

445class VariableKeysResponse(BaseModel): 

446 """ 

447 Variable keys schema for list responses. 

448 """ 

449 

450 model_config = ConfigDict( 

451 extra="forbid", 

452 ) 

453 keys: Annotated[list[str], Field(title="Keys")] 

454 total_entries: Annotated[int, Field(title="Total Entries")] 

455 

456 

457class VariablePostBody(BaseModel): 

458 """ 

459 Request body schema for creating variables. 

460 """ 

461 

462 model_config = ConfigDict( 

463 extra="forbid", 

464 ) 

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

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

467 

468 

469class VariableResponse(BaseModel): 

470 """ 

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

472 """ 

473 

474 model_config = ConfigDict( 

475 extra="forbid", 

476 ) 

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

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

479 

480 

481class XComResponse(BaseModel): 

482 """ 

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

484 """ 

485 

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

487 value: JsonValue 

488 

489 

490class XComSequenceIndexResponse(RootModel[JsonValue]): 

491 root: Annotated[ 

492 JsonValue, 

493 Field( 

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

495 title="XComSequenceIndexResponse", 

496 ), 

497 ] 

498 

499 

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

501 """ 

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

503 """ 

504 

505 root: Annotated[ 

506 list[JsonValue], 

507 Field( 

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

509 title="XComSequenceSliceResponse", 

510 ), 

511 ] 

512 

513 

514class TaskInstance(BaseModel): 

515 """ 

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

517 """ 

518 

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

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

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

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

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

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

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

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

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

528 

529 

530class BundleInfo(BaseModel): 

531 """ 

532 Schema for telling task which bundle to run with. 

533 """ 

534 

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

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

537 

538 

539class TerminalTIState(str, Enum): 

540 SUCCESS = "success" 

541 FAILED = "failed" 

542 SKIPPED = "skipped" 

543 UPSTREAM_FAILED = "upstream_failed" 

544 REMOVED = "removed" 

545 

546 

547class WeightRule(str, Enum): 

548 DOWNSTREAM = "downstream" 

549 UPSTREAM = "upstream" 

550 ABSOLUTE = "absolute" 

551 

552 

553class TriggerRule(str, Enum): 

554 ALL_SUCCESS = "all_success" 

555 ALL_FAILED = "all_failed" 

556 ALL_DONE = "all_done" 

557 ALL_DONE_MIN_ONE_SUCCESS = "all_done_min_one_success" 

558 ALL_DONE_SETUP_SUCCESS = "all_done_setup_success" 

559 ONE_SUCCESS = "one_success" 

560 ONE_FAILED = "one_failed" 

561 ONE_DONE = "one_done" 

562 NONE_FAILED = "none_failed" 

563 NONE_SKIPPED = "none_skipped" 

564 ALWAYS = "always" 

565 NONE_FAILED_MIN_ONE_SUCCESS = "none_failed_min_one_success" 

566 ALL_SKIPPED = "all_skipped" 

567 

568 

569class DagAttributeTypes(str, Enum): 

570 OP = "operator" 

571 TASK_GROUP = "taskgroup" 

572 

573 

574class AssetReferenceAssetEventDagRun(BaseModel): 

575 """ 

576 Schema for AssetModel used in AssetEventDagRunReference. 

577 """ 

578 

579 model_config = ConfigDict( 

580 extra="forbid", 

581 ) 

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

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

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

585 

586 

587class AssetResponse(BaseModel): 

588 """ 

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

590 """ 

591 

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

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

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

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

596 

597 

598class HITLDetailRequest(BaseModel): 

599 """ 

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

601 """ 

602 

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

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

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

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

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

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

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

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

611 

612 

613class HITLDetailResponse(BaseModel): 

614 """ 

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

616 """ 

617 

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

619 responded_by_user: HITLUser | None = None 

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

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

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

623 

624 

625class HTTPValidationError(BaseModel): 

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

627 

628 

629class TITerminalStatePayload(BaseModel): 

630 """ 

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

632 """ 

633 

634 model_config = ConfigDict( 

635 extra="forbid", 

636 ) 

637 state: TerminalStateNonSuccess 

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

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

640 

641 

642class AssetEventDagRunReference(BaseModel): 

643 """ 

644 Schema for AssetEvent model used in DagRun. 

645 """ 

646 

647 model_config = ConfigDict( 

648 extra="forbid", 

649 ) 

650 asset: AssetReferenceAssetEventDagRun 

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

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

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

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

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

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

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

658 

659 

660class AssetEventResponse(BaseModel): 

661 """ 

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

663 """ 

664 

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

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

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

668 asset: AssetResponse 

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

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

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

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

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

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

675 

676 

677class AssetEventsResponse(BaseModel): 

678 """ 

679 Collection of AssetEventResponse. 

680 """ 

681 

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

683 

684 

685class DagRun(BaseModel): 

686 """ 

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

688 """ 

689 

690 model_config = ConfigDict( 

691 extra="forbid", 

692 ) 

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

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

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

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

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

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

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

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

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

702 run_type: DagRunType 

703 state: DagRunState 

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

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

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

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

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

709 team_name: Annotated[str | None, Field(title="Team Name")] = None 

710 

711 

712class TIRunContext(BaseModel): 

713 """ 

714 Response schema for TaskInstance run context. 

715 """ 

716 

717 dag_run: DagRun 

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

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

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

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

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

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

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

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

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