"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from ..shared import containerdinfo as shared_containerdinfo
from ..shared import containerport as shared_containerport
from ..shared import dockerinfo as shared_dockerinfo
from cribl import utils
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from typing import Optional

class ContainerType(str, Enum):
    DOCKER = 'docker'
    CONTAINERD = 'containerd'


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class Container:
    created: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created') }})
    id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
    image: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('image') }})
    name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
    status: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
    type: ContainerType = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
    containerd: Optional[shared_containerdinfo.ContainerdInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('containerd'), 'exclude': lambda f: f is None }})
    docker: Optional[shared_dockerinfo.DockerInfo] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('docker'), 'exclude': lambda f: f is None }})
    ips: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ips'), 'exclude': lambda f: f is None }})
    ports: Optional[list[shared_containerport.ContainerPort]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ports'), 'exclude': lambda f: f is None }})
    

