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

from strmprivacy.api.installations.v1 import installed_components_v1_pb2 as strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2


class InstalledComponentsServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.UpdateInstalledComponentState = channel.unary_unary(
                '/strmprivacy.api.installations.v1.InstalledComponentsService/UpdateInstalledComponentState',
                request_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.UpdateInstalledComponentStateRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.UpdateInstalledComponentStateResponse.FromString,
                )
        self.GetInstalledComponent = channel.unary_unary(
                '/strmprivacy.api.installations.v1.InstalledComponentsService/GetInstalledComponent',
                request_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.GetInstalledComponentRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.GetInstalledComponentResponse.FromString,
                )
        self.ListInstalledComponents = channel.unary_unary(
                '/strmprivacy.api.installations.v1.InstalledComponentsService/ListInstalledComponents',
                request_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsResponse.FromString,
                )
        self.ListInstalledComponentsCurrentStates = channel.unary_unary(
                '/strmprivacy.api.installations.v1.InstalledComponentsService/ListInstalledComponentsCurrentStates',
                request_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsCurrentStatesRequest.SerializeToString,
                response_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsCurrentStatesResponse.FromString,
                )


class InstalledComponentsServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def UpdateInstalledComponentState(self, request, context):
        """Authentication goes through the installations realm; a strm-installation-id is required in the metadata.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetInstalledComponent(self, request, context):
        """Authentication goes through the users realm; a strm-external-user-id is required in the metadata.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListInstalledComponents(self, request, context):
        """Authentication goes through the users realm; a strm-external-user-id is required in the metadata.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListInstalledComponentsCurrentStates(self, request, context):
        """Authentication goes through the users realm; a strm-external-user-id is required in the metadata. Similar to list,
        but only lists the state of the instances in the last x minutes
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InstalledComponentsServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UpdateInstalledComponentState': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateInstalledComponentState,
                    request_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.UpdateInstalledComponentStateRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.UpdateInstalledComponentStateResponse.SerializeToString,
            ),
            'GetInstalledComponent': grpc.unary_unary_rpc_method_handler(
                    servicer.GetInstalledComponent,
                    request_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.GetInstalledComponentRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.GetInstalledComponentResponse.SerializeToString,
            ),
            'ListInstalledComponents': grpc.unary_unary_rpc_method_handler(
                    servicer.ListInstalledComponents,
                    request_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsResponse.SerializeToString,
            ),
            'ListInstalledComponentsCurrentStates': grpc.unary_unary_rpc_method_handler(
                    servicer.ListInstalledComponentsCurrentStates,
                    request_deserializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsCurrentStatesRequest.FromString,
                    response_serializer=strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsCurrentStatesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'strmprivacy.api.installations.v1.InstalledComponentsService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class InstalledComponentsService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def UpdateInstalledComponentState(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, '/strmprivacy.api.installations.v1.InstalledComponentsService/UpdateInstalledComponentState',
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.UpdateInstalledComponentStateRequest.SerializeToString,
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.UpdateInstalledComponentStateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetInstalledComponent(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, '/strmprivacy.api.installations.v1.InstalledComponentsService/GetInstalledComponent',
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.GetInstalledComponentRequest.SerializeToString,
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.GetInstalledComponentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListInstalledComponents(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, '/strmprivacy.api.installations.v1.InstalledComponentsService/ListInstalledComponents',
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsRequest.SerializeToString,
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListInstalledComponentsCurrentStates(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, '/strmprivacy.api.installations.v1.InstalledComponentsService/ListInstalledComponentsCurrentStates',
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsCurrentStatesRequest.SerializeToString,
            strmprivacy_dot_api_dot_installations_dot_v1_dot_installed__components__v1__pb2.ListInstalledComponentsCurrentStatesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
