# @generated by generate_proto_mypy_stubs.py.  Do not edit!
import sys
from google.protobuf.descriptor import (
    Descriptor as google___protobuf___descriptor___Descriptor,
    EnumDescriptor as google___protobuf___descriptor___EnumDescriptor,
)

from google.protobuf.internal.containers import (
    RepeatedCompositeFieldContainer as google___protobuf___internal___containers___RepeatedCompositeFieldContainer,
    RepeatedScalarFieldContainer as google___protobuf___internal___containers___RepeatedScalarFieldContainer,
)

from google.protobuf.message import (
    Message as google___protobuf___message___Message,
)

from numproto.protobuf.ndarray_pb2 import (
    NDArray as numproto___protobuf___ndarray_pb2___NDArray,
)

from typing import (
    Iterable as typing___Iterable,
    List as typing___List,
    Mapping as typing___Mapping,
    MutableMapping as typing___MutableMapping,
    Optional as typing___Optional,
    Text as typing___Text,
    Tuple as typing___Tuple,
    cast as typing___cast,
)

from typing_extensions import (
    Literal as typing_extensions___Literal,
)


class RendezvousResponse(int):
    DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ...
    @classmethod
    def Name(cls, number: int) -> str: ...
    @classmethod
    def Value(cls, name: str) -> RendezvousResponse: ...
    @classmethod
    def keys(cls) -> typing___List[str]: ...
    @classmethod
    def values(cls) -> typing___List[RendezvousResponse]: ...
    @classmethod
    def items(cls) -> typing___List[typing___Tuple[str, RendezvousResponse]]: ...
    ACCEPT = typing___cast(RendezvousResponse, 0)
    LATER = typing___cast(RendezvousResponse, 1)
ACCEPT = typing___cast(RendezvousResponse, 0)
LATER = typing___cast(RendezvousResponse, 1)

