InspectorMockRuleUi

data class InspectorMockRuleUi(val id: String, val method: String? = null, val pathPattern: String = ".*", val actionLabel: String = "", val scheme: String? = null, val host: String? = null, val priority: Int = 0, val scope: String = "SESSION", val statusCode: Int = 200, val body: String = "", val enabled: Boolean = true, val headers: Map<String, String> = emptyMap(), val delayMs: Long? = null, val hitCount: Long = 0, val lastHitEpochMs: Long? = null, val sourceBodySnapshot: String? = null)

Constructors

Link copied to clipboard
constructor(id: String, method: String? = null, pathPattern: String = ".*", actionLabel: String = "", scheme: String? = null, host: String? = null, priority: Int = 0, scope: String = "SESSION", statusCode: Int = 200, body: String = "", enabled: Boolean = true, headers: Map<String, String> = emptyMap(), delayMs: Long? = null, hitCount: Long = 0, lastHitEpochMs: Long? = null, sourceBodySnapshot: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Non-null only when the rule wraps its response in a delay, mirroring MockAction.Delay.durationMs.

Link copied to clipboard
Link copied to clipboard

Response headers the rule replies with; empty for actions with no headers of their own.

Link copied to clipboard

How many times this rule has matched a request; 0 if it never has.

Link copied to clipboard
val host: String?
Link copied to clipboard
val id: String
Link copied to clipboard

Epoch ms of the rule's most recent match; null if it never has.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The original transaction's response body, captured only by mockRuleDraftFromTransaction's "Mock this response" flow, so the served mock can later be diffed against it. Session-only: mirrors MockRule.sourceBodySnapshot and is never persisted to disk. Not user-editable, so the create/edit form passes it through untouched rather than binding it to a field.

Link copied to clipboard