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

from yandex.cloud.compute.v1 import placement_group_pb2 as yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__pb2
from yandex.cloud.compute.v1 import placement_group_service_pb2 as yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class PlacementGroupServiceStub(object):
  """A set of methods for managing placement groups.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/Get',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.GetPlacementGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__pb2.PlacementGroup.FromString,
        )
    self.List = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/List',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupsResponse.FromString,
        )
    self.Create = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/Create',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.CreatePlacementGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Update = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/Update',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.UpdatePlacementGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Delete = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/Delete',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.DeletePlacementGroupRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListInstances = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/ListInstances',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupInstancesRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupInstancesResponse.FromString,
        )
    self.ListOperations = channel.unary_unary(
        '/yandex.cloud.compute.v1.PlacementGroupService/ListOperations',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupOperationsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupOperationsResponse.FromString,
        )


class PlacementGroupServiceServicer(object):
  """A set of methods for managing placement groups.
  """

  def Get(self, request, context):
    """Returns the specified placement group.

    To get the list of all available placement groups, make a [List] request.
    """
    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 placement groups 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 placement group in the specified folder.
    """
    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 placement 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 placement group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListInstances(self, request, context):
    """Lists instances for the specified placement 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 placement group.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_PlacementGroupServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.GetPlacementGroupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__pb2.PlacementGroup.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupsResponse.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.CreatePlacementGroupRequest.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_compute_dot_v1_dot_placement__group__service__pb2.UpdatePlacementGroupRequest.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_compute_dot_v1_dot_placement__group__service__pb2.DeletePlacementGroupRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
      ),
      'ListInstances': grpc.unary_unary_rpc_method_handler(
          servicer.ListInstances,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupInstancesRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupInstancesResponse.SerializeToString,
      ),
      'ListOperations': grpc.unary_unary_rpc_method_handler(
          servicer.ListOperations,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_placement__group__service__pb2.ListPlacementGroupOperationsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.compute.v1.PlacementGroupService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
