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

from __future__ import annotations

from enum import Enum

from pydantic import BaseModel, Field, RootModel, conint, constr


class AdminStateLeaf(Enum):
    enable = 'enable'
    disable = 'disable'


class CountType(RootModel[conint(ge=0, le=100)]):
    root: conint(ge=0, le=100)


class NameType(RootModel[constr(min_length=1, max_length=50)]):
    root: constr(min_length=1, max_length=50)


class Model(BaseModel):
    admin_state: AdminStateLeaf | None = AdminStateLeaf.enable
    count: CountType | None = Field(10, validate_default=True)
    name: NameType | None = Field('default_name', validate_default=True)
