|
| 1 | +# generated by datamodel-codegen: |
| 2 | +# filename: simple-star-wars.graphql |
| 3 | +# timestamp: 2019-07-26T00:00:00+00:00 |
| 4 | + |
| 5 | +from __future__ import annotations |
| 6 | + |
| 7 | +from typing import Literal, TypeAlias |
| 8 | + |
| 9 | +from pydantic import BaseModel, Field |
| 10 | + |
| 11 | +FooBoolean: TypeAlias = bool |
| 12 | +""" |
| 13 | +The `Boolean` scalar type represents `true` or `false`. |
| 14 | +""" |
| 15 | + |
| 16 | + |
| 17 | +FooID: TypeAlias = str |
| 18 | +""" |
| 19 | +The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. |
| 20 | +""" |
| 21 | + |
| 22 | + |
| 23 | +FooInt: TypeAlias = int |
| 24 | +""" |
| 25 | +The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. |
| 26 | +""" |
| 27 | + |
| 28 | + |
| 29 | +FooString: TypeAlias = str |
| 30 | +""" |
| 31 | +The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. |
| 32 | +""" |
| 33 | + |
| 34 | + |
| 35 | +class FooFilm(BaseModel): |
| 36 | + characters: list[FooPerson] |
| 37 | + characters_ids: list[FooID] |
| 38 | + director: FooString |
| 39 | + episode_id: FooInt |
| 40 | + id: FooID |
| 41 | + opening_crawl: FooString |
| 42 | + planets: list[FooPlanet] |
| 43 | + planets_ids: list[FooID] |
| 44 | + producer: FooString | None = None |
| 45 | + release_date: FooString |
| 46 | + species: list[FooSpecies] |
| 47 | + species_ids: list[FooID] |
| 48 | + starships: list[FooStarship] |
| 49 | + starships_ids: list[FooID] |
| 50 | + title: FooString |
| 51 | + vehicles: list[FooVehicle] |
| 52 | + vehicles_ids: list[FooID] |
| 53 | + typename__: Literal['Film'] | None = Field('Film', alias='__typename') |
| 54 | + |
| 55 | + |
| 56 | +class FooPerson(BaseModel): |
| 57 | + birth_year: FooString | None = None |
| 58 | + eye_color: FooString | None = None |
| 59 | + films: list[FooFilm] |
| 60 | + films_ids: list[FooID] |
| 61 | + gender: FooString | None = None |
| 62 | + hair_color: FooString | None = None |
| 63 | + height: FooInt | None = None |
| 64 | + homeworld: FooPlanet | None = None |
| 65 | + homeworld_id: FooID | None = None |
| 66 | + id: FooID |
| 67 | + mass: FooInt | None = None |
| 68 | + name: FooString |
| 69 | + skin_color: FooString | None = None |
| 70 | + species: list[FooSpecies] |
| 71 | + species_ids: list[FooID] |
| 72 | + starships: list[FooStarship] |
| 73 | + starships_ids: list[FooID] |
| 74 | + vehicles: list[FooVehicle] |
| 75 | + vehicles_ids: list[FooID] |
| 76 | + typename__: Literal['Person'] | None = Field('Person', alias='__typename') |
| 77 | + |
| 78 | + |
| 79 | +class FooPlanet(BaseModel): |
| 80 | + climate: FooString | None = None |
| 81 | + diameter: FooString | None = None |
| 82 | + films: list[FooFilm] |
| 83 | + films_ids: list[FooID] |
| 84 | + gravity: FooString | None = None |
| 85 | + id: FooID |
| 86 | + name: FooString |
| 87 | + orbital_period: FooString | None = None |
| 88 | + population: FooString | None = None |
| 89 | + residents: list[FooPerson] |
| 90 | + residents_ids: list[FooID] |
| 91 | + rotation_period: FooString | None = None |
| 92 | + surface_water: FooString | None = None |
| 93 | + terrain: FooString | None = None |
| 94 | + typename__: Literal['Planet'] | None = Field('Planet', alias='__typename') |
| 95 | + |
| 96 | + |
| 97 | +class FooSpecies(BaseModel): |
| 98 | + average_height: FooString | None = None |
| 99 | + average_lifespan: FooString | None = None |
| 100 | + classification: FooString | None = None |
| 101 | + designation: FooString | None = None |
| 102 | + eye_colors: FooString | None = None |
| 103 | + films: list[FooFilm] |
| 104 | + films_ids: list[FooID] |
| 105 | + hair_colors: FooString | None = None |
| 106 | + id: FooID |
| 107 | + language: FooString | None = None |
| 108 | + name: FooString |
| 109 | + people: list[FooPerson] |
| 110 | + people_ids: list[FooID] |
| 111 | + skin_colors: FooString | None = None |
| 112 | + typename__: Literal['Species'] | None = Field('Species', alias='__typename') |
| 113 | + |
| 114 | + |
| 115 | +class FooStarship(BaseModel): |
| 116 | + MGLT: FooString | None = None |
| 117 | + cargo_capacity: FooString | None = None |
| 118 | + consumables: FooString | None = None |
| 119 | + cost_in_credits: FooString | None = None |
| 120 | + crew: FooString | None = None |
| 121 | + films: list[FooFilm] |
| 122 | + films_ids: list[FooID] |
| 123 | + hyperdrive_rating: FooString | None = None |
| 124 | + id: FooID |
| 125 | + length: FooString | None = None |
| 126 | + manufacturer: FooString | None = None |
| 127 | + max_atmosphering_speed: FooString | None = None |
| 128 | + model: FooString | None = None |
| 129 | + name: FooString |
| 130 | + passengers: FooString | None = None |
| 131 | + pilots: list[FooPerson] |
| 132 | + pilots_ids: list[FooID] |
| 133 | + starship_class: FooString | None = None |
| 134 | + typename__: Literal['Starship'] | None = Field('Starship', alias='__typename') |
| 135 | + |
| 136 | + |
| 137 | +class FooVehicle(BaseModel): |
| 138 | + cargo_capacity: FooString | None = None |
| 139 | + consumables: FooString | None = None |
| 140 | + cost_in_credits: FooString | None = None |
| 141 | + crew: FooString | None = None |
| 142 | + films: list[FooFilm] |
| 143 | + films_ids: list[FooID] |
| 144 | + id: FooID |
| 145 | + length: FooString | None = None |
| 146 | + manufacturer: FooString | None = None |
| 147 | + max_atmosphering_speed: FooString | None = None |
| 148 | + model: FooString | None = None |
| 149 | + name: FooString |
| 150 | + passengers: FooString | None = None |
| 151 | + pilots: list[FooPerson] |
| 152 | + pilots_ids: list[FooID] |
| 153 | + vehicle_class: FooString | None = None |
| 154 | + typename__: Literal['Vehicle'] | None = Field('Vehicle', alias='__typename') |
| 155 | + |
| 156 | + |
| 157 | +FooFilm.update_forward_refs() |
| 158 | +FooPerson.update_forward_refs() |
0 commit comments