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

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, constr


class Foo(BaseModel):
    a: str
    b: str


class Bar(Foo):
    type: constr(regex=r'service')
    name: Optional[str] = None
