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

from chromiumos.test.lab.api import inventory_service_pb2 as chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2


class InventoryServiceStub(object):
    """Provides access to all of the lab device device wiring/setup information.

    Implementations of this service will vary on a lab-environment basis.
    E.g. Local lab, Mobile lab, Managed lab, Partner lab

    This allows dependent services (e.g. test execution, device provisioning) to
    run consistently based on this stable API, agnostic of the lab environment.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetDutTopology = channel.unary_stream(
                '/chromiumos.test.lab.api.InventoryService/GetDutTopology',
                request_serializer=chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2.GetDutTopologyRequest.SerializeToString,
                response_deserializer=chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2.GetDutTopologyResponse.FromString,
                )


class InventoryServiceServicer(object):
    """Provides access to all of the lab device device wiring/setup information.

    Implementations of this service will vary on a lab-environment basis.
    E.g. Local lab, Mobile lab, Managed lab, Partner lab

    This allows dependent services (e.g. test execution, device provisioning) to
    run consistently based on this stable API, agnostic of the lab environment.
    """

    def GetDutTopology(self, request, context):
        """Returns the device wiring topology, including all peripherals attached to
        the device and peer devices that are used in the test setup.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InventoryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetDutTopology': grpc.unary_stream_rpc_method_handler(
                    servicer.GetDutTopology,
                    request_deserializer=chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2.GetDutTopologyRequest.FromString,
                    response_serializer=chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2.GetDutTopologyResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'chromiumos.test.lab.api.InventoryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class InventoryService(object):
    """Provides access to all of the lab device device wiring/setup information.

    Implementations of this service will vary on a lab-environment basis.
    E.g. Local lab, Mobile lab, Managed lab, Partner lab

    This allows dependent services (e.g. test execution, device provisioning) to
    run consistently based on this stable API, agnostic of the lab environment.
    """

    @staticmethod
    def GetDutTopology(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_stream(request, target, '/chromiumos.test.lab.api.InventoryService/GetDutTopology',
            chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2.GetDutTopologyRequest.SerializeToString,
            chromiumos_dot_test_dot_lab_dot_api_dot_inventory__service__pb2.GetDutTopologyResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
