"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import google.protobuf.descriptor
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import typing
import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...

class ErrorCode(_ErrorCode, metaclass=_ErrorCodeEnumTypeWrapper):
    pass
class _ErrorCode:
    V = typing.NewType('V', builtins.int)
class _ErrorCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ErrorCode.V], builtins.type):
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor = ...
    UNKNOWN = ErrorCode.V(0)
    # HTTP 5xx error code
    RUNTIME = ErrorCode.V(100)
    # HTTP 4xx error code
    APPLICATION = ErrorCode.V(200)

UNKNOWN = ErrorCode.V(0)
# HTTP 5xx error code
RUNTIME = ErrorCode.V(100)
# HTTP 4xx error code
APPLICATION = ErrorCode.V(200)
global___ErrorCode = ErrorCode


class RemoteCallRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    QUALIFIED_SYMBOL_FIELD_NUMBER: builtins.int
    JSON_ARGS_FIELD_NUMBER: builtins.int
    qualified_symbol: typing.Text = ...
    # TODO: encode as protobuf instead
    json_args: typing.Text = ...
    def __init__(self,
        *,
        qualified_symbol : typing.Text = ...,
        json_args : typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"json_args",b"json_args",u"qualified_symbol",b"qualified_symbol"]) -> None: ...
global___RemoteCallRequest = RemoteCallRequest

class RemoteCallResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    JSON_RESULTS_FIELD_NUMBER: builtins.int
    # TODO: encode as protobuf instead
    json_results: typing.Text = ...
    def __init__(self,
        *,
        json_results : typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"json_results",b"json_results"]) -> None: ...
global___RemoteCallResponse = RemoteCallResponse

class LaunchJobRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    JOB_FIELD_NUMBER: builtins.int
    SDK_VERSION_FIELD_NUMBER: builtins.int
    @property
    def job(self) -> global___RemoteJob: ...
    sdk_version: typing.Text = ...
    def __init__(self,
        *,
        job : typing.Optional[global___RemoteJob] = ...,
        sdk_version : typing.Text = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"job",b"job"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"job",b"job",u"sdk_version",b"sdk_version"]) -> None: ...
global___LaunchJobRequest = LaunchJobRequest

class LaunchJobResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    def __init__(self,
        ) -> None: ...
global___LaunchJobResponse = LaunchJobResponse

class LaunchBlockingJobRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    JOB_FIELD_NUMBER: builtins.int
    SDK_VERSION_FIELD_NUMBER: builtins.int
    @property
    def job(self) -> global___RemoteJob: ...
    sdk_version: typing.Text = ...
    def __init__(self,
        *,
        job : typing.Optional[global___RemoteJob] = ...,
        sdk_version : typing.Text = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"job",b"job"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"job",b"job",u"sdk_version",b"sdk_version"]) -> None: ...
global___LaunchBlockingJobRequest = LaunchBlockingJobRequest

class LaunchBlockingJobResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    RESULT_FIELD_NUMBER: builtins.int
    @property
    def result(self) -> global___Result: ...
    def __init__(self,
        *,
        result : typing.Optional[global___Result] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"result",b"result"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"result",b"result"]) -> None: ...
global___LaunchBlockingJobResponse = LaunchBlockingJobResponse

class PostResultRequest(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    EXEC_ID_FIELD_NUMBER: builtins.int
    RESULT_FIELD_NUMBER: builtins.int
    # An id that identifies an instance of a Job execution.
    exec_id: typing.Text = ...
    @property
    def result(self) -> global___Result: ...
    def __init__(self,
        *,
        exec_id : typing.Text = ...,
        result : typing.Optional[global___Result] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"result",b"result"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"exec_id",b"exec_id",u"result",b"result"]) -> None: ...
global___PostResultRequest = PostResultRequest

class PostResultResponse(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    def __init__(self,
        ) -> None: ...
global___PostResultResponse = PostResultResponse

class RemoteJob(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    QUALIFIED_SYMBOL_FIELD_NUMBER: builtins.int
    NAMESPACE_FIELD_NUMBER: builtins.int
    ENCODED_ARGS_FIELD_NUMBER: builtins.int
    HOSTNAME_FIELD_NUMBER: builtins.int
    qualified_symbol: typing.Text = ...
    namespace: typing.Text = ...
    encoded_args: builtins.bytes = ...
    hostname: typing.Text = ...
    def __init__(self,
        *,
        qualified_symbol : typing.Text = ...,
        namespace : typing.Text = ...,
        encoded_args : builtins.bytes = ...,
        hostname : typing.Text = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"encoded_args",b"encoded_args",u"hostname",b"hostname",u"namespace",b"namespace",u"qualified_symbol",b"qualified_symbol"]) -> None: ...
global___RemoteJob = RemoteJob

# Result should always have either `value` OR `error` set, and both should
# not be set.
class Result(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    VALUE_FIELD_NUMBER: builtins.int
    ERROR_FIELD_NUMBER: builtins.int
    @property
    def value(self) -> global___Value: ...
    @property
    def error(self) -> global___Error: ...
    def __init__(self,
        *,
        value : typing.Optional[global___Value] = ...,
        error : typing.Optional[global___Error] = ...,
        ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal[u"error",b"error",u"value",b"value"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"error",b"error",u"value",b"value"]) -> None: ...
global___Result = Result

class Error(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    CODE_FIELD_NUMBER: builtins.int
    MESSAGE_FIELD_NUMBER: builtins.int
    ENCODED_ERROR_FIELD_NUMBER: builtins.int
    code: global___ErrorCode.V = ...
    # Human readable error message.
    message: typing.Text = ...
    # For now, we use a generic bytes type. This lets us use jsonpickle
    # for python-to-python service calls, specifically an Error object
    # returned from an python-application running via jetpack.
    #
    # Long term:
    # We'll likely want this to be `repeated google.protobuf.Any` type.
    # This will let us encode specific details for different error codes
    # that correspond to specific protobuf-message kinds, and stack traces.
    # However, we'd need to implement a python type to protobuf converter
    # ("protopickle") and so we can punt on that for now.
    #
    # Consider using pkg cockroachdb/errors in remotesvc and storing that error's
    # protobuf message here.
    encoded_error: builtins.bytes = ...
    def __init__(self,
        *,
        code : global___ErrorCode.V = ...,
        message : typing.Text = ...,
        encoded_error : builtins.bytes = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"code",b"code",u"encoded_error",b"encoded_error",u"message",b"message"]) -> None: ...
global___Error = Error

class Value(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
    ENCODED_VALUE_FIELD_NUMBER: builtins.int
    # This should contain the json-pickled value being returned
    encoded_value: builtins.bytes = ...
    def __init__(self,
        *,
        encoded_value : builtins.bytes = ...,
        ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal[u"encoded_value",b"encoded_value"]) -> None: ...
global___Value = Value
