// Copyright (c) ZeroC, Inc.

// slice2cpp version 3.8.1
// <auto-generated>Generated from Slice file 'RemoteLogger.ice'.</auto-generated>
// clang-format off

#ifndef Ice_RemoteLogger_h_
#define Ice_RemoteLogger_h_

#include <Ice/PushDisableWarnings.h>
#include <Ice/Ice.h>
#include "BuiltinSequences.h"
#include <list>

#ifndef ICE_DISABLE_VERSION
#   if ICE_INT_VERSION / 100 != 308
#       error Ice version mismatch!
#   endif
#   if ICE_INT_VERSION % 100 >= 50
#       error Beta header file detected
#   endif
#   if ICE_INT_VERSION % 100 < 1
#       error Ice patch level mismatch!
#   endif
#endif

// NOLINTBEGIN(modernize-concat-nested-namespaces)

namespace Ice
{
    /// Represents the different types of log messages.
    /// @remarks The Slice compiler generated this enum class from Slice enumeration `::Ice::LogMessageType`.
    enum class LogMessageType : std::uint8_t
    {
        /// The ::Ice::RemoteLoggerPrx received a print message.
        PrintMessage,

        /// The ::Ice::RemoteLoggerPrx received a trace message.
        TraceMessage,

        /// The ::Ice::RemoteLoggerPrx received a warning message.
        WarningMessage,

        /// The ::Ice::RemoteLoggerPrx received an error message.
        ErrorMessage
    };

    /// Outputs the enumerator name or underlying value of a LogMessageType to a stream.
    /// @param os The output stream.
    /// @param value The value to output.
    /// @return The output stream.
    ICE_API std::ostream& operator<<(std::ostream& os, LogMessageType value);

    /// A sequence of #LogMessageType.
    using LogMessageTypeSeq = std::vector<LogMessageType>;

    struct LogMessage;

    /// A sequence of LogMessage.
    using LogMessageSeq = std::list<LogMessage>;

    class RemoteLoggerPrx;

    class LoggerAdminPrx;
}

