# generated by datamodel-codegen:
#   filename:  protobuf
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel, ConfigDict, Field, conint

from . import (
    example_spec_proto2_proto2_state,
    example_spec_proto2_spec_proto2_legacy_group,
    example_spec_proto2_spec_proto2_proto2_child,
)


class ExampleSpecProto2SpecProto2(BaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    id: str
    decimal_default: int | None = -42
    hex_default: int | None = 42
    octal_default: conint(ge=0, le=4294967295) | None = 42
    pos_inf: float | None = float('inf')
    neg_inf: float | None = float('-inf')
    not_a_number: float | None = float('nan')
    enabled: bool | None = False
    single_quoted: str | None = 'single'
    escaped_bytes: bytes | None = b'\x01\x02'
    state: example_spec_proto2_proto2_state.ExampleSpecProto2Proto2State | None = (
        'PROTO2_ACTIVE'
    )
    tags: list[str] | None = []
    packed_numbers: list[int] | None = []
    children: (
        dict[
            str,
            example_spec_proto2_spec_proto2_proto2_child.ExampleSpecProto2SpecProto2Proto2Child,
        ]
        | None
    ) = Field({}, validate_default=True)
    text: str | None = Field(None, description='oneof: payload')
    child: (
        example_spec_proto2_spec_proto2_proto2_child.ExampleSpecProto2SpecProto2Proto2Child
        | None
    ) = Field(None, description='oneof: payload')
    legacygroup: (
        example_spec_proto2_spec_proto2_legacy_group.ExampleSpecProto2SpecProto2LegacyGroup
        | None
    ) = None
