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

from . import environment_pb2 as environment__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetEnvironment = channel.unary_unary(
                '/batchx.environment.EnvironmentService/GetEnvironment',
                request_serializer=environment__pb2.GetEnvironmentRequest.SerializeToString,
                response_deserializer=environment__pb2.GetEnvironmentResponse.FromString,
                )
        self.ListRegions = channel.unary_unary(
                '/batchx.environment.EnvironmentService/ListRegions',
                request_serializer=environment__pb2.ListRegionsRequest.SerializeToString,
                response_deserializer=environment__pb2.ListRegionsResponse.FromString,
                )
        self.IsIdAvailable = channel.unary_unary(
                '/batchx.environment.EnvironmentService/IsIdAvailable',
                request_serializer=environment__pb2.IsIdAvailableRequest.SerializeToString,
                response_deserializer=environment__pb2.IsIdAvailableResponse.FromString,
                )


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

    def GetEnvironment(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 ListRegions(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 IsIdAvailable(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_EnvironmentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetEnvironment': grpc.unary_unary_rpc_method_handler(
                    servicer.GetEnvironment,
                    request_deserializer=environment__pb2.GetEnvironmentRequest.FromString,
                    response_serializer=environment__pb2.GetEnvironmentResponse.SerializeToString,
            ),
            'ListRegions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRegions,
                    request_deserializer=environment__pb2.ListRegionsRequest.FromString,
                    response_serializer=environment__pb2.ListRegionsResponse.SerializeToString,
            ),
            'IsIdAvailable': grpc.unary_unary_rpc_method_handler(
                    servicer.IsIdAvailable,
                    request_deserializer=environment__pb2.IsIdAvailableRequest.FromString,
                    response_serializer=environment__pb2.IsIdAvailableResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'batchx.environment.EnvironmentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetEnvironment(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, '/batchx.environment.EnvironmentService/GetEnvironment',
            environment__pb2.GetEnvironmentRequest.SerializeToString,
            environment__pb2.GetEnvironmentResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListRegions(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, '/batchx.environment.EnvironmentService/ListRegions',
            environment__pb2.ListRegionsRequest.SerializeToString,
            environment__pb2.ListRegionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IsIdAvailable(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, '/batchx.environment.EnvironmentService/IsIdAvailable',
            environment__pb2.IsIdAvailableRequest.SerializeToString,
            environment__pb2.IsIdAvailableResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
