// Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
// --------- Warning: This is a build system generated file. ----------
//

//! @file
//!
//! @brief This file was generated by <i>omni.bind</i>.

#include <omni/core/OmniAttr.h>
#include <omni/core/Interface.h>
#include <omni/core/ResultError.h>

#include <functional>
#include <utility>
#include <type_traits>

#ifndef OMNI_BIND_INCLUDE_INTERFACE_IMPL


/** Interface for the second version of the IStructuredLogSettings interface.  This interface
 *  exposes more settings to control the behaviour of the structured logging system.  This
 *  object can be retrieved directly or by casting the main IStructuredLog interface to this
 *  type using `omni::core::ObjectPtr::as<>()`.
 */
template <>
class omni::core::Generated<omni::structuredlog::IStructuredLogSettings2_abi>
    : public omni::structuredlog::IStructuredLogSettings2_abi
{
public:
    OMNI_PLUGIN_INTERFACE("omni::structuredlog::IStructuredLogSettings2")

    /** Retrieves the current heartbeat message period in seconds.
     *
     *  @returns The minimum time in seconds between heartbeat events.  This will be
     *           @ref omni::structuredlog::kHeartbeatDisabled if the heartbeat events are
     *           disabled.  When enabled, the heartbeat events will be generated within
     *           ~100ms of this scheduled time.  In general, it is expected that the heartbeat
     *           period be on the scale of one minute or more to reduce the overall amount of
     *           event traffic.
     */
    uint64_t getHeartbeatPeriod() noexcept;

    /** Sets the new heartbeat event period in seconds.
     *
     *  @param[in] period   The minimum time in seconds between generated heartbeat events.
     *                      This may be @ref omni::structuredlog::kHeartbeatDisabled to disable
     *                      the heartbeat events.
     *  @returns No return value.
     *
     *  @remarks The heartbeat events can be used to get an estimate of a session's length even if
     *           the 'exit' or 'crash' process lifetime events are missing (ie: power loss, user
     *           kills the process, blue screen of death or kernel panic, etc).  The session can
     *           neither be assumed to have exited normally nor crashed with only these heartbeat
     *           events present however.
     */
    void setHeartbeatPeriod(uint64_t period) noexcept;

    /** Retrieves whether header objects will be added to each newly written log file.
     *
     *  @returns `true` if headers will be written to each new log file.  Returns `false` if
     *           header objects will be omitted from new log files.
     */
    bool getNeedLogHeaders() noexcept;

    /** Sets whether headers will be added to each newly written log file.
     *
     *  @param[in] needHeaders  Set to `true` to indicate that headers should be added to each
     *                          newly written log file.  Set to `false` to indicate that the
     *                          header should be omitted.
     *  @returns No return value.
     *
     *  @remarks This sets whether log headers will be written out to each new log file.  The
     *           header is consumed and modified by the telemetry transmitter app to allow it
     *           to store its progress in processing each log file.  If the header is missing,
     *           the transmitter app will simply ignore the log file.  Omitting the headers
     *           in log files allows the log output to purely just be the structured log event
     *           messages so they can be more easily consumed wholesale by external apps.
     *
     *  @note Changing this setting will only take effect the next time a new log file is written
     *        out to disk.  Disabling this will not remove the header object from an existing log
     *        file.
     */
    void setNeedLogHeaders(bool needHeaders) noexcept;

    /** Retrieves the current set of output flags for structured logging.
     *
     *  @returns The current output flags for the structured logging system.  These indicate how
     *           various aspects of the logging system will function.  Note that some flags may
     *           affect whether the produced messages are compatible with the remainder of the
     *           telemetry toolchain in Omniverse apps.  By default, all output flags are off.
     */
    omni::structuredlog::OutputFlags getOutputFlags() noexcept;

    /** Sets or clears one or more output flags for structured logging.
     *
     *  @param[in] flagsToAdd       A set of zero or more flag bits to set.  These must be either
     *                              @ref omni::structuredlog::fOutputFlagNone or one or more of
     *                              the @ref omni::structuredlog::OutputFlags flags.
     *  @param[in] flagsToRemove    A set of zero or more flag bits to cleared.  These must be
     *                              either @ref omni::structuredlog::fOutputFlagNone or one or
     *                              more of the @ref omni::structuredlog::OutputFlags flags.
     *  @returns No return value.
     *
     *  @remarks This sets or clears flags that affect the output from the structured logging
     *           system.  These flags are all disabled by default.  These flags will take effect
     *           the next time a message is emitted.
     */
    void setOutputFlags(omni::structuredlog::OutputFlags flagsToAdd,
                        omni::structuredlog::OutputFlags flagsToRemove) noexcept;
};

#endif

#ifndef OMNI_BIND_INCLUDE_INTERFACE_DECL

inline uint64_t omni::core::Generated<omni::structuredlog::IStructuredLogSettings2_abi>::getHeartbeatPeriod() noexcept
{
    return getHeartbeatPeriod_abi();
}

inline void omni::core::Generated<omni::structuredlog::IStructuredLogSettings2_abi>::setHeartbeatPeriod(uint64_t period) noexcept
{
    setHeartbeatPeriod_abi(period);
}

inline bool omni::core::Generated<omni::structuredlog::IStructuredLogSettings2_abi>::getNeedLogHeaders() noexcept
{
    return getNeedLogHeaders_abi();
}

inline void omni::core::Generated<omni::structuredlog::IStructuredLogSettings2_abi>::setNeedLogHeaders(bool needHeaders) noexcept
{
    setNeedLogHeaders_abi(needHeaders);
}

inline omni::structuredlog::OutputFlags omni::core::Generated<
    omni::structuredlog::IStructuredLogSettings2_abi>::getOutputFlags() noexcept
{
    return getOutputFlags_abi();
}

inline void omni::core::Generated<omni::structuredlog::IStructuredLogSettings2_abi>::setOutputFlags(
    omni::structuredlog::OutputFlags flagsToAdd, omni::structuredlog::OutputFlags flagsToRemove) noexcept
{
    setOutputFlags_abi(flagsToAdd, flagsToRemove);
}

#endif

#undef OMNI_BIND_INCLUDE_INTERFACE_DECL
#undef OMNI_BIND_INCLUDE_INTERFACE_IMPL
