# generated by datamodel-codegen:
#   filename:  simple-star-wars.graphql
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel, Field
from typing_extensions import TypeAliasType

Boolean = TypeAliasType("Boolean", bool)
"""
The `Boolean` scalar type represents `true` or `false`.
"""


ID = TypeAliasType("ID", str)
"""
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.
"""


Int = TypeAliasType("Int", int)
"""
The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
"""


String = TypeAliasType("String", str)
"""
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.
"""


class Film(BaseModel):
    characters: list[Person]
    characters_ids: list[ID]
    director: String
    episode_id: Int
    id: ID
    opening_crawl: String
    planets: list[Planet]
    planets_ids: list[ID]
    producer: String | None = None
    release_date: String
    species: list[Species]
    species_ids: list[ID]
    starships: list[Starship]
    starships_ids: list[ID]
    title: String
    vehicles: list[Vehicle]
    vehicles_ids: list[ID]
    typename__: Literal['Film'] | None = Field('Film', alias='__typename')


class Person(BaseModel):
    birth_year: String | None = None
    eye_color: String | None = None
    films: list[Film]
    films_ids: list[ID]
    gender: String | None = None
    hair_color: String | None = None
    height: Int | None = None
    homeworld: Planet | None = None
    homeworld_id: ID | None = None
    id: ID
    mass: Int | None = None
    name: String
    skin_color: String | None = None
    species: list[Species]
    species_ids: list[ID]
    starships: list[Starship]
    starships_ids: list[ID]
    vehicles: list[Vehicle]
    vehicles_ids: list[ID]
    typename__: Literal['Person'] | None = Field('Person', alias='__typename')


class Planet(BaseModel):
    climate: String | None = None
    diameter: String | None = None
    films: list[Film]
    films_ids: list[ID]
    gravity: String | None = None
    id: ID
    name: String
    orbital_period: String | None = None
    population: String | None = None
    residents: list[Person]
    residents_ids: list[ID]
    rotation_period: String | None = None
    surface_water: String | None = None
    terrain: String | None = None
    typename__: Literal['Planet'] | None = Field('Planet', alias='__typename')


class Species(BaseModel):
    average_height: String | None = None
    average_lifespan: String | None = None
    classification: String | None = None
    designation: String | None = None
    eye_colors: String | None = None
    films: list[Film]
    films_ids: list[ID]
    hair_colors: String | None = None
    id: ID
    language: String | None = None
    name: String
    people: list[Person]
    people_ids: list[ID]
    skin_colors: String | None = None
    typename__: Literal['Species'] | None = Field('Species', alias='__typename')


class Starship(BaseModel):
    MGLT: String | None = None
    cargo_capacity: String | None = None
    consumables: String | None = None
    cost_in_credits: String | None = None
    crew: String | None = None
    films: list[Film]
    films_ids: list[ID]
    hyperdrive_rating: String | None = None
    id: ID
    length: String | None = None
    manufacturer: String | None = None
    max_atmosphering_speed: String | None = None
    model: String | None = None
    name: String
    passengers: String | None = None
    pilots: list[Person]
    pilots_ids: list[ID]
    starship_class: String | None = None
    typename__: Literal['Starship'] | None = Field('Starship', alias='__typename')


class Vehicle(BaseModel):
    cargo_capacity: String | None = None
    consumables: String | None = None
    cost_in_credits: String | None = None
    crew: String | None = None
    films: list[Film]
    films_ids: list[ID]
    id: ID
    length: String | None = None
    manufacturer: String | None = None
    max_atmosphering_speed: String | None = None
    model: String | None = None
    name: String
    passengers: String | None = None
    pilots: list[Person]
    pilots_ids: list[ID]
    vehicle_class: String | None = None
    typename__: Literal['Vehicle'] | None = Field('Vehicle', alias='__typename')


Film.model_rebuild()
Person.model_rebuild()
