"""This is an automatically generated stub for `sim_setup.capnp`."""

from __future__ import annotations

from collections.abc import Iterator
from contextlib import contextmanager
from io import BufferedWriter
from typing import Any, BinaryIO

class Setup:
    @property
    def runId(self) -> int: ...
    @property
    def sowingTime(self) -> str: ...
    @property
    def harvestTime(self) -> str: ...
    @property
    def cropId(self) -> str: ...
    @property
    def simJson(self) -> str: ...
    @property
    def cropJson(self) -> str: ...
    @property
    def siteJson(self) -> str: ...
    @property
    def startDate(self) -> str: ...
    @property
    def endDate(self) -> str: ...
    @property
    def groundwaterLevel(self) -> bool: ...
    @property
    def impenetrableLayer(self) -> bool: ...
    @property
    def elevation(self) -> bool: ...
    @property
    def slope(self) -> bool: ...
    @property
    def latitude(self) -> bool: ...
    @property
    def landcover(self) -> bool: ...
    @property
    def fertilization(self) -> bool: ...
    @property
    def nitrogenResponseOn(self) -> bool: ...
    @property
    def irrigation(self) -> bool: ...
    @property
    def waterDeficitResponseOn(self) -> bool: ...
    @property
    def emergenceMoistureControlOn(self) -> bool: ...
    @property
    def emergenceFloodingControlOn(self) -> bool: ...
    @property
    def leafExtensionModifier(self) -> bool: ...
    @property
    def co2(self) -> float: ...
    @property
    def o3(self) -> float: ...
    @property
    def fieldConditionModifier(self) -> float: ...
    @property
    def stageTemperatureSum(self) -> str: ...
    @property
    def useVernalisationFix(self) -> bool: ...
    @property
    def comment(self) -> str: ...
    @staticmethod
    @contextmanager
    def from_bytes(
        data: bytes,
        traversal_limit_in_words: int | None = ...,
        nesting_limit: int | None = ...,
    ) -> Iterator[SetupReader]: ...
    @staticmethod
    def from_bytes_packed(
        data: bytes,
        traversal_limit_in_words: int | None = ...,
        nesting_limit: int | None = ...,
    ) -> SetupReader: ...
    @staticmethod
    def new_message(
        num_first_segment_words: int | None = None,
        allocate_seg_callable: Any = None,
        runId: int | None = None,
        sowingTime: str | None = None,
        harvestTime: str | None = None,
        cropId: str | None = None,
        simJson: str | None = None,
        cropJson: str | None = None,
        siteJson: str | None = None,
        startDate: str | None = None,
        endDate: str | None = None,
        groundwaterLevel: bool | None = None,
        impenetrableLayer: bool | None = None,
        elevation: bool | None = None,
        slope: bool | None = None,
        latitude: bool | None = None,
        landcover: bool | None = None,
        fertilization: bool | None = None,
        nitrogenResponseOn: bool | None = None,
        irrigation: bool | None = None,
        waterDeficitResponseOn: bool | None = None,
        emergenceMoistureControlOn: bool | None = None,
        emergenceFloodingControlOn: bool | None = None,
        leafExtensionModifier: bool | None = None,
        co2: float | None = None,
        o3: float | None = None,
        fieldConditionModifier: float | None = None,
        stageTemperatureSum: str | None = None,
        useVernalisationFix: bool | None = None,
        comment: str | None = None,
    ) -> SetupBuilder: ...
    @staticmethod
    def read(
        file: BinaryIO,
        traversal_limit_in_words: int | None = ...,
        nesting_limit: int | None = ...,
    ) -> SetupReader: ...
    @staticmethod
    def read_packed(
        file: BinaryIO,
        traversal_limit_in_words: int | None = ...,
        nesting_limit: int | None = ...,
    ) -> SetupReader: ...
    def to_dict(self) -> dict[str, Any]: ...

class SetupReader(Setup):
    def as_builder(self) -> SetupBuilder: ...

