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

from meshtrade.iam.user_profile.v1 import service_pb2 as meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2
from meshtrade.iam.user_profile.v1 import user_profile_pb2 as meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2


class UserProfileServiceStub(object):
    """
    UserProfileService manages user profile information and preferences.

    User profiles contain display preferences, localization settings, and
    personalization data for authenticated users in the IAM system.
    Each profile is linked to a specific user and owned by a group.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.UpdateUserProfile = channel.unary_unary(
                '/meshtrade.iam.user_profile.v1.UserProfileService/UpdateUserProfile',
                request_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.UpdateUserProfileRequest.SerializeToString,
                response_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.FromString,
                _registered_method=True)
        self.GetUserProfile = channel.unary_unary(
                '/meshtrade.iam.user_profile.v1.UserProfileService/GetUserProfile',
                request_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.GetUserProfileRequest.SerializeToString,
                response_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.FromString,
                _registered_method=True)
        self.GetUserProfileByUser = channel.unary_unary(
                '/meshtrade.iam.user_profile.v1.UserProfileService/GetUserProfileByUser',
                request_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.GetUserProfileByUserRequest.SerializeToString,
                response_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.FromString,
                _registered_method=True)
        self.ListUserProfiles = channel.unary_unary(
                '/meshtrade.iam.user_profile.v1.UserProfileService/ListUserProfiles',
                request_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.ListUserProfilesRequest.SerializeToString,
                response_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.ListUserProfilesResponse.FromString,
                _registered_method=True)


class UserProfileServiceServicer(object):
    """
    UserProfileService manages user profile information and preferences.

    User profiles contain display preferences, localization settings, and
    personalization data for authenticated users in the IAM system.
    Each profile is linked to a specific user and owned by a group.
    """

    def UpdateUserProfile(self, request, context):
        """
        Updates an existing user profile.

        Allows modification of profile information including display name,
        profile picture, locale preferences, and currency settings.
        Only the fields provided in the request will be updated.

        Returns the updated UserProfile resource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserProfile(self, request, context):
        """
        Retrieves a user profile by its resource name.

        Fetches the complete user profile information including all
        preferences and settings for the specified user profile ID.

        Returns the requested UserProfile resource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetUserProfileByUser(self, request, context):
        """
        Retrieves a user profile by the associated user resource name.

        Looks up and returns the user profile linked to a specific user ID.
        This is useful when you have a user resource and need to find
        their associated profile information.

        Returns the UserProfile resource associated with the specified user.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUserProfiles(self, request, context):
        """
        Lists all user_profiles accessible to the caller.

        Returns a collection of all user_profiles within the caller's
        access scope based on group ownership and role permissions.

        Returns a ListUserProfilesResponse containing all accessible user_profiles.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_UserProfileServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UpdateUserProfile': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateUserProfile,
                    request_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.UpdateUserProfileRequest.FromString,
                    response_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.SerializeToString,
            ),
            'GetUserProfile': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserProfile,
                    request_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.GetUserProfileRequest.FromString,
                    response_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.SerializeToString,
            ),
            'GetUserProfileByUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserProfileByUser,
                    request_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.GetUserProfileByUserRequest.FromString,
                    response_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.SerializeToString,
            ),
            'ListUserProfiles': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUserProfiles,
                    request_deserializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.ListUserProfilesRequest.FromString,
                    response_serializer=meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.ListUserProfilesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'meshtrade.iam.user_profile.v1.UserProfileService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('meshtrade.iam.user_profile.v1.UserProfileService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class UserProfileService(object):
    """
    UserProfileService manages user profile information and preferences.

    User profiles contain display preferences, localization settings, and
    personalization data for authenticated users in the IAM system.
    Each profile is linked to a specific user and owned by a group.
    """

    @staticmethod
    def UpdateUserProfile(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,
            '/meshtrade.iam.user_profile.v1.UserProfileService/UpdateUserProfile',
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.UpdateUserProfileRequest.SerializeToString,
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUserProfile(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,
            '/meshtrade.iam.user_profile.v1.UserProfileService/GetUserProfile',
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.GetUserProfileRequest.SerializeToString,
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUserProfileByUser(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,
            '/meshtrade.iam.user_profile.v1.UserProfileService/GetUserProfileByUser',
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.GetUserProfileByUserRequest.SerializeToString,
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_user__profile__pb2.UserProfile.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListUserProfiles(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,
            '/meshtrade.iam.user_profile.v1.UserProfileService/ListUserProfiles',
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.ListUserProfilesRequest.SerializeToString,
            meshtrade_dot_iam_dot_user__profile_dot_v1_dot_service__pb2.ListUserProfilesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