class RendezvousRequest(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...

    def __init__(self,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> RendezvousRequest: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...

class RendezvousReply(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
    response = ... # type: RendezvousResponse

    def __init__(self,
        *,
        response : typing___Optional[RendezvousResponse] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> RendezvousReply: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    if sys.version_info >= (3,):
        def ClearField(self, field_name: typing_extensions___Literal[u"response"]) -> None: ...
    else:
        def ClearField(self, field_name: typing_extensions___Literal[u"response",b"response"]) -> None: ...

class HeartbeatRequest(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...

    def __init__(self,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> HeartbeatRequest: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...

class HeartbeatReply(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...

    def __init__(self,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> HeartbeatReply: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...

class StartTrainingRequest(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...

    def __init__(self,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> StartTrainingRequest: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...

class StartTrainingReply(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
    epochs = ... # type: int
    epoch_base = ... # type: int

    @property
    def theta(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[numproto___protobuf___ndarray_pb2___NDArray]: ...

    def __init__(self,
        *,
        theta : typing___Optional[typing___Iterable[numproto___protobuf___ndarray_pb2___NDArray]] = None,
        epochs : typing___Optional[int] = None,
        epoch_base : typing___Optional[int] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> StartTrainingReply: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    if sys.version_info >= (3,):
        def ClearField(self, field_name: typing_extensions___Literal[u"epoch_base",u"epochs",u"theta"]) -> None: ...
    else:
        def ClearField(self, field_name: typing_extensions___Literal[u"epoch_base",b"epoch_base",u"epochs",b"epochs",u"theta",b"theta"]) -> None: ...

class EndTrainingRequest(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
    class HistoryEntry(google___protobuf___message___Message):
        DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
        key = ... # type: typing___Text

        @property
        def value(self) -> EndTrainingRequest.HistoryValue: ...

        def __init__(self,
            *,
            key : typing___Optional[typing___Text] = None,
            value : typing___Optional[EndTrainingRequest.HistoryValue] = None,
            ) -> None: ...
        @classmethod
        def FromString(cls, s: bytes) -> EndTrainingRequest.HistoryEntry: ...
        def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        if sys.version_info >= (3,):
            def HasField(self, field_name: typing_extensions___Literal[u"value"]) -> bool: ...
            def ClearField(self, field_name: typing_extensions___Literal[u"key",u"value"]) -> None: ...
        else:
            def HasField(self, field_name: typing_extensions___Literal[u"value",b"value"]) -> bool: ...
            def ClearField(self, field_name: typing_extensions___Literal[u"key",b"key",u"value",b"value"]) -> None: ...

    class ThetaUpdate(google___protobuf___message___Message):
        DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
        num_examples = ... # type: int

        @property
        def theta_prime(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[numproto___protobuf___ndarray_pb2___NDArray]: ...

        def __init__(self,
            *,
            theta_prime : typing___Optional[typing___Iterable[numproto___protobuf___ndarray_pb2___NDArray]] = None,
            num_examples : typing___Optional[int] = None,
            ) -> None: ...
        @classmethod
        def FromString(cls, s: bytes) -> EndTrainingRequest.ThetaUpdate: ...
        def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        if sys.version_info >= (3,):
            def ClearField(self, field_name: typing_extensions___Literal[u"num_examples",u"theta_prime"]) -> None: ...
        else:
            def ClearField(self, field_name: typing_extensions___Literal[u"num_examples",b"num_examples",u"theta_prime",b"theta_prime"]) -> None: ...

    class HistoryValue(google___protobuf___message___Message):
        DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
        values = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[float]

        def __init__(self,
            *,
            values : typing___Optional[typing___Iterable[float]] = None,
            ) -> None: ...
        @classmethod
        def FromString(cls, s: bytes) -> EndTrainingRequest.HistoryValue: ...
        def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        if sys.version_info >= (3,):
            def ClearField(self, field_name: typing_extensions___Literal[u"values"]) -> None: ...
        else:
            def ClearField(self, field_name: typing_extensions___Literal[u"values",b"values"]) -> None: ...

    class Metrics(google___protobuf___message___Message):
        DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...
        cid = ... # type: int
        vol_by_class = ... # type: google___protobuf___internal___containers___RepeatedScalarFieldContainer[int]

        def __init__(self,
            *,
            cid : typing___Optional[int] = None,
            vol_by_class : typing___Optional[typing___Iterable[int]] = None,
            ) -> None: ...
        @classmethod
        def FromString(cls, s: bytes) -> EndTrainingRequest.Metrics: ...
        def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
        if sys.version_info >= (3,):
            def ClearField(self, field_name: typing_extensions___Literal[u"cid",u"vol_by_class"]) -> None: ...
        else:
            def ClearField(self, field_name: typing_extensions___Literal[u"cid",b"cid",u"vol_by_class",b"vol_by_class"]) -> None: ...


    @property
    def theta_update(self) -> EndTrainingRequest.ThetaUpdate: ...

    @property
    def history(self) -> typing___MutableMapping[typing___Text, EndTrainingRequest.HistoryValue]: ...

    @property
    def metrics(self) -> EndTrainingRequest.Metrics: ...

    def __init__(self,
        *,
        theta_update : typing___Optional[EndTrainingRequest.ThetaUpdate] = None,
        history : typing___Optional[typing___Mapping[typing___Text, EndTrainingRequest.HistoryValue]] = None,
        metrics : typing___Optional[EndTrainingRequest.Metrics] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> EndTrainingRequest: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    if sys.version_info >= (3,):
        def HasField(self, field_name: typing_extensions___Literal[u"metrics",u"theta_update"]) -> bool: ...
        def ClearField(self, field_name: typing_extensions___Literal[u"history",u"metrics",u"theta_update"]) -> None: ...
    else:
        def HasField(self, field_name: typing_extensions___Literal[u"metrics",b"metrics",u"theta_update",b"theta_update"]) -> bool: ...
        def ClearField(self, field_name: typing_extensions___Literal[u"history",b"history",u"metrics",b"metrics",u"theta_update",b"theta_update"]) -> None: ...

class EndTrainingReply(google___protobuf___message___Message):
    DESCRIPTOR: google___protobuf___descriptor___Descriptor = ...

    def __init__(self,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> EndTrainingReply: ...
    def MergeFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
    def CopyFrom(self, other_msg: google___protobuf___message___Message) -> None: ...
