addPreset

fun addPreset(response: MockzillaHttpResponse, name: String? = null, description: String? = null, type: DashboardOverridePreset.Type? = null): DashboardOptionsConfig.Builder

Adds a preset response option to the dashboard for this endpoint.

Return

This builder, for chaining.

Parameters

response

The full response this preset applies when selected.

name

Display name for this preset in the dashboard. Defaults to "Preset N".

description

Optional description shown alongside the preset.

type

Visual classification for this preset. Defaults to a type inferred from the response status code when null.


fun addPreset(response: PartialMockzillaHttpResponse, name: String? = null, description: String? = null, type: DashboardOverridePreset.Type? = null): DashboardOptionsConfig.Builder

Adds a partial preset response option to the dashboard for this endpoint. Only fields set on response are overridden; null fields retain the endpoint's default values.

Return

This builder, for chaining.

Parameters

response

The partial response this preset applies when selected.

name

Display name for this preset in the dashboard. Defaults to "Preset N".

description

Optional description shown alongside the preset.

type

Visual classification for this preset. Defaults to a type inferred from the response status code when null.