# @generated by generate_proto_mypy_stubs.py.  Do not edit!
import sys
from cirq_google.api.v2.metrics_pb2 import (
    MetricsSnapshot as cirq_google___api___v2___metrics_pb2___MetricsSnapshot,
)

from cirq_google.api.v2.program_pb2 import (
    Arg as cirq_google___api___v2___program_pb2___Arg,
    Program as cirq_google___api___v2___program_pb2___Program,
)

from google.protobuf.descriptor import (
    EnumDescriptor as google___protobuf___descriptor___EnumDescriptor,
)

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

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

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 CalibrationLayerCode(int):
    DESCRIPTOR: google___protobuf___descriptor___EnumDescriptor = ...
    @classmethod
    def Name(cls, number: int) -> str: ...
    @classmethod
    def Value(cls, name: str) -> CalibrationLayerCode: ...
    @classmethod
    def keys(cls) -> typing___List[str]: ...
    @classmethod
    def values(cls) -> typing___List[CalibrationLayerCode]: ...
    @classmethod
    def items(cls) -> typing___List[typing___Tuple[str, CalibrationLayerCode]]: ...
CALIBRATION_RESULT_UNSPECIFIED = typing___cast(CalibrationLayerCode, 0)
SUCCESS = typing___cast(CalibrationLayerCode, 1)
ERROR_OTHER = typing___cast(CalibrationLayerCode, 2)
ERROR_INVALID_PARAMETERS = typing___cast(CalibrationLayerCode, 3)
ERROR_TIMEOUT = typing___cast(CalibrationLayerCode, 4)
ERROR_CALIBRATION_FAILED = typing___cast(CalibrationLayerCode, 5)

class FocusedCalibration(google___protobuf___message___Message):

    @property
    def layers(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[CalibrationLayer]: ...

    def __init__(self,
        layers : typing___Optional[typing___Iterable[CalibrationLayer]] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> FocusedCalibration: ...
    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"layers"]) -> None: ...
    else:
        def ClearField(self, field_name: typing_extensions___Literal[b"layers"]) -> None: ...

class CalibrationLayer(google___protobuf___message___Message):
    class ArgsEntry(google___protobuf___message___Message):
        key = ... # type: typing___Text

        @property
        def value(self) -> cirq_google___api___v2___program_pb2___Arg: ...

        def __init__(self,
            key : typing___Optional[typing___Text] = None,
            value : typing___Optional[cirq_google___api___v2___program_pb2___Arg] = None,
            ) -> None: ...
        @classmethod
        def FromString(cls, s: bytes) -> CalibrationLayer.ArgsEntry: ...
        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[b"key",b"value"]) -> None: ...

    calibration_type = ... # type: typing___Text

    @property
    def layer(self) -> cirq_google___api___v2___program_pb2___Program: ...

    @property
    def args(self) -> typing___MutableMapping[typing___Text, cirq_google___api___v2___program_pb2___Arg]: ...

    def __init__(self,
        calibration_type : typing___Optional[typing___Text] = None,
        layer : typing___Optional[cirq_google___api___v2___program_pb2___Program] = None,
        args : typing___Optional[typing___Mapping[typing___Text, cirq_google___api___v2___program_pb2___Arg]] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> CalibrationLayer: ...
    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"layer"]) -> bool: ...
        def ClearField(self, field_name: typing_extensions___Literal[u"args",u"calibration_type",u"layer"]) -> None: ...
    else:
        def HasField(self, field_name: typing_extensions___Literal[u"layer",b"layer"]) -> bool: ...
        def ClearField(self, field_name: typing_extensions___Literal[b"args",b"calibration_type",b"layer"]) -> None: ...

class FocusedCalibrationResult(google___protobuf___message___Message):

    @property
    def results(self) -> google___protobuf___internal___containers___RepeatedCompositeFieldContainer[CalibrationLayerResult]: ...

    def __init__(self,
        results : typing___Optional[typing___Iterable[CalibrationLayerResult]] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> FocusedCalibrationResult: ...
    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"results"]) -> None: ...
    else:
        def ClearField(self, field_name: typing_extensions___Literal[b"results"]) -> None: ...

class CalibrationLayerResult(google___protobuf___message___Message):
    code = ... # type: CalibrationLayerCode
    error_message = ... # type: typing___Text
    token = ... # type: typing___Text
    valid_until_ms = ... # type: int

    @property
    def metrics(self) -> cirq_google___api___v2___metrics_pb2___MetricsSnapshot: ...

    def __init__(self,
        code : typing___Optional[CalibrationLayerCode] = None,
        error_message : typing___Optional[typing___Text] = None,
        token : typing___Optional[typing___Text] = None,
        metrics : typing___Optional[cirq_google___api___v2___metrics_pb2___MetricsSnapshot] = None,
        valid_until_ms : typing___Optional[int] = None,
        ) -> None: ...
    @classmethod
    def FromString(cls, s: bytes) -> CalibrationLayerResult: ...
    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"]) -> bool: ...
        def ClearField(self, field_name: typing_extensions___Literal[u"code",u"error_message",u"metrics",u"token",u"valid_until_ms"]) -> None: ...
    else:
        def HasField(self, field_name: typing_extensions___Literal[u"metrics",b"metrics"]) -> bool: ...
        def ClearField(self, field_name: typing_extensions___Literal[b"code",b"error_message",b"metrics",b"token",b"valid_until_ms"]) -> None: ...
