|
11 | 11 | from ..types import UNSET, Unset
|
12 | 12 |
|
13 | 13 | if TYPE_CHECKING:
|
| 14 | + from ..models.avro_file_format_spec import AvroFileFormatSpec |
14 | 15 | from ..models.csv_file_format_spec import CsvFileFormatSpec
|
15 | 16 | from ..models.delta_lake_file_format_spec import DeltaLakeFileFormatSpec
|
16 | 17 | from ..models.duckdb_parameters_spec_directories import (
|
@@ -40,6 +41,7 @@ class DuckdbParametersSpec:
|
40 | 41 | csv (Union[Unset, CsvFileFormatSpec]):
|
41 | 42 | json (Union[Unset, JsonFileFormatSpec]):
|
42 | 43 | parquet (Union[Unset, ParquetFileFormatSpec]):
|
| 44 | + avro (Union[Unset, AvroFileFormatSpec]): |
43 | 45 | iceberg (Union[Unset, IcebergFileFormatSpec]):
|
44 | 46 | delta_lake (Union[Unset, DeltaLakeFileFormatSpec]):
|
45 | 47 | directories (Union[Unset, DuckdbParametersSpecDirectories]): Virtual schema name to directory mappings. The path
|
@@ -70,6 +72,7 @@ class DuckdbParametersSpec:
|
70 | 72 | csv: Union[Unset, "CsvFileFormatSpec"] = UNSET
|
71 | 73 | json: Union[Unset, "JsonFileFormatSpec"] = UNSET
|
72 | 74 | parquet: Union[Unset, "ParquetFileFormatSpec"] = UNSET
|
| 75 | + avro: Union[Unset, "AvroFileFormatSpec"] = UNSET |
73 | 76 | iceberg: Union[Unset, "IcebergFileFormatSpec"] = UNSET
|
74 | 77 | delta_lake: Union[Unset, "DeltaLakeFileFormatSpec"] = UNSET
|
75 | 78 | directories: Union[Unset, "DuckdbParametersSpecDirectories"] = UNSET
|
@@ -111,6 +114,10 @@ def to_dict(self) -> Dict[str, Any]:
|
111 | 114 | if not isinstance(self.parquet, Unset):
|
112 | 115 | parquet = self.parquet.to_dict()
|
113 | 116 |
|
| 117 | + avro: Union[Unset, Dict[str, Any]] = UNSET |
| 118 | + if not isinstance(self.avro, Unset): |
| 119 | + avro = self.avro.to_dict() |
| 120 | + |
114 | 121 | iceberg: Union[Unset, Dict[str, Any]] = UNSET
|
115 | 122 | if not isinstance(self.iceberg, Unset):
|
116 | 123 | iceberg = self.iceberg.to_dict()
|
@@ -160,6 +167,8 @@ def to_dict(self) -> Dict[str, Any]:
|
160 | 167 | field_dict["json"] = json
|
161 | 168 | if parquet is not UNSET:
|
162 | 169 | field_dict["parquet"] = parquet
|
| 170 | + if avro is not UNSET: |
| 171 | + field_dict["avro"] = avro |
163 | 172 | if iceberg is not UNSET:
|
164 | 173 | field_dict["iceberg"] = iceberg
|
165 | 174 | if delta_lake is not UNSET:
|
@@ -191,6 +200,7 @@ def to_dict(self) -> Dict[str, Any]:
|
191 | 200 |
|
192 | 201 | @classmethod
|
193 | 202 | def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
| 203 | + from ..models.avro_file_format_spec import AvroFileFormatSpec |
194 | 204 | from ..models.csv_file_format_spec import CsvFileFormatSpec
|
195 | 205 | from ..models.delta_lake_file_format_spec import DeltaLakeFileFormatSpec
|
196 | 206 | from ..models.duckdb_parameters_spec_directories import (
|
@@ -248,6 +258,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
248 | 258 | else:
|
249 | 259 | parquet = ParquetFileFormatSpec.from_dict(_parquet)
|
250 | 260 |
|
| 261 | + _avro = d.pop("avro", UNSET) |
| 262 | + avro: Union[Unset, AvroFileFormatSpec] |
| 263 | + if isinstance(_avro, Unset): |
| 264 | + avro = UNSET |
| 265 | + else: |
| 266 | + avro = AvroFileFormatSpec.from_dict(_avro) |
| 267 | + |
251 | 268 | _iceberg = d.pop("iceberg", UNSET)
|
252 | 269 | iceberg: Union[Unset, IcebergFileFormatSpec]
|
253 | 270 | if isinstance(_iceberg, Unset):
|
@@ -314,6 +331,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
314 | 331 | csv=csv,
|
315 | 332 | json=json,
|
316 | 333 | parquet=parquet,
|
| 334 | + avro=avro, |
317 | 335 | iceberg=iceberg,
|
318 | 336 | delta_lake=delta_lake,
|
319 | 337 | directories=directories,
|
|
0 commit comments