namespace Ice
{
    /// Represents an Ice object that accepts log messages. It's called by the implementation of LoggerAdminPrx.
    /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::RemoteLogger`.
    /// @headerfile Ice/Ice.h
    class ICE_API RemoteLoggerPrx : public Ice::Proxy<RemoteLoggerPrx, Ice::ObjectPrx>
    {
    public:
        /// Constructs a proxy from a Communicator and a proxy string.
        /// @param communicator The communicator of the new proxy.
        /// @param proxyString The proxy string to parse.
        RemoteLoggerPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)

        /// Copy constructor. Constructs with a copy of the contents of @p other.
        /// @param other The proxy to copy from.
        RemoteLoggerPrx(const RemoteLoggerPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)

        /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
        /// @param other The proxy to move from.
        RemoteLoggerPrx(RemoteLoggerPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)

        ~RemoteLoggerPrx() override;

        /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
        /// @param rhs The proxy to copy from.
        /// @return A reference to this proxy.
        RemoteLoggerPrx& operator=(const RemoteLoggerPrx& rhs) noexcept
        {
            if (this != &rhs)
            {
                Ice::ObjectPrx::operator=(rhs);
            }
            return *this;
        }

        /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
        /// @param rhs The proxy to move from.
        RemoteLoggerPrx& operator=(RemoteLoggerPrx&& rhs) noexcept
        {
            if (this != &rhs)
            {
                Ice::ObjectPrx::operator=(std::move(rhs));
            }
            return *this;
        }

        /// Attaches a remote logger to the local logger.
        /// @param prefix The prefix of the associated local Logger.
        /// @param logMessages Old log messages generated before "now".
        /// @param context The request context.
        void init(std::string_view prefix, const LogMessageSeq& logMessages, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Attaches a remote logger to the local logger.
        /// @param prefix The prefix of the associated local Logger.
        /// @param logMessages Old log messages generated before "now".
        /// @param context The request context.
        /// @return A future that becomes available when the invocation completes.
        [[nodiscard]] std::future<void> initAsync(std::string_view prefix, const LogMessageSeq& logMessages, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Attaches a remote logger to the local logger.
        /// @param prefix The prefix of the associated local Logger.
        /// @param logMessages Old log messages generated before "now".
        /// @param response The response callback.
        /// @param exception The exception callback.
        /// @param sent The sent callback.
        /// @param context The request context.
        /// @return A function that can be called to cancel the invocation locally.
        // NOLINTNEXTLINE(modernize-use-nodiscard)
        std::function<void()> initAsync(std::string_view prefix, const LogMessageSeq& logMessages, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;

        /// @private
        void _iceI_init(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::string_view, const LogMessageSeq&, const Ice::Context&) const;

        /// Logs a LogMessage.
        /// @param message The message to log.
        /// @param context The request context.
        /// @remarks ::Ice::RemoteLoggerPrx::log may be called by ::Ice::LoggerAdminPrx before ::Ice::RemoteLoggerPrx::init.
        void log(const LogMessage& message, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Logs a LogMessage.
        /// @param message The message to log.
        /// @param context The request context.
        /// @return A future that becomes available when the invocation completes.
        /// @remarks ::Ice::RemoteLoggerPrx::log may be called by ::Ice::LoggerAdminPrx before ::Ice::RemoteLoggerPrx::init.
        [[nodiscard]] std::future<void> logAsync(const LogMessage& message, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Logs a LogMessage.
        /// @param message The message to log.
        /// @param response The response callback.
        /// @param exception The exception callback.
        /// @param sent The sent callback.
        /// @param context The request context.
        /// @return A function that can be called to cancel the invocation locally.
        /// @remarks ::Ice::RemoteLoggerPrx::log may be called by ::Ice::LoggerAdminPrx before ::Ice::RemoteLoggerPrx::init.
        // NOLINTNEXTLINE(modernize-use-nodiscard)
        std::function<void()> logAsync(const LogMessage& message, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;

        /// @private
        void _iceI_log(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const LogMessage&, const Ice::Context&) const;

        /// Gets the type ID of the associated Slice interface.
        /// @return The string `"::Ice::RemoteLogger"`.
        static const char* ice_staticId() noexcept;

        /// @private
        static RemoteLoggerPrx _fromReference(IceInternal::ReferencePtr ref) { return RemoteLoggerPrx{std::move(ref)}; }

    protected:
        /// @private
        RemoteLoggerPrx() = default;

        /// @private
        explicit RemoteLoggerPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
        {
        }
    };

    /// Represents the admin facet that allows an Ice application to attach its RemoteLoggerPrx to the local
    /// logger of an Ice communicator.
    /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::LoggerAdmin`.
    /// @headerfile Ice/Ice.h
    class ICE_API LoggerAdminPrx : public Ice::Proxy<LoggerAdminPrx, Ice::ObjectPrx>
    {
    public:
        /// Constructs a proxy from a Communicator and a proxy string.
        /// @param communicator The communicator of the new proxy.
        /// @param proxyString The proxy string to parse.
        LoggerAdminPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)

        /// Copy constructor. Constructs with a copy of the contents of @p other.
        /// @param other The proxy to copy from.
        LoggerAdminPrx(const LoggerAdminPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)

        /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
        /// @param other The proxy to move from.
        LoggerAdminPrx(LoggerAdminPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)

        ~LoggerAdminPrx() override;

        /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
        /// @param rhs The proxy to copy from.
        /// @return A reference to this proxy.
        LoggerAdminPrx& operator=(const LoggerAdminPrx& rhs) noexcept
        {
            if (this != &rhs)
            {
                Ice::ObjectPrx::operator=(rhs);
            }
            return *this;
        }

        /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
        /// @param rhs The proxy to move from.
        LoggerAdminPrx& operator=(LoggerAdminPrx&& rhs) noexcept
        {
            if (this != &rhs)
            {
                Ice::ObjectPrx::operator=(std::move(rhs));
            }
            return *this;
        }

