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

from __future__ import annotations

import grpc

from ghome_foyer_api import api_pb2 as ghome__foyer__api_dot_api__pb2

GRPC_GENERATED_VERSION = "1.71.0"
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower

    _version_not_supported = first_version_is_lower(
        GRPC_VERSION, GRPC_GENERATED_VERSION
    )
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f"The grpc package installed is at version {GRPC_VERSION},"
        + f" but the generated code in ghome_foyer_api/api_pb2_grpc.py depends on"
        + f" grpcio>={GRPC_GENERATED_VERSION}."
        + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
        + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
    )


class HomeControlServiceStub:
    """Home Control Service"""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAssistantRoutines = channel.unary_stream(
            "/google.internal.home.foyer.v1.HomeControlService/GetAssistantRoutines",
            request_serializer=ghome__foyer__api_dot_api__pb2.GetAssistantRoutinesRequest.SerializeToString,
            response_deserializer=ghome__foyer__api_dot_api__pb2.GetAssistantRoutinesResponse.FromString,
            _registered_method=True,
        )


class HomeControlServiceServicer:
    """Home Control Service"""

    def GetAssistantRoutines(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_HomeControlServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetAssistantRoutines": grpc.unary_stream_rpc_method_handler(
            servicer.GetAssistantRoutines,
            request_deserializer=ghome__foyer__api_dot_api__pb2.GetAssistantRoutinesRequest.FromString,
            response_serializer=ghome__foyer__api_dot_api__pb2.GetAssistantRoutinesResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.internal.home.foyer.v1.HomeControlService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers(
        "google.internal.home.foyer.v1.HomeControlService", rpc_method_handlers
    )


# This class is part of an EXPERIMENTAL API.
class HomeControlService:
    """Home Control Service"""

    @staticmethod
    def GetAssistantRoutines(
        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,
            "/google.internal.home.foyer.v1.HomeControlService/GetAssistantRoutines",
            ghome__foyer__api_dot_api__pb2.GetAssistantRoutinesRequest.SerializeToString,
            ghome__foyer__api_dot_api__pb2.GetAssistantRoutinesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )


class StructuresServiceStub:
    """Structure Service"""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetHomeGraph = channel.unary_unary(
            "/google.internal.home.foyer.v1.StructuresService/GetHomeGraph",
            request_serializer=ghome__foyer__api_dot_api__pb2.GetHomeGraphRequest.SerializeToString,
            response_deserializer=ghome__foyer__api_dot_api__pb2.GetHomeGraphResponse.FromString,
            _registered_method=True,
        )


class StructuresServiceServicer:
    """Structure Service"""

    def GetHomeGraph(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_StructuresServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetHomeGraph": grpc.unary_unary_rpc_method_handler(
            servicer.GetHomeGraph,
            request_deserializer=ghome__foyer__api_dot_api__pb2.GetHomeGraphRequest.FromString,
            response_serializer=ghome__foyer__api_dot_api__pb2.GetHomeGraphResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.internal.home.foyer.v1.StructuresService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers(
        "google.internal.home.foyer.v1.StructuresService", rpc_method_handlers
    )


# This class is part of an EXPERIMENTAL API.
class StructuresService:
    """Structure Service"""

    @staticmethod
    def GetHomeGraph(
        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,
            "/google.internal.home.foyer.v1.StructuresService/GetHomeGraph",
            ghome__foyer__api_dot_api__pb2.GetHomeGraphRequest.SerializeToString,
            ghome__foyer__api_dot_api__pb2.GetHomeGraphResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )


class HomeDevicesServiceStub:
    """Home Devices Service"""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAssistantDeviceSettings = channel.unary_stream(
            "/google.internal.home.foyer.v1.HomeDevicesService/GetAssistantDeviceSettings",
            request_serializer=ghome__foyer__api_dot_api__pb2.GetAssistantDeviceSettingsRequest.SerializeToString,
            response_deserializer=ghome__foyer__api_dot_api__pb2.GetAssistantDeviceSettingsResponse.FromString,
            _registered_method=True,
        )
        self.UpdateAssistantDeviceSettings = channel.unary_stream(
            "/google.internal.home.foyer.v1.HomeDevicesService/UpdateAssistantDeviceSettings",
            request_serializer=ghome__foyer__api_dot_api__pb2.UpdateAssistantDeviceSettingsRequest.SerializeToString,
            response_deserializer=ghome__foyer__api_dot_api__pb2.UpdateAssistantDeviceSettingsResponse.FromString,
            _registered_method=True,
        )


class HomeDevicesServiceServicer:
    """Home Devices Service"""

    def GetAssistantDeviceSettings(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateAssistantDeviceSettings(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_HomeDevicesServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetAssistantDeviceSettings": grpc.unary_stream_rpc_method_handler(
            servicer.GetAssistantDeviceSettings,
            request_deserializer=ghome__foyer__api_dot_api__pb2.GetAssistantDeviceSettingsRequest.FromString,
            response_serializer=ghome__foyer__api_dot_api__pb2.GetAssistantDeviceSettingsResponse.SerializeToString,
        ),
        "UpdateAssistantDeviceSettings": grpc.unary_stream_rpc_method_handler(
            servicer.UpdateAssistantDeviceSettings,
            request_deserializer=ghome__foyer__api_dot_api__pb2.UpdateAssistantDeviceSettingsRequest.FromString,
            response_serializer=ghome__foyer__api_dot_api__pb2.UpdateAssistantDeviceSettingsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.internal.home.foyer.v1.HomeDevicesService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers(
        "google.internal.home.foyer.v1.HomeDevicesService", rpc_method_handlers
    )


# This class is part of an EXPERIMENTAL API.
class HomeDevicesService:
    """Home Devices Service"""

    @staticmethod
    def GetAssistantDeviceSettings(
        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,
            "/google.internal.home.foyer.v1.HomeDevicesService/GetAssistantDeviceSettings",
            ghome__foyer__api_dot_api__pb2.GetAssistantDeviceSettingsRequest.SerializeToString,
            ghome__foyer__api_dot_api__pb2.GetAssistantDeviceSettingsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def UpdateAssistantDeviceSettings(
        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,
            "/google.internal.home.foyer.v1.HomeDevicesService/UpdateAssistantDeviceSettings",
            ghome__foyer__api_dot_api__pb2.UpdateAssistantDeviceSettingsRequest.SerializeToString,
            ghome__foyer__api_dot_api__pb2.UpdateAssistantDeviceSettingsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
