Enum Class McpCacheScope

java.lang.Object
java.lang.Enum<McpCacheScope>
org.apache.juneau.bean.mcp.v20260728.McpCacheScope
All Implemented Interfaces:
Serializable, Comparable<McpCacheScope>, Constable

public enum McpCacheScope extends Enum<McpCacheScope>
SEP-2549 cache-hint authorization scope for a CacheableResult (MCP wire uses lowercase strings).

PUBLIC means the result is not user-specific and may be shared across authentication/authorization contexts. PRIVATE means the result is user- or authorization-specific and MUST NOT be shared across authentication/authorization contexts.

The protocol default for an absent cacheScope is public, but that is an interpretation rule for consumers, not a serialization default: Juneau never materializes "cacheScope":"public" when the property is unset.

  • Enum Constant Details

    • PUBLIC

      public static final McpCacheScope PUBLIC
      Result is not user-specific; may be shared across authentication/authorization contexts.
    • PRIVATE

      public static final McpCacheScope PRIVATE
      Result is user- or authorization-specific; MUST NOT be shared across authentication/authorization contexts.
  • Method Details

    • values

      public static McpCacheScope[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static McpCacheScope valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toWire

      public String toWire()
      Wire token for JSON payloads.
      Returns:
      Lowercase MCP cache-scope string.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<McpCacheScope>