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

from yandex.cloud.iam.v1 import user_account_pb2 as yandex_dot_cloud_dot_iam_dot_v1_dot_user__account__pb2
from yandex.cloud.iam.v1 import yandex_passport_user_account_service_pb2 as yandex_dot_cloud_dot_iam_dot_v1_dot_yandex__passport__user__account__service__pb2


class YandexPassportUserAccountServiceStub(object):
  """A set of methods for managing YandexPassportUserAccount resources.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetByLogin = channel.unary_unary(
        '/yandex.cloud.iam.v1.YandexPassportUserAccountService/GetByLogin',
        request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_yandex__passport__user__account__service__pb2.GetUserAccountByLoginRequest.SerializeToString,
        response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_user__account__pb2.UserAccount.FromString,
        )


class YandexPassportUserAccountServiceServicer(object):
  """A set of methods for managing YandexPassportUserAccount resources.
  """

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


def add_YandexPassportUserAccountServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetByLogin': grpc.unary_unary_rpc_method_handler(
          servicer.GetByLogin,
          request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_yandex__passport__user__account__service__pb2.GetUserAccountByLoginRequest.FromString,
          response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_user__account__pb2.UserAccount.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'yandex.cloud.iam.v1.YandexPassportUserAccountService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
