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

from . import account_pb2 as account__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccountInfo = channel.unary_unary(
                '/org.couchers.api.account.Account/GetAccountInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=account__pb2.GetAccountInfoRes.FromString,
                )
        self.ChangePassword = channel.unary_unary(
                '/org.couchers.api.account.Account/ChangePassword',
                request_serializer=account__pb2.ChangePasswordReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ChangeEmail = channel.unary_unary(
                '/org.couchers.api.account.Account/ChangeEmail',
                request_serializer=account__pb2.ChangeEmailReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetContributorFormInfo = channel.unary_unary(
                '/org.couchers.api.account.Account/GetContributorFormInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=account__pb2.GetContributorFormInfoRes.FromString,
                )
        self.FillContributorForm = channel.unary_unary(
                '/org.couchers.api.account.Account/FillContributorForm',
                request_serializer=account__pb2.FillContributorFormReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ChangePhone = channel.unary_unary(
                '/org.couchers.api.account.Account/ChangePhone',
                request_serializer=account__pb2.ChangePhoneReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.VerifyPhone = channel.unary_unary(
                '/org.couchers.api.account.Account/VerifyPhone',
                request_serializer=account__pb2.VerifyPhoneReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.DeleteAccount = channel.unary_unary(
                '/org.couchers.api.account.Account/DeleteAccount',
                request_serializer=account__pb2.DeleteAccountReq.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


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

    def GetAccountInfo(self, request, context):
        """account management APIs
        Get information about the user's account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangePassword(self, request, context):
        """Change, set, or unset the user's password
        we will send and an email to the user saying their password was changed
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangeEmail(self, request, context):
        """Change the user's email address
        If user has password, we will send a notification email to the old email, and confirmation email to the new email
        If not, we will send a confirmation email to both emails
        Raises INVALID_ARGUMENT if password is too small, too large, insecure, wrong or not supplied.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetContributorFormInfo(self, request, context):
        """Returns info related to filling out the contributor form
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FillContributorForm(self, request, context):
        """Fill the contributor form; this can be done multiple times
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ChangePhone(self, request, context):
        """Set/Change/Remove phone number. An verification sms with a 6-digit code will be sent out,
        And returned in a call to in VerifyPhone() to complete the phone number change.
        An INVALID_ARGUMENT is returned if the phone number is not formatted according to E.164.
        A RESOURCE_EXHAUSTED error code indicates that you have done too many changes lately.
        An UNIMPLEMENTED error code indicates that sms to your operator is not supported.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyPhone(self, request, context):
        """Enter the code you got in the sms. Other accounts using the same phone number will
        lose their verification status.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteAccount(self, request, context):
        """Sends email with confirmation link containing token to delete account
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AccountServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccountInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=account__pb2.GetAccountInfoRes.SerializeToString,
            ),
            'ChangePassword': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangePassword,
                    request_deserializer=account__pb2.ChangePasswordReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ChangeEmail': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangeEmail,
                    request_deserializer=account__pb2.ChangeEmailReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetContributorFormInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetContributorFormInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=account__pb2.GetContributorFormInfoRes.SerializeToString,
            ),
            'FillContributorForm': grpc.unary_unary_rpc_method_handler(
                    servicer.FillContributorForm,
                    request_deserializer=account__pb2.FillContributorFormReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ChangePhone': grpc.unary_unary_rpc_method_handler(
                    servicer.ChangePhone,
                    request_deserializer=account__pb2.ChangePhoneReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'VerifyPhone': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyPhone,
                    request_deserializer=account__pb2.VerifyPhoneReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'DeleteAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteAccount,
                    request_deserializer=account__pb2.DeleteAccountReq.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.couchers.api.account.Account', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetAccountInfo(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, '/org.couchers.api.account.Account/GetAccountInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            account__pb2.GetAccountInfoRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ChangePassword(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, '/org.couchers.api.account.Account/ChangePassword',
            account__pb2.ChangePasswordReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ChangeEmail(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, '/org.couchers.api.account.Account/ChangeEmail',
            account__pb2.ChangeEmailReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetContributorFormInfo(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, '/org.couchers.api.account.Account/GetContributorFormInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            account__pb2.GetContributorFormInfoRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FillContributorForm(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, '/org.couchers.api.account.Account/FillContributorForm',
            account__pb2.FillContributorFormReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ChangePhone(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, '/org.couchers.api.account.Account/ChangePhone',
            account__pb2.ChangePhoneReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def VerifyPhone(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, '/org.couchers.api.account.Account/VerifyPhone',
            account__pb2.VerifyPhoneReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteAccount(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, '/org.couchers.api.account.Account/DeleteAccount',
            account__pb2.DeleteAccountReq.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
