# generated by datamodel-codegen:
#   filename:  read_only_write_only_shared_base_ref.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel


class SharedBaseRequest(BaseModel):
    shared_name: str | None = None


class SharedBase(BaseModel):
    shared_id: int | None = None
    shared_name: str | None = None


class Parent1Request(BaseModel):
    shared_name: str | None = None
    parent1_field: str | None = None


class Parent1(SharedBase):
    parent1_field: str | None = None


class Parent2Request(BaseModel):
    shared_name: str | None = None
    parent2_field: str | None = None


class Parent2Response(BaseModel):
    shared_id: int | None = None
    shared_name: str | None = None


class Parent2(SharedBase):
    parent2_field: str | None = None


class ChildRequest(BaseModel):
    shared_name: str | None = None
    parent1_field: str | None = None
    parent2_field: str | None = None
    child_field: str | None = None


class ChildResponse(BaseModel):
    shared_id: int | None = None
    shared_name: str | None = None
    parent1_field: str | None = None
    child_field: str | None = None


class Child(Parent1, Parent2):
    child_field: str | None = None
