# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from chromiumos.longrunning import operations_pb2 as chromiumos_dot_longrunning_dot_operations__pb2
from chromiumos.test.api import provision_service_pb2 as chromiumos_dot_test_dot_api_dot_provision__service__pb2


class ProvisionServiceStub(object):
    """Stable (build-agnostic) interface for installing software (provisioning)
    on a Chrome OS device.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.InstallCros = channel.unary_unary(
                '/chromiumos.test.api.ProvisionService/InstallCros',
                request_serializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallCrosRequest.SerializeToString,
                response_deserializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
                )
        self.InstallAsh = channel.unary_unary(
                '/chromiumos.test.api.ProvisionService/InstallAsh',
                request_serializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallAshRequest.SerializeToString,
                response_deserializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
                )
        self.InstallArc = channel.unary_unary(
                '/chromiumos.test.api.ProvisionService/InstallArc',
                request_serializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallArcRequest.SerializeToString,
                response_deserializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
                )
        self.InstallFirmware = channel.unary_unary(
                '/chromiumos.test.api.ProvisionService/InstallFirmware',
                request_serializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallFirmwareRequest.SerializeToString,
                response_deserializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
                )


class ProvisionServiceServicer(object):
    """Stable (build-agnostic) interface for installing software (provisioning)
    on a Chrome OS device.
    """

    def InstallCros(self, request, context):
        """InstallCros installs a specified version of Chrome OS on the DUT, along
        with any specified DLCs.

        If the DUT is already on the specified version of Chrome OS, the OS will
        not be installed.

        If the DUT already has the specified list of DLCs, only the missing DLCs
        will be installed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InstallAsh(self, request, context):
        """InstallAsh installs a specified version of ash-chrome on the DUT.

        This directly overwrites the version of ash-chrome on the current root
        disk partition.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InstallArc(self, request, context):
        """InstallArc installs a specified version of ARC on the DUT.

        This directly overwrites the version of ARC on the current root
        disk partition.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InstallFirmware(self, request, context):
        """InstallFirmware installs all of the firmware images specified.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ProvisionServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'InstallCros': grpc.unary_unary_rpc_method_handler(
                    servicer.InstallCros,
                    request_deserializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallCrosRequest.FromString,
                    response_serializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
            ),
            'InstallAsh': grpc.unary_unary_rpc_method_handler(
                    servicer.InstallAsh,
                    request_deserializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallAshRequest.FromString,
                    response_serializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
            ),
            'InstallArc': grpc.unary_unary_rpc_method_handler(
                    servicer.InstallArc,
                    request_deserializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallArcRequest.FromString,
                    response_serializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
            ),
            'InstallFirmware': grpc.unary_unary_rpc_method_handler(
                    servicer.InstallFirmware,
                    request_deserializer=chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallFirmwareRequest.FromString,
                    response_serializer=chromiumos_dot_longrunning_dot_operations__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'chromiumos.test.api.ProvisionService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ProvisionService(object):
    """Stable (build-agnostic) interface for installing software (provisioning)
    on a Chrome OS device.
    """

    @staticmethod
    def InstallCros(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/chromiumos.test.api.ProvisionService/InstallCros',
            chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallCrosRequest.SerializeToString,
            chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InstallAsh(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/chromiumos.test.api.ProvisionService/InstallAsh',
            chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallAshRequest.SerializeToString,
            chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InstallArc(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/chromiumos.test.api.ProvisionService/InstallArc',
            chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallArcRequest.SerializeToString,
            chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InstallFirmware(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/chromiumos.test.api.ProvisionService/InstallFirmware',
            chromiumos_dot_test_dot_api_dot_provision__service__pb2.InstallFirmwareRequest.SerializeToString,
            chromiumos_dot_longrunning_dot_operations__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
