# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from yandex.cloud.loadbalancer.v1 import target_group_pb2 as yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__pb2
from yandex.cloud.loadbalancer.v1 import target_group_service_pb2 as yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class TargetGroupServiceStub(object):
  """A set of methods for managing TargetGroup resources.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/Get',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.GetTargetGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__pb2.TargetGroup.FromString,
        )
    self.List = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/List',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupsResponse.FromString,
        )
    self.Create = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/Create',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.CreateTargetGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Update = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/Update',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.UpdateTargetGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Delete = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/Delete',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.DeleteTargetGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.AddTargets = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/AddTargets',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.AddTargetsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.RemoveTargets = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/RemoveTargets',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.RemoveTargetsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListOperations = channel.unary_unary(
        '/yandex.cloud.loadbalancer.v1.TargetGroupService/ListOperations',
        request_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupOperationsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupOperationsResponse.FromString,
        )


class TargetGroupServiceServicer(object):
  """A set of methods for managing TargetGroup resources.
  """

  def Get(self, request, context):
    """Returns the specified TargetGroup resource.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def List(self, request, context):
    """Retrieves the list of TargetGroup resources in the specified folder.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Create(self, request, context):
    """Creates a target group in the specified folder and adds the specified targets to it.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Update(self, request, context):
    """Updates the specified target group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Delete(self, request, context):
    """Deletes the specified target group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def AddTargets(self, request, context):
    """Adds targets to the target group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RemoveTargets(self, request, context):
    """Removes targets from the target group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListOperations(self, request, context):
    """Lists operations for the specified target group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TargetGroupServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.GetTargetGroupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__pb2.TargetGroup.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupsResponse.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.CreateTargetGroupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.UpdateTargetGroupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.DeleteTargetGroupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'AddTargets': grpc.unary_unary_rpc_method_handler(
          servicer.AddTargets,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.AddTargetsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'RemoveTargets': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveTargets,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.RemoveTargetsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'ListOperations': grpc.unary_unary_rpc_method_handler(
          servicer.ListOperations,
          request_deserializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_loadbalancer_dot_v1_dot_target__group__service__pb2.ListTargetGroupOperationsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.loadbalancer.v1.TargetGroupService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
