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

from __future__ import annotations

from enum import Enum
from typing import Dict, Optional, Union

from pydantic import BaseModel, Field


class CustomNestedObjectResult(BaseModel):
    status: int


class CustomNestedEnumResult(Enum):
    red = 'red'
    green = 'green'


class CustomOneOfResult(BaseModel):
    description: Optional[str] = None


class CustomAnyOfResult(BaseModel):
    description: Optional[str] = None


class CustomUser(BaseModel):
    name: Optional[str] = None


class CustomAllOfResult(CustomUser):
    description: Optional[str] = None


class CustomModel(BaseModel):
    test_id: str = Field(..., description='test ID')
    test_ip: str = Field(..., description='test IP')
    result: Dict[str, int]
    nested_object_result: Dict[str, CustomNestedObjectResult]
    nested_enum_result: Dict[str, CustomNestedEnumResult]
    all_of_result: Optional[Dict[str, CustomAllOfResult]] = None
    one_of_result: Optional[Dict[str, Union[CustomUser, CustomOneOfResult]]] = None
    any_of_result: Optional[Dict[str, Union[CustomUser, CustomAnyOfResult]]] = None
    all_of_with_unknown_object: Optional[Dict[str, CustomUser]] = None
    objectRef: Optional[Dict[str, CustomUser]] = None
    deepNestedObjectRef: Optional[Dict[str, Dict[str, Dict[str, CustomUser]]]] = None
