Package ai.shipeasy.admin.model
Class CreateExperimentRequest
java.lang.Object
ai.shipeasy.admin.model.CreateExperimentRequest
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CreateExperimentRequest
extends Object
Body for `POST /api/admin/experiments`. `name`, `universe`, and `groups` (≥2, weights sum to 10000) required.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumGets or Sets inner -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddGuardrailMetricsItem(ExperimentInlineMetric guardrailMetricsItem) allocationPct(Integer allocationPct) allocationPercent(BigDecimal allocationPercent) description(String description) booleanstatic CreateExperimentRequestCreate an instance of CreateExperimentRequest given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Share of the (gated) audience allocated to the experiment, in basis points (0–10000 = 0%–100%).Allocation as a **percentage** (0–100, fractional ok).Audience label shown in the editor.User-attribute name used as the bucketing key — e.g.Free-form description.Optional folder name grouping items in the dashboard.Single goal metric defined inline — either a DSL `query` or an `event` (+`aggregation`/`value`) the server compiles.Two or more variants.Up to 10 guardrail metrics defined inline.Hypothesis statement shown in the editor.Minimum days the experiment must run before results are considered conclusive.Minimum exposures per group before results are considered conclusive.getName()Stable experiment key.Owner email.Map of param-name → scalar type.getSalt()Hash salt for bucketing.Enable sequential testing (always-valid p-values).p-value cutoff used by the analysis pass.getTag()Short tag chip rendered next to the name.Optional gate name.Name of an existing universe in the project.goalMetric(ExperimentInlineMetric goalMetric) guardrailMetrics(List<ExperimentInlineMetric> guardrailMetrics) inthashCode()hypothesis(String hypothesis) minRuntimeDays(Integer minRuntimeDays) minSampleSize(Integer minSampleSize) ownerEmail(String ownerEmail) params(Map<String, CreateExperimentRequest.InnerEnum> params) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.putParamsItem(String key, CreateExperimentRequest.InnerEnum paramsItem) sequentialTesting(Boolean sequentialTesting) voidsetAllocationPct(Integer allocationPct) voidsetAllocationPercent(BigDecimal allocationPercent) voidsetAudience(String audience) voidsetBucketBy(String bucketBy) voidsetDescription(String description) voidvoidsetGoalMetric(ExperimentInlineMetric goalMetric) voidvoidsetGuardrailMetrics(List<ExperimentInlineMetric> guardrailMetrics) voidsetHypothesis(String hypothesis) voidsetMinRuntimeDays(Integer minRuntimeDays) voidsetMinSampleSize(Integer minSampleSize) voidvoidsetOwnerEmail(String ownerEmail) voidvoidvoidsetSequentialTesting(Boolean sequentialTesting) voidsetSignificanceThreshold(BigDecimal significanceThreshold) voidvoidsetTargetingGate(String targetingGate) voidsetUniverse(String universe) significanceThreshold(BigDecimal significanceThreshold) targetingGate(String targetingGate) toJson()Convert an instance of CreateExperimentRequest to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_NAME
- See Also:
-
SERIALIZED_NAME_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_HYPOTHESIS
- See Also:
-
SERIALIZED_NAME_TAG
- See Also:
-
SERIALIZED_NAME_OWNER_EMAIL
- See Also:
-
SERIALIZED_NAME_AUDIENCE
- See Also:
-
SERIALIZED_NAME_BUCKET_BY
- See Also:
-
SERIALIZED_NAME_FOLDER
- See Also:
-
SERIALIZED_NAME_UNIVERSE
- See Also:
-
SERIALIZED_NAME_TARGETING_GATE
- See Also:
-
SERIALIZED_NAME_ALLOCATION_PCT
- See Also:
-
SERIALIZED_NAME_ALLOCATION_PERCENT
- See Also:
-
SERIALIZED_NAME_SALT
- See Also:
-
SERIALIZED_NAME_PARAMS
- See Also:
-
SERIALIZED_NAME_GROUPS
- See Also:
-
SERIALIZED_NAME_SIGNIFICANCE_THRESHOLD
- See Also:
-
SERIALIZED_NAME_MIN_RUNTIME_DAYS
- See Also:
-
SERIALIZED_NAME_MIN_SAMPLE_SIZE
- See Also:
-
SERIALIZED_NAME_SEQUENTIAL_TESTING
- See Also:
-
SERIALIZED_NAME_GOAL_METRIC
- See Also:
-
SERIALIZED_NAME_GUARDRAIL_METRICS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CreateExperimentRequest
public CreateExperimentRequest()
-
-
Method Details
-
name
-
getName
Stable experiment key. Single segment or `folder.name` (a-z, 0-9, `_`/`-`; max 128 chars). Used by SDKs as `Shipeasy.getExperiment(user, '<name>')`. Immutable after create.- Returns:
- name
-
setName
-
description
-
getDescription
Free-form description. Max 2000 chars, markdown rendered in the dashboard.- Returns:
- description
-
setDescription
-
hypothesis
-
getHypothesis
Hypothesis statement shown in the editor. Display-only.- Returns:
- hypothesis
-
setHypothesis
-
tag
-
getTag
Short tag chip rendered next to the name. Display-only.- Returns:
- tag
-
setTag
-
ownerEmail
-
getOwnerEmail
Owner email. Display-only.- Returns:
- ownerEmail
-
setOwnerEmail
-
audience
-
getAudience
Audience label shown in the editor. Display-only.- Returns:
- audience
-
setAudience
-
bucketBy
-
getBucketBy
User-attribute name used as the bucketing key — e.g. `user_id` (default), `session_id`, `device_id`, or a custom attribute like `company_id` to keep a whole org on one variant. Defaults to `user_id` when omitted.- Returns:
- bucketBy
-
setBucketBy
-
folder
-
getFolder
Optional folder name grouping items in the dashboard. Alphanumeric, `_` or `-` (no `/`). Part of the SDK lookup key (`<folder>/<name>`).- Returns:
- folder
-
setFolder
-
universe
-
getUniverse
Name of an existing universe in the project. Returns `422` if the universe doesn't exist.- Returns:
- universe
-
setUniverse
-
targetingGate
-
getTargetingGate
Optional gate name. Only callers that pass the gate are enrolled in the experiment.- Returns:
- targetingGate
-
setTargetingGate
-
allocationPct
-
getAllocationPct
Share of the (gated) audience allocated to the experiment, in basis points (0–10000 = 0%–100%). `0` = unallocated. Use `allocation_percent` (0–100) below to think in percent. Immutable while the experiment is running. minimum: 0 maximum: 10000- Returns:
- allocationPct
-
setAllocationPct
-
allocationPercent
-
getAllocationPercent
Allocation as a **percentage** (0–100, fractional ok). Friendlier alias for `allocation_pct`; converted to basis points server-side (e.g. `50` = 5000 bp). If both are set, `allocation_percent` wins. minimum: 0 maximum: 100- Returns:
- allocationPercent
-
setAllocationPercent
-
salt
-
getSalt
Hash salt for bucketing. Auto-generated if omitted. Immutable while running.- Returns:
- salt
-
setSalt
-
params
public CreateExperimentRequest params(@Nullable Map<String, CreateExperimentRequest.InnerEnum> params) -
putParamsItem
public CreateExperimentRequest putParamsItem(String key, CreateExperimentRequest.InnerEnum paramsItem) -
getParams
Map of param-name → scalar type. Defines the shape of `groups[].params`. Example: `{ headline: 'string', show_cta: 'bool' }`.- Returns:
- params
-
setParams
-
groups
public CreateExperimentRequest groups(@Nonnull List<ListExperimentsResponseDataInnerGroupsInner> groups) -
addGroupsItem
public CreateExperimentRequest addGroupsItem(ListExperimentsResponseDataInnerGroupsInner groupsItem) -
getGroups
Two or more variants. Weights must sum to exactly 10000 (100%). Immutable while running.- Returns:
- groups
-
setGroups
-
significanceThreshold
-
getSignificanceThreshold
p-value cutoff used by the analysis pass. Defaults to `0.05`. Values other than 0.05 require Pro plan or higher. minimum: 0.00010 maximum: 0.5- Returns:
- significanceThreshold
-
setSignificanceThreshold
-
minRuntimeDays
-
getMinRuntimeDays
Minimum days the experiment must run before results are considered conclusive. minimum: 0 maximum: 365- Returns:
- minRuntimeDays
-
setMinRuntimeDays
-
minSampleSize
-
getMinSampleSize
Minimum exposures per group before results are considered conclusive. minimum: 1 maximum: 9007199254740991- Returns:
- minSampleSize
-
setMinSampleSize
-
sequentialTesting
-
getSequentialTesting
Enable sequential testing (always-valid p-values). Requires Premium plan or higher.- Returns:
- sequentialTesting
-
setSequentialTesting
-
goalMetric
-
getGoalMetric
Single goal metric defined inline — either a DSL `query` or an `event` (+`aggregation`/`value`) the server compiles. Attaching one is required before the experiment can be started. The underlying event is auto-created if missing.- Returns:
- goalMetric
-
setGoalMetric
-
guardrailMetrics
public CreateExperimentRequest guardrailMetrics(@Nullable List<ExperimentInlineMetric> guardrailMetrics) -
addGuardrailMetricsItem
-
getGuardrailMetrics
Up to 10 guardrail metrics defined inline. Each is upserted (event + metric) and attached with role=guardrail.- Returns:
- guardrailMetrics
-
setGuardrailMetrics
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the CreateExperimentRequest instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to CreateExperimentRequest
-
fromJson
Create an instance of CreateExperimentRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateExperimentRequest
- Throws:
IOException- if the JSON string is invalid with respect to CreateExperimentRequest
-
toJson
Convert an instance of CreateExperimentRequest to an JSON string- Returns:
- JSON string
-