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

from yandex.cloud.compute.v1 import snapshot_pb2 as yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__pb2
from yandex.cloud.compute.v1 import snapshot_service_pb2 as yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class SnapshotServiceStub(object):
  """A set of methods for managing Snapshot resources.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.Get = channel.unary_unary(
        '/yandex.cloud.compute.v1.SnapshotService/Get',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.GetSnapshotRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__pb2.Snapshot.FromString,
        )
    self.List = channel.unary_unary(
        '/yandex.cloud.compute.v1.SnapshotService/List',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotsResponse.FromString,
        )
    self.Create = channel.unary_unary(
        '/yandex.cloud.compute.v1.SnapshotService/Create',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.CreateSnapshotRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Update = channel.unary_unary(
        '/yandex.cloud.compute.v1.SnapshotService/Update',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.UpdateSnapshotRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.Delete = channel.unary_unary(
        '/yandex.cloud.compute.v1.SnapshotService/Delete',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.DeleteSnapshotRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
        )
    self.ListOperations = channel.unary_unary(
        '/yandex.cloud.compute.v1.SnapshotService/ListOperations',
        request_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotOperationsRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotOperationsResponse.FromString,
        )


class SnapshotServiceServicer(object):
  """A set of methods for managing Snapshot resources.
  """

  def Get(self, request, context):
    """Returns the specified Snapshot resource.

    To get the list of available Snapshot resources, 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 Snapshot 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 snapshot of the specified disk.
    """
    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 snapshot.

    Values of omitted parameters are not changed.
    """
    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 snapshot.

    Deleting a snapshot removes its data permanently and is irreversible.
    """
    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 snapshot.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_SnapshotServiceServicer_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_snapshot__service__pb2.GetSnapshotRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__pb2.Snapshot.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotsResponse.SerializeToString,
      ),
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.CreateSnapshotRequest.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_snapshot__service__pb2.UpdateSnapshotRequest.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_snapshot__service__pb2.DeleteSnapshotRequest.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_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotOperationsRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_compute_dot_v1_dot_snapshot__service__pb2.ListSnapshotOperationsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.compute.v1.SnapshotService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