        /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger. This operation calls ::Ice::RemoteLoggerPrx::init
        /// on @p prx.
        /// @param prx A proxy to the remote logger.
        /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
        /// no filtering (send all message types).
        /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
        /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
        /// (send all trace categories).
        /// @param messageMax The maximum number of log messages (of all types) to be provided to
        /// ::Ice::RemoteLoggerPrx::init. A negative value requests all messages available.
        /// @param context The request context.
        /// @throws Ice::RemoteLoggerAlreadyAttachedException Thrown if this remote logger is already attached to this admin
        /// object.
        void attachRemoteLogger(const std::optional<RemoteLoggerPrx>& prx, const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger. This operation calls ::Ice::RemoteLoggerPrx::init
        /// on @p prx.
        /// @param prx A proxy to the remote logger.
        /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
        /// no filtering (send all message types).
        /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
        /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
        /// (send all trace categories).
        /// @param messageMax The maximum number of log messages (of all types) to be provided to
        /// ::Ice::RemoteLoggerPrx::init. A negative value requests all messages available.
        /// @param context The request context.
        /// @return A future that becomes available when the invocation completes.
        [[nodiscard]] std::future<void> attachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger. This operation calls ::Ice::RemoteLoggerPrx::init
        /// on @p prx.
        /// @param prx A proxy to the remote logger.
        /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
        /// no filtering (send all message types).
        /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
        /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
        /// (send all trace categories).
        /// @param messageMax The maximum number of log messages (of all types) to be provided to
        /// ::Ice::RemoteLoggerPrx::init. A negative value requests all messages available.
        /// @param response The response callback.
        /// @param exception The exception callback.
        /// @param sent The sent callback.
        /// @param context The request context.
        /// @return A function that can be called to cancel the invocation locally.
        // NOLINTNEXTLINE(modernize-use-nodiscard)
        std::function<void()> attachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;

        /// @private
        void _iceI_attachRemoteLogger(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const std::optional<RemoteLoggerPrx>&, const LogMessageTypeSeq&, const StringSeq&, std::int32_t, const Ice::Context&) const;

        /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
        /// @param prx A proxy to the remote logger.
        /// @param context The request context.
        /// @return `true` if the provided remote logger proxy was detached, and `false` otherwise.
        bool detachRemoteLogger(const std::optional<RemoteLoggerPrx>& prx, const Ice::Context& context = Ice::noExplicitContext) const; // NOLINT(modernize-use-nodiscard)

        /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
        /// @param prx A proxy to the remote logger.
        /// @param context The request context.
        /// @return A future that becomes available when the invocation completes. This future holds:
        /// - `true` if the provided remote logger proxy was detached, and `false` otherwise.
        [[nodiscard]] std::future<bool> detachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
        /// @param prx A proxy to the remote logger.
        /// @param response The response callback. It accepts:
        /// - `true` if the provided remote logger proxy was detached, and `false` otherwise.
        /// @param exception The exception callback.
        /// @param sent The sent callback.
        /// @param context The request context.
        /// @return A function that can be called to cancel the invocation locally.
        // NOLINTNEXTLINE(modernize-use-nodiscard)
        std::function<void()> detachRemoteLoggerAsync(const std::optional<RemoteLoggerPrx>& prx, std::function<void(bool)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;

        /// @private
        void _iceI_detachRemoteLogger(const std::shared_ptr<IceInternal::OutgoingAsyncT<bool>>&, const std::optional<RemoteLoggerPrx>&, const Ice::Context&) const;

        /// Retrieves recently logged log messages.
        /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
        /// filtering (send all message types).
        /// @param traceCategories The categories of traces that caller wish to receive. This parameter is ignored if
        /// @p messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace
        /// categories).
        /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
        /// requests all messages available.
        /// @param[out] prefix The prefix of the associated local logger.
        /// @param context The request context.
        /// @return The Log messages.
        LogMessageSeq getLog(const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, std::string& prefix, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Retrieves recently logged log messages.
        /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
        /// filtering (send all message types).
        /// @param traceCategories The categories of traces that caller wish to receive. This parameter is ignored if
        /// @p messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace
        /// categories).
        /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
        /// requests all messages available.
        /// @param context The request context.
        /// @return A future that becomes available when the invocation completes. This future holds:
        /// - `returnValue` The Log messages.
        /// - `prefix` The prefix of the associated local logger.
        [[nodiscard]] std::future<std::tuple<LogMessageSeq, std::string>> getLogAsync(const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, const Ice::Context& context = Ice::noExplicitContext) const;

        /// Retrieves recently logged log messages.
        /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
        /// filtering (send all message types).
        /// @param traceCategories The categories of traces that caller wish to receive. This parameter is ignored if
        /// @p messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace
        /// categories).
        /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
        /// requests all messages available.
        /// @param response The response callback. It accepts:
        /// - `returnValue` The Log messages.
        /// - `prefix` The prefix of the associated local logger.
        /// @param exception The exception callback.
        /// @param sent The sent callback.
        /// @param context The request context.
        /// @return A function that can be called to cancel the invocation locally.
        // NOLINTNEXTLINE(modernize-use-nodiscard)
        std::function<void()> getLogAsync(const LogMessageTypeSeq& messageTypes, const StringSeq& traceCategories, std::int32_t messageMax, std::function<void(::Ice::LogMessageSeq, std::string)> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;

        /// @private
        void _iceI_getLog(const std::shared_ptr<IceInternal::OutgoingAsyncT<std::tuple<LogMessageSeq, std::string>>>&, const LogMessageTypeSeq&, const StringSeq&, std::int32_t, const Ice::Context&) const;

        /// Gets the type ID of the associated Slice interface.
        /// @return The string `"::Ice::LoggerAdmin"`.
        static const char* ice_staticId() noexcept;

        /// @private
        static LoggerAdminPrx _fromReference(IceInternal::ReferencePtr ref) { return LoggerAdminPrx{std::move(ref)}; }

    protected:
        /// @private
        LoggerAdminPrx() = default;

        /// @private
        explicit LoggerAdminPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
        {
        }
    };
}

namespace Ice
{
    /// Represents a full log message.
    /// @remarks The Slice compiler generated this struct from Slice struct `::Ice::LogMessage`.
    /// @headerfile Ice/Ice.h
    struct LogMessage
    {
        /// The type of message sent to the ::Ice::RemoteLoggerPrx.
        ::Ice::LogMessageType type;

        /// The date and time when the ::Ice::RemoteLoggerPrx received this message, expressed as the number of
        /// microseconds since the Unix Epoch (00:00:00 UTC on 1 January 1970).
        std::int64_t timestamp;

        /// For a message of type 'trace', the trace category of this log message; otherwise, the empty string.
        std::string traceCategory;

        /// The log message itself.
        std::string message;

        /// Creates a tuple with all the fields of this struct.
        /// @return A tuple with all the fields of this struct.
        [[nodiscard]] std::tuple<const ::Ice::LogMessageType&, const std::int64_t&, const std::string&, const std::string&> ice_tuple() const
        {
            return std::tie(type, timestamp, traceCategory, message);
        }

        /// Outputs the name and value of each field of this instance to the stream.
        /// @param os The output stream.
        ICE_API void ice_printFields(std::ostream& os) const;
    };

    /// Outputs the description of a LogMessage to a stream, including all its fields.
    /// @param os The output stream.
    /// @param value The instance to output.
    /// @return The output stream.
    ICE_API std::ostream& operator<<(std::ostream& os, const LogMessage& value);

    /// Thrown when the provided RemoteLoggerPrx was previously attached to a LoggerAdminPrx.
    /// @remarks The Slice compiler generated this exception class from Slice exception `::Ice::RemoteLoggerAlreadyAttachedException`.
    /// @headerfile Ice/Ice.h
    class ICE_API RemoteLoggerAlreadyAttachedException : public Ice::UserException
    {
    public:
        /// Gets the type ID of the associated Slice exception.
        /// @return The string `"::Ice::RemoteLoggerAlreadyAttachedException"`.
        static const char* ice_staticId() noexcept;

        [[nodiscard]] const char* ice_id() const noexcept override;

        void ice_throw() const override;

    protected:
        /// @private
        void _writeImpl(Ice::OutputStream*) const override;

        /// @private
        void _readImpl(Ice::InputStream*) override;
    };

    /// @cond INTERNAL
    using Ice::Tuple::operator<;
    using Ice::Tuple::operator<=;
    using Ice::Tuple::operator>;
    using Ice::Tuple::operator>=;
    using Ice::Tuple::operator==;
    using Ice::Tuple::operator!=;
    /// @endcond
}

namespace Ice
{
    /// Represents an Ice object that accepts log messages. It's called by the implementation of LoggerAdminPrx.
    /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RemoteLogger`.
    /// @headerfile Ice/Ice.h
    class ICE_API RemoteLogger : public virtual Ice::Object
    {
    public:
        /// The associated proxy type.
        using ProxyType = RemoteLoggerPrx;

        /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
        /// @param request The incoming request.
        /// @param sendResponse The callback to send the response.
        void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;

        [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;

        [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;

        /// Attaches a remote logger to the local logger.
        /// @param prefix The prefix of the associated local Logger.
        /// @param logMessages Old log messages generated before "now".
        /// @param current The Current object of the incoming request.
        virtual void init(std::string prefix, LogMessageSeq logMessages, const Ice::Current& current) = 0;

        /// @private
        void _iceD_init(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Logs a LogMessage.
        /// @param message The message to log.
        /// @param current The Current object of the incoming request.
        /// @remarks ::Ice::RemoteLoggerPrx::log may be called by ::Ice::LoggerAdminPrx before ::Ice::RemoteLoggerPrx::init.
        virtual void log(LogMessage message, const Ice::Current& current) = 0;

        /// @private
        void _iceD_log(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Gets the type ID of the associated Slice interface.
        /// @return The string `"::Ice::RemoteLogger"`.
        static const char* ice_staticId() noexcept;
    };

    /// A shared pointer to a RemoteLogger.
    using RemoteLoggerPtr = std::shared_ptr<RemoteLogger>;

    /// Represents the admin facet that allows an Ice application to attach its RemoteLoggerPrx to the local
    /// logger of an Ice communicator.
    /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LoggerAdmin`.
    /// @headerfile Ice/Ice.h
    class ICE_API LoggerAdmin : public virtual Ice::Object
    {
    public:
        /// The associated proxy type.
        using ProxyType = LoggerAdminPrx;

        /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
        /// @param request The incoming request.
        /// @param sendResponse The callback to send the response.
        void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;

        [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;

        [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;

        /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger. This operation calls ::Ice::RemoteLoggerPrx::init
        /// on @p prx.
        /// @param prx A proxy to the remote logger.
        /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
        /// no filtering (send all message types).
        /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
        /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
        /// (send all trace categories).
        /// @param messageMax The maximum number of log messages (of all types) to be provided to
        /// ::Ice::RemoteLoggerPrx::init. A negative value requests all messages available.
        /// @param current The Current object of the incoming request.
        /// @throws Ice::RemoteLoggerAlreadyAttachedException Thrown if this remote logger is already attached to this admin
        /// object.
        virtual void attachRemoteLogger(std::optional<RemoteLoggerPrx> prx, LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, const Ice::Current& current) = 0;

        /// @private
        void _iceD_attachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
        /// @param prx A proxy to the remote logger.
        /// @param current The Current object of the incoming request.
        /// @return `true` if the provided remote logger proxy was detached, and `false` otherwise.
        virtual bool detachRemoteLogger(std::optional<RemoteLoggerPrx> prx, const Ice::Current& current) = 0;

        /// @private
        void _iceD_detachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Retrieves recently logged log messages.
        /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
        /// filtering (send all message types).
        /// @param traceCategories The categories of traces that caller wish to receive. This parameter is ignored if
        /// @p messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace
        /// categories).
        /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
        /// requests all messages available.
        /// @param[out] prefix The prefix of the associated local logger.
        /// @param current The Current object of the incoming request.
        /// @return The Log messages.
        virtual LogMessageSeq getLog(LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::string& prefix, const Ice::Current& current) = 0;

        /// @private
        void _iceD_getLog(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Gets the type ID of the associated Slice interface.
        /// @return The string `"::Ice::LoggerAdmin"`.
        static const char* ice_staticId() noexcept;
    };

    /// A shared pointer to a LoggerAdmin.
    using LoggerAdminPtr = std::shared_ptr<LoggerAdmin>;
}

namespace Ice
{
    /// Represents an Ice object that accepts log messages. It's called by the implementation of LoggerAdminPrx.
    /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::RemoteLogger`.
    /// @headerfile Ice/Ice.h
    class ICE_API AsyncRemoteLogger : public virtual Ice::Object
    {
    public:
        /// The associated proxy type.
        using ProxyType = RemoteLoggerPrx;

        /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
        /// @param request The incoming request.
        /// @param sendResponse The callback to send the response.
        void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;

        [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;

        [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;

        /// Attaches a remote logger to the local logger.
        /// @param prefix The prefix of the associated local Logger.
        /// @param logMessages Old log messages generated before "now".
        /// @param response The response callback.
        /// @param exception The exception callback.
        /// @param current The Current object of the incoming request.
        virtual void initAsync(std::string prefix, LogMessageSeq logMessages, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;

        /// @private
        void _iceD_init(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Logs a LogMessage.
        /// @param message The message to log.
        /// @param response The response callback.
        /// @param exception The exception callback.
        /// @param current The Current object of the incoming request.
        /// @remarks ::Ice::RemoteLoggerPrx::log may be called by ::Ice::LoggerAdminPrx before ::Ice::RemoteLoggerPrx::init.
        virtual void logAsync(LogMessage message, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;

        /// @private
        void _iceD_log(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Gets the type ID of the associated Slice interface.
        /// @return The string `"::Ice::RemoteLogger"`.
        static const char* ice_staticId() noexcept;
    };

    /// A shared pointer to an AsyncRemoteLogger.
    using AsyncRemoteLoggerPtr = std::shared_ptr<AsyncRemoteLogger>;

    /// Represents the admin facet that allows an Ice application to attach its RemoteLoggerPrx to the local
    /// logger of an Ice communicator.
    /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::LoggerAdmin`.
    /// @headerfile Ice/Ice.h
    class ICE_API AsyncLoggerAdmin : public virtual Ice::Object
    {
    public:
        /// The associated proxy type.
        using ProxyType = LoggerAdminPrx;

        /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
        /// @param request The incoming request.
        /// @param sendResponse The callback to send the response.
        void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;

        [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;

        [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;

        /// Attaches a ::Ice::RemoteLoggerPrx object to the local logger. This operation calls ::Ice::RemoteLoggerPrx::init
        /// on @p prx.
        /// @param prx A proxy to the remote logger.
        /// @param messageTypes The list of message types that the remote logger wishes to receive. An empty list means
        /// no filtering (send all message types).
        /// @param traceCategories The categories of traces that the remote logger wishes to receive. This parameter is
        /// ignored if @p messageTypes is not empty and does not include trace. An empty list means no filtering
        /// (send all trace categories).
        /// @param messageMax The maximum number of log messages (of all types) to be provided to
        /// ::Ice::RemoteLoggerPrx::init. A negative value requests all messages available.
        /// @param response The response callback.
        /// @param exception The exception callback.
        /// @param current The Current object of the incoming request.
        /// @throws Ice::RemoteLoggerAlreadyAttachedException Thrown if this remote logger is already attached to this admin
        /// object.
        virtual void attachRemoteLoggerAsync(std::optional<RemoteLoggerPrx> prx, LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;

        /// @private
        void _iceD_attachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Detaches a ::Ice::RemoteLoggerPrx object from the local logger.
        /// @param prx A proxy to the remote logger.
        /// @param response The response callback. It accepts:
        /// - `true` if the provided remote logger proxy was detached, and `false` otherwise.
        /// @param exception The exception callback.
        /// @param current The Current object of the incoming request.
        virtual void detachRemoteLoggerAsync(std::optional<RemoteLoggerPrx> prx, std::function<void(bool returnValue)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;

        /// @private
        void _iceD_detachRemoteLogger(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Retrieves recently logged log messages.
        /// @param messageTypes The list of message types that the caller wishes to receive. An empty list means no
        /// filtering (send all message types).
        /// @param traceCategories The categories of traces that caller wish to receive. This parameter is ignored if
        /// @p messageTypes is not empty and does not include trace. An empty list means no filtering (send all trace
        /// categories).
        /// @param messageMax The maximum number of log messages (of all types) to be returned. A negative value
        /// requests all messages available.
        /// @param response The response callback. It accepts:
        /// - `returnValue` The Log messages.
        /// - `prefix` The prefix of the associated local logger.
        /// @param exception The exception callback.
        /// @param current The Current object of the incoming request.
        virtual void getLogAsync(LogMessageTypeSeq messageTypes, StringSeq traceCategories, std::int32_t messageMax, std::function<void(const LogMessageSeq& returnValue, std::string_view prefix)> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;

        /// @private
        void _iceD_getLog(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);

        /// Gets the type ID of the associated Slice interface.
        /// @return The string `"::Ice::LoggerAdmin"`.
        static const char* ice_staticId() noexcept;
    };

    /// A shared pointer to an AsyncLoggerAdmin.
    using AsyncLoggerAdminPtr = std::shared_ptr<AsyncLoggerAdmin>;
}

namespace Ice
{
    /// @cond INTERNAL
    template<>
    struct StreamableTraits<::Ice::LogMessageType>
    {
        static constexpr StreamHelperCategory helper = StreamHelperCategoryEnum;
        static constexpr int minValue = 0;
        static constexpr int maxValue = 3;
        static constexpr int minWireSize = 1;
        static constexpr bool fixedLength = false;
    };
    /// @endcond

    /// @cond INTERNAL
    template<>
    struct StreamableTraits<::Ice::LogMessage>
    {
        static constexpr StreamHelperCategory helper = StreamHelperCategoryStruct;
        static constexpr int minWireSize = 11;
        static constexpr bool fixedLength = false;
    };

    template<>
    struct StreamReader<::Ice::LogMessage>
    {
        /// Unmarshals a ::Ice::LogMessage from the input stream.
        static void read(InputStream* istr, ::Ice::LogMessage& v)
        {
            istr->readAll(v.type, v.timestamp, v.traceCategory, v.message);
        }
    };
    /// @endcond
}

// NOLINTEND(modernize-concat-nested-namespaces)

#include <Ice/PopDisableWarnings.h>
#endif
