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

from __future__ import annotations

from enum import Enum
from typing import List, Optional

from pydantic import BaseModel, Field


class Animal(Enum):
    dog = 'dog'
    cat = 'cat'
    snake = 'snake'


class RedistributeEnum(Enum):
    static = 'static'
    connected = 'connected'


class User(BaseModel):
    name: Optional[str] = None
    animal: Optional[Animal] = 'dog'
    pet: Optional[Animal] = 'cat'
    redistribute: Optional[List[RedistributeEnum]] = None


class Redistribute(BaseModel):
    __root__: List[RedistributeEnum] = Field(
        ..., description='Redistribute type for routes.'
    )
