"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2018 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import abc
import buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2
import grpc

class TasksStub:
    """DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by
    Lease.result and logs should be precreated prior to sending to the bot (eg,
    via CommandTask.expected_outputs.stdout_destination).
    """

    def __init__(self, channel: grpc.Channel) -> None: ...
    GetTask: grpc.UnaryUnaryMultiCallable[
        buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.GetTaskRequest,
        buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.Task,
    ]
    """DEPRECATED - use Lease.payload instead.
    GetTask reads the current state of the task. Tasks must be created through
    some other interface, and should be immutable once created and exposed to
    the bots.
    """
    UpdateTaskResult: grpc.UnaryUnaryMultiCallable[
        buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.UpdateTaskResultRequest,
        buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.TaskResult,
    ]
    """DEPRECATED - use Lease.result instead.
    UpdateTaskResult updates the result.
    """
    AddTaskLog: grpc.UnaryUnaryMultiCallable[
        buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.AddTaskLogRequest,
        buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.AddTaskLogResponse,
    ]
    """DEPRECATED - precreate logs prior to sending to bot.
    AddTaskLog creates a new streaming log. The log is streamed and marked as
    completed through other interfaces (i.e., ByteStream). This can be called
    by the bot if it wants to create a new log; the server can also predefine
    logs that do not need to be created (e.g. `stdout`).
    """

class TasksServicer(metaclass=abc.ABCMeta):
    """DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by
    Lease.result and logs should be precreated prior to sending to the bot (eg,
    via CommandTask.expected_outputs.stdout_destination).
    """

    @abc.abstractmethod
    def GetTask(
        self,
        request: buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.GetTaskRequest,
        context: grpc.ServicerContext,
    ) -> buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.Task:
        """DEPRECATED - use Lease.payload instead.
        GetTask reads the current state of the task. Tasks must be created through
        some other interface, and should be immutable once created and exposed to
        the bots.
        """
    @abc.abstractmethod
    def UpdateTaskResult(
        self,
        request: buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.UpdateTaskResultRequest,
        context: grpc.ServicerContext,
    ) -> buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.TaskResult:
        """DEPRECATED - use Lease.result instead.
        UpdateTaskResult updates the result.
        """
    @abc.abstractmethod
    def AddTaskLog(
        self,
        request: buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.AddTaskLogRequest,
        context: grpc.ServicerContext,
    ) -> buildgrid._protos.google.devtools.remoteworkers.v1test2.tasks_pb2.AddTaskLogResponse:
        """DEPRECATED - precreate logs prior to sending to bot.
        AddTaskLog creates a new streaming log. The log is streamed and marked as
        completed through other interfaces (i.e., ByteStream). This can be called
        by the bot if it wants to create a new log; the server can also predefine
        logs that do not need to be created (e.g. `stdout`).
        """

def add_TasksServicer_to_server(servicer: TasksServicer, server: grpc.Server) -> None: ...
