from typing import (
    TYPE_CHECKING,
    Any,
    BinaryIO,
    Dict,
    Optional,
    TextIO,
    Tuple,
    Type,
    TypeVar,
)

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import (
    UNSET,
    Unset,
)

T = TypeVar("T", bound="ClusterSettings")


@_attrs_define
class ClusterSettings:
    """ 
        Attributes:
            offload_enabled (bool):
            offload_timeout_min (int):
     """

    offload_enabled: bool
    offload_timeout_min: int


    def to_dict(self) -> Dict[str, Any]:
        offload_enabled = self.offload_enabled

        offload_timeout_min = self.offload_timeout_min


        field_dict: Dict[str, Any] = {}
        field_dict.update({
            "offloadEnabled": offload_enabled,
            "offloadTimeoutMin": offload_timeout_min,
        })

        return field_dict



    @classmethod
    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
        d = src_dict.copy()
        offload_enabled = d.pop("offloadEnabled")

        offload_timeout_min = d.pop("offloadTimeoutMin")

        cluster_settings = cls(
            offload_enabled=offload_enabled,
            offload_timeout_min=offload_timeout_min,
        )

        return cluster_settings