class SetupBuilder(Setup):
    @property
    def runId(self) -> int: ...
    @runId.setter
    def runId(self, value: int) -> None: ...
    @property
    def sowingTime(self) -> str: ...
    @sowingTime.setter
    def sowingTime(self, value: str) -> None: ...
    @property
    def harvestTime(self) -> str: ...
    @harvestTime.setter
    def harvestTime(self, value: str) -> None: ...
    @property
    def cropId(self) -> str: ...
    @cropId.setter
    def cropId(self, value: str) -> None: ...
    @property
    def simJson(self) -> str: ...
    @simJson.setter
    def simJson(self, value: str) -> None: ...
    @property
    def cropJson(self) -> str: ...
    @cropJson.setter
    def cropJson(self, value: str) -> None: ...
    @property
    def siteJson(self) -> str: ...
    @siteJson.setter
    def siteJson(self, value: str) -> None: ...
    @property
    def startDate(self) -> str: ...
    @startDate.setter
    def startDate(self, value: str) -> None: ...
    @property
    def endDate(self) -> str: ...
    @endDate.setter
    def endDate(self, value: str) -> None: ...
    @property
    def groundwaterLevel(self) -> bool: ...
    @groundwaterLevel.setter
    def groundwaterLevel(self, value: bool) -> None: ...
    @property
    def impenetrableLayer(self) -> bool: ...
    @impenetrableLayer.setter
    def impenetrableLayer(self, value: bool) -> None: ...
    @property
    def elevation(self) -> bool: ...
    @elevation.setter
    def elevation(self, value: bool) -> None: ...
    @property
    def slope(self) -> bool: ...
    @slope.setter
    def slope(self, value: bool) -> None: ...
    @property
    def latitude(self) -> bool: ...
    @latitude.setter
    def latitude(self, value: bool) -> None: ...
    @property
    def landcover(self) -> bool: ...
    @landcover.setter
    def landcover(self, value: bool) -> None: ...
    @property
    def fertilization(self) -> bool: ...
    @fertilization.setter
    def fertilization(self, value: bool) -> None: ...
    @property
    def nitrogenResponseOn(self) -> bool: ...
    @nitrogenResponseOn.setter
    def nitrogenResponseOn(self, value: bool) -> None: ...
    @property
    def irrigation(self) -> bool: ...
    @irrigation.setter
    def irrigation(self, value: bool) -> None: ...
    @property
    def waterDeficitResponseOn(self) -> bool: ...
    @waterDeficitResponseOn.setter
    def waterDeficitResponseOn(self, value: bool) -> None: ...
    @property
    def emergenceMoistureControlOn(self) -> bool: ...
    @emergenceMoistureControlOn.setter
    def emergenceMoistureControlOn(self, value: bool) -> None: ...
    @property
    def emergenceFloodingControlOn(self) -> bool: ...
    @emergenceFloodingControlOn.setter
    def emergenceFloodingControlOn(self, value: bool) -> None: ...
    @property
    def leafExtensionModifier(self) -> bool: ...
    @leafExtensionModifier.setter
    def leafExtensionModifier(self, value: bool) -> None: ...
    @property
    def co2(self) -> float: ...
    @co2.setter
    def co2(self, value: float) -> None: ...
    @property
    def o3(self) -> float: ...
    @o3.setter
    def o3(self, value: float) -> None: ...
    @property
    def fieldConditionModifier(self) -> float: ...
    @fieldConditionModifier.setter
    def fieldConditionModifier(self, value: float) -> None: ...
    @property
    def stageTemperatureSum(self) -> str: ...
    @stageTemperatureSum.setter
    def stageTemperatureSum(self, value: str) -> None: ...
    @property
    def useVernalisationFix(self) -> bool: ...
    @useVernalisationFix.setter
    def useVernalisationFix(self, value: bool) -> None: ...
    @property
    def comment(self) -> str: ...
    @comment.setter
    def comment(self, value: str) -> None: ...
    @staticmethod
    def from_dict(dictionary: dict[str, Any]) -> SetupBuilder: ...
    def copy(self) -> SetupBuilder: ...
    def to_bytes(self) -> bytes: ...
    def to_bytes_packed(self) -> bytes: ...
    def to_segments(self) -> list[bytes]: ...
    def as_reader(self) -> SetupReader: ...
    @staticmethod
    def write(file: BufferedWriter) -> None: ...
    @staticmethod
    def write_packed(file: BufferedWriter) -> None: ...
