|
| 1 | +# generated by datamodel-codegen: |
| 2 | +# filename: <stdin> |
| 3 | + |
| 4 | +from __future__ import annotations |
| 5 | + |
| 6 | +from typing import TYPE_CHECKING, Any, TypedDict |
| 7 | + |
| 8 | +from typing_extensions import NotRequired |
| 9 | + |
| 10 | +if TYPE_CHECKING: |
| 11 | + from collections import defaultdict |
| 12 | + from collections.abc import Callable, Iterable, Mapping, Sequence |
| 13 | + from pathlib import Path |
| 14 | + |
| 15 | + from datamodel_code_generator.enums import ( |
| 16 | + AllOfClassHierarchy, |
| 17 | + AllOfMergeMode, |
| 18 | + CollapseRootModelsNameStrategy, |
| 19 | + DataclassArguments, |
| 20 | + FieldTypeCollisionStrategy, |
| 21 | + NamingStrategy, |
| 22 | + ReadOnlyWriteOnlyModelType, |
| 23 | + ReuseScope, |
| 24 | + StrictTypes, |
| 25 | + TargetPydanticVersion, |
| 26 | + ) |
| 27 | + from datamodel_code_generator.format import DateClassType, DatetimeClassType, Formatter, PythonVersion |
| 28 | + from datamodel_code_generator.model.base import DataModel, DataModelFieldBase |
| 29 | + from datamodel_code_generator.parser import DefaultPutDict, LiteralType |
| 30 | + from datamodel_code_generator.types import DataTypeManager |
| 31 | + |
| 32 | + |
| 33 | +class GraphQLParserConfigDict(TypedDict): |
| 34 | + data_model_type: NotRequired[type[DataModel]] |
| 35 | + data_model_root_type: NotRequired[type[DataModel]] |
| 36 | + data_type_manager_type: NotRequired[type[DataTypeManager]] |
| 37 | + data_model_field_type: NotRequired[type[DataModelFieldBase]] |
| 38 | + base_class: NotRequired[str | None] |
| 39 | + base_class_map: NotRequired[dict[str, str] | None] |
| 40 | + additional_imports: NotRequired[list[str] | None] |
| 41 | + class_decorators: NotRequired[list[str] | None] |
| 42 | + custom_template_dir: NotRequired[Path | None] |
| 43 | + extra_template_data: NotRequired[defaultdict[str, dict[str, Any]] | None] |
| 44 | + target_python_version: NotRequired[PythonVersion] |
| 45 | + dump_resolve_reference_action: NotRequired[Callable[[Iterable[str]], str] | None] |
| 46 | + validation: NotRequired[bool] |
| 47 | + field_constraints: NotRequired[bool] |
| 48 | + snake_case_field: NotRequired[bool] |
| 49 | + strip_default_none: NotRequired[bool] |
| 50 | + aliases: NotRequired[Mapping[str, str | list[str]] | None] |
| 51 | + allow_population_by_field_name: NotRequired[bool] |
| 52 | + apply_default_values_for_required_fields: NotRequired[bool] |
| 53 | + allow_extra_fields: NotRequired[bool] |
| 54 | + extra_fields: NotRequired[str | None] |
| 55 | + use_generic_base_class: NotRequired[bool] |
| 56 | + force_optional_for_required_fields: NotRequired[bool] |
| 57 | + class_name: NotRequired[str | None] |
| 58 | + use_standard_collections: NotRequired[bool] |
| 59 | + base_path: NotRequired[Path | None] |
| 60 | + use_schema_description: NotRequired[bool] |
| 61 | + use_field_description: NotRequired[bool] |
| 62 | + use_field_description_example: NotRequired[bool] |
| 63 | + use_attribute_docstrings: NotRequired[bool] |
| 64 | + use_inline_field_description: NotRequired[bool] |
| 65 | + use_default_kwarg: NotRequired[bool] |
| 66 | + reuse_model: NotRequired[bool] |
| 67 | + reuse_scope: NotRequired[ReuseScope | None] |
| 68 | + shared_module_name: NotRequired[str] |
| 69 | + encoding: NotRequired[str] |
| 70 | + enum_field_as_literal: NotRequired[LiteralType | None] |
| 71 | + enum_field_as_literal_map: NotRequired[dict[str, str] | None] |
| 72 | + ignore_enum_constraints: NotRequired[bool] |
| 73 | + set_default_enum_member: NotRequired[bool] |
| 74 | + use_subclass_enum: NotRequired[bool] |
| 75 | + use_specialized_enum: NotRequired[bool] |
| 76 | + strict_nullable: NotRequired[bool] |
| 77 | + use_generic_container_types: NotRequired[bool] |
| 78 | + enable_faux_immutability: NotRequired[bool] |
| 79 | + remote_text_cache: NotRequired[DefaultPutDict[str, str] | None] |
| 80 | + disable_appending_item_suffix: NotRequired[bool] |
| 81 | + strict_types: NotRequired[Sequence[StrictTypes] | None] |
| 82 | + empty_enum_field_name: NotRequired[str | None] |
| 83 | + custom_class_name_generator: NotRequired[Callable[[str], str] | None] |
| 84 | + field_extra_keys: NotRequired[set[str] | None] |
| 85 | + field_include_all_keys: NotRequired[bool] |
| 86 | + field_extra_keys_without_x_prefix: NotRequired[set[str] | None] |
| 87 | + model_extra_keys: NotRequired[set[str] | None] |
| 88 | + model_extra_keys_without_x_prefix: NotRequired[set[str] | None] |
| 89 | + wrap_string_literal: NotRequired[bool | None] |
| 90 | + use_title_as_name: NotRequired[bool] |
| 91 | + use_operation_id_as_name: NotRequired[bool] |
| 92 | + use_unique_items_as_set: NotRequired[bool] |
| 93 | + use_tuple_for_fixed_items: NotRequired[bool] |
| 94 | + allof_merge_mode: NotRequired[AllOfMergeMode] |
| 95 | + allof_class_hierarchy: NotRequired[AllOfClassHierarchy] |
| 96 | + http_headers: NotRequired[Sequence[tuple[str, str]] | None] |
| 97 | + http_ignore_tls: NotRequired[bool] |
| 98 | + http_timeout: NotRequired[float | None] |
| 99 | + use_annotated: NotRequired[bool] |
| 100 | + use_serialize_as_any: NotRequired[bool] |
| 101 | + use_non_positive_negative_number_constrained_types: NotRequired[bool] |
| 102 | + use_decimal_for_multiple_of: NotRequired[bool] |
| 103 | + original_field_name_delimiter: NotRequired[str | None] |
| 104 | + use_double_quotes: NotRequired[bool] |
| 105 | + use_union_operator: NotRequired[bool] |
| 106 | + allow_responses_without_content: NotRequired[bool] |
| 107 | + collapse_root_models: NotRequired[bool] |
| 108 | + collapse_root_models_name_strategy: NotRequired[CollapseRootModelsNameStrategy | None] |
| 109 | + collapse_reuse_models: NotRequired[bool] |
| 110 | + skip_root_model: NotRequired[bool] |
| 111 | + use_type_alias: NotRequired[bool] |
| 112 | + special_field_name_prefix: NotRequired[str | None] |
| 113 | + remove_special_field_name_prefix: NotRequired[bool] |
| 114 | + capitalise_enum_members: NotRequired[bool] |
| 115 | + keep_model_order: NotRequired[bool] |
| 116 | + use_one_literal_as_default: NotRequired[bool] |
| 117 | + use_enum_values_in_discriminator: NotRequired[bool] |
| 118 | + known_third_party: NotRequired[list[str] | None] |
| 119 | + custom_formatters: NotRequired[list[str] | None] |
| 120 | + custom_formatters_kwargs: NotRequired[dict[str, Any] | None] |
| 121 | + use_pendulum: NotRequired[bool] |
| 122 | + use_standard_primitive_types: NotRequired[bool] |
| 123 | + http_query_parameters: NotRequired[Sequence[tuple[str, str]] | None] |
| 124 | + treat_dot_as_module: NotRequired[bool | None] |
| 125 | + use_exact_imports: NotRequired[bool] |
| 126 | + default_field_extras: NotRequired[dict[str, Any] | None] |
| 127 | + target_datetime_class: NotRequired[DatetimeClassType | None] |
| 128 | + target_date_class: NotRequired[DateClassType | None] |
| 129 | + keyword_only: NotRequired[bool] |
| 130 | + frozen_dataclasses: NotRequired[bool] |
| 131 | + no_alias: NotRequired[bool] |
| 132 | + use_frozen_field: NotRequired[bool] |
| 133 | + use_default_factory_for_optional_nested_models: NotRequired[bool] |
| 134 | + formatters: NotRequired[list[Formatter]] |
| 135 | + defer_formatting: NotRequired[bool] |
| 136 | + parent_scoped_naming: NotRequired[bool] |
| 137 | + naming_strategy: NotRequired[NamingStrategy | None] |
| 138 | + duplicate_name_suffix: NotRequired[dict[str, str] | None] |
| 139 | + dataclass_arguments: NotRequired[DataclassArguments | None] |
| 140 | + type_mappings: NotRequired[list[str] | None] |
| 141 | + type_overrides: NotRequired[dict[str, str] | None] |
| 142 | + read_only_write_only_model_type: NotRequired[ReadOnlyWriteOnlyModelType | None] |
| 143 | + field_type_collision_strategy: NotRequired[FieldTypeCollisionStrategy | None] |
| 144 | + target_pydantic_version: NotRequired[TargetPydanticVersion | None] |
| 145 | + data_model_scalar_type: NotRequired[type[DataModel]] |
| 146 | + data_model_union_type: NotRequired[type[DataModel]] |
0 commit comments