// Copyright (c) ZeroC, Inc.

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

#ifndef Ice_OperationMode_h_
#define Ice_OperationMode_h_

#include <Ice/PushDisableWarnings.h>
#include <Ice/Config.h>
#include <Ice/StreamHelpers.h>

#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
{
    /// Specifies if an operation is idempotent, which affects the retry behavior of the Ice client runtime.
    /// @remarks The Slice compiler generated this enum class from Slice enumeration `::Ice::OperationMode`.
    enum class OperationMode : std::uint8_t
    {
        /// A non-idempotent operation (the default). The Ice client runtime guarantees that it will not violate
        /// at-most-once semantics for operations with this mode.
        Normal,

        /// Equivalent to ::Ice::OperationMode#Idempotent, but deprecated.
        Nonmutating [[deprecated("Use Idempotent instead.")]],

        /// An idempotent operation. The Ice client runtime does not guarantee at-most-once semantics for such an
        /// operation.
        /// @remarks When an operation is idempotent, the Ice runtime will attempt to transparently recover from certain
        /// runtime errors by re-issuing a failed request transparently.
        Idempotent
    };

    /// Outputs the enumerator name or underlying value of an OperationMode 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, OperationMode value);
}

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

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

#include <Ice/PopDisableWarnings.h>
#endif
