diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 34b38251454..c5df769feb9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50696,6 +50696,119 @@ components: type: string x-enum-varnames: - EXPERIMENT_DIAGNOSTICS + ExperimentsExperimentHoldoutV2DTOArray: + description: "Response containing the holdouts an experiment is attached to." + properties: + data: + description: "Holdouts the experiment is attached to, in evaluation order." + example: [] + items: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTOData" + type: array + required: + - data + type: object + ExperimentsExperimentHoldoutV2DTOData: + description: "A holdout the experiment is attached to." + properties: + attributes: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTODataAttributes" + id: + description: "Identifier of the holdout." + example: e1e2e3e4-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTODataType" + required: + - type + - id + type: object + ExperimentsExperimentHoldoutV2DTODataAttributes: + description: "Attributes of a holdout that the experiment is attached to." + properties: + evaluation_order: + description: >- + Zero-based position of this MANAGED holdout in the experiment's evaluation order. The GLOBAL holdout is evaluated first. Null for EXTERNAL holdouts. + example: 0 + format: int64 + nullable: true + type: integer + holdout_type: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType" + key: + description: "Key of the holdout." + example: q3-global-holdout + type: string + kind: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTODataAttributesKind" + name: + description: "Display name of the holdout." + example: Q3 global holdout + type: string + state: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTODataAttributesState" + traffic_allocation: + description: "Share of subjects the holdout holds back, from 0 to 1." + example: 0.05 + format: double + type: number + type: object + ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType: + description: >- + How Datadog serves a MANAGED holdout. GLOBAL holdouts apply to every eligible experiment of a subject type. SELECTIVE holdouts apply only to the experiments attached to them. Null for EXTERNAL holdouts. + enum: + - GLOBAL + - SELECTIVE + - UNKNOWN + example: GLOBAL + nullable: true + type: string + x-enum-varnames: + - GLOBAL + - SELECTIVE + - UNKNOWN + ExperimentsExperimentHoldoutV2DTODataAttributesKind: + description: >- + Whether Datadog serves the holdout. Datadog serves MANAGED holdouts. EXTERNAL holdouts record what your own feature flagging system holds back, and Datadog does not serve them. + enum: + - MANAGED + - EXTERNAL + - UNKNOWN + example: MANAGED + type: string + x-enum-varnames: + - MANAGED + - EXTERNAL + - UNKNOWN + ExperimentsExperimentHoldoutV2DTODataAttributesState: + description: >- + Lifecycle phase of the holdout. PENDING holdouts have not started including experiments. INCLUDING holdouts are adding experiments. WAITING_FOR_ANALYSIS holdouts have stopped including experiments but have not started analysis. ANALYSING holdouts are in their analysis window. COMPLETE applies only to EXTERNAL holdouts that have ended their analysis window but are not archived. + enum: + - PENDING + - INCLUDING + - WAITING_FOR_ANALYSIS + - ANALYSING + - COMPLETE + - UNKNOWN + example: INCLUDING + type: string + x-enum-varnames: + - PENDING + - INCLUDING + - WAITING_FOR_ANALYSIS + - ANALYSING + - COMPLETE + - UNKNOWN + ExperimentsExperimentHoldoutV2DTODataType: + default: experiment-holdouts + description: Experiment holdout resource type. + enum: + - experiment-holdouts + example: experiment-holdouts + type: string + x-enum-varnames: + - EXPERIMENT_HOLDOUTS ExperimentsExperimentMetricGroupMutationV2: description: "Response containing the saved experiment metric group and result refresh information." properties: @@ -50822,6 +50935,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -50896,6 +51011,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -51078,6 +51195,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -51123,6 +51242,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -51177,6 +51298,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -51234,6 +51357,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -51304,6 +51429,16 @@ components: Kind of experiment. STANDARD is an ordinary experiment. Other values, such as CANARY and HOLDOUT, identify experiments owned by another workflow. New kinds may be added; treat unknown values as non-standard. example: STANDARD type: string + holdout_ids: + description: >- + IDs of the holdouts the experiment is attached to, in evaluation order: MANAGED holdouts first, starting with the GLOBAL holdout, followed by EXTERNAL holdouts. For a draft experiment, the list includes the GLOBAL holdout that the experiment would join if it started. `GET /api/v2/experiments/{experiment_id}/holdouts` returns their details. + example: + - a1a2a3a4-0000-0000-0000-000000000000 + items: + description: "Identifier of a holdout." + format: uuid + type: string + type: array hypothesis: description: "Expected effect that the experiment is designed to test." example: A clearer checkout button increases purchase conversion @@ -53299,6 +53434,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -53374,6 +53511,8 @@ components: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -53477,6 +53616,16 @@ components: Kind of experiment. STANDARD is an ordinary experiment. Other values, such as CANARY and HOLDOUT, identify experiments owned by another workflow. New kinds may be added; treat unknown values as non-standard. example: STANDARD type: string + holdout_ids: + description: >- + IDs of the holdouts the experiment is attached to, in evaluation order: MANAGED holdouts first, starting with the GLOBAL holdout, followed by EXTERNAL holdouts. For a draft experiment, the list includes the GLOBAL holdout that the experiment would join if it started. `GET /api/v2/experiments/{experiment_id}/holdouts` returns their details. + example: + - a1a2a3a4-0000-0000-0000-000000000000 + items: + description: "Identifier of a holdout." + format: uuid + type: string + type: array hypothesis: description: "Expected effect that the experiment is intended to test." example: A clearer checkout button increases purchase conversion @@ -53612,7 +53761,8 @@ components: nullable: true properties: allocation_key: - description: "Key of the feature flag allocation linked to the experiment. Matches the allocation key that SDKs report in flag evaluation results and exposure events." + description: >- + Key of the feature flag allocation linked to the experiment. Matches the allocation key that SDKs report in flag evaluation results and exposure events. type: string entry_point: $ref: >- @@ -181492,6 +181642,8 @@ paths: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -181691,6 +181843,7 @@ paths: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: [] name: Checkout button test pipeline_table_suffix: a1b2c3d4 related_links: [] @@ -185175,6 +185328,8 @@ paths: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: + - a1a2a3a4-0000-0000-0000-000000000000 hypothesis: A clearer checkout button increases purchase conversion name: Checkout button test pipeline_table_suffix: a1b2c3d4 @@ -185404,6 +185559,7 @@ paths: events_end_date: "2026-08-22T00:00:00Z" events_start_date: "2026-08-01T00:00:00Z" experiment_type: STANDARD + holdout_ids: [] name: Checkout button test pipeline_table_suffix: a1b2c3d4 related_links: [] @@ -185941,6 +186097,101 @@ paths: operator: AND permissions: - product_analytics_experiments_read + /api/v2/experiments/{experiment_id}/holdouts: + get: + description: >- + List the holdouts an experiment is attached to, in evaluation order: MANAGED holdouts first, starting with the GLOBAL holdout, followed by EXTERNAL holdouts. For a draft experiment, the response includes the GLOBAL holdout that the experiment would join if it started. The response excludes archived and deleted holdouts, and MANAGED holdouts past their analysis window. EXTERNAL holdouts are listed until they are archived. MANAGED holdouts are listed only for experiments that use a Datadog feature flag, because Datadog serves holdouts only through its flags. The order matches the experiment's `holdout_ids` attribute. + operationId: ListExperimentHoldouts + parameters: + - description: "The UUID of the experiment." + in: path + name: experiment_id + required: true + schema: + description: "The UUID of the experiment." + example: 550e8400-e29b-41d4-a716-446655440000 + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + evaluation_order: 0 + holdout_type: GLOBAL + key: q3-global-holdout + kind: MANAGED + name: Q3 global holdout + state: INCLUDING + traffic_allocation: 0.05 + id: e1e2e3e4-0000-0000-0000-000000000000 + type: experiment-holdouts + - attributes: + evaluation_order: 1 + holdout_type: SELECTIVE + key: checkout-holdout + kind: MANAGED + name: Checkout holdout + state: INCLUDING + traffic_allocation: 0.1 + id: f1f2f3f4-0000-0000-0000-000000000000 + type: experiment-holdouts + - attributes: + evaluation_order: + holdout_type: + key: partner-holdout + kind: EXTERNAL + name: Partner holdout + state: INCLUDING + traffic_allocation: 0.1 + id: a1a2a3a4-0000-0000-0000-000000000000 + type: experiment-holdouts + schema: + $ref: "#/components/schemas/ExperimentsExperimentHoldoutV2DTOArray" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Malformed experiment ID (not a valid UUID). + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Missing or invalid authentication. + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: >- + The caller lacks the `product_analytics_experiments_read` permission or lacks permission to view this experiment. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: No experiment with this ID exists for the organization. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - product_analytics_experiments_read + summary: List experiment holdouts + tags: + - Experiments + x-permission: + operator: AND + permissions: + - product_analytics_experiments_read /api/v2/experiments/{experiment_id}/metric-groups: get: description: >- diff --git a/examples/v2/experiments/ListExperimentHoldouts.java b/examples/v2/experiments/ListExperimentHoldouts.java new file mode 100644 index 00000000000..c00ec488d52 --- /dev/null +++ b/examples/v2/experiments/ListExperimentHoldouts.java @@ -0,0 +1,35 @@ +// List experiment holdouts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ExperimentsApi; +import com.datadog.api.client.v2.model.ExperimentsExperimentHoldoutV2DTOArray; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + ExperimentsApi apiInstance = new ExperimentsApi(defaultClient); + + // there is a valid "experiment" in the system + UUID EXPERIMENT_DATA_ID = null; + try { + EXPERIMENT_DATA_ID = UUID.fromString(System.getenv("EXPERIMENT_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + ExperimentsExperimentHoldoutV2DTOArray result = + apiInstance.listExperimentHoldouts(EXPERIMENT_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ExperimentsApi#listExperimentHoldouts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/ExperimentsApi.java b/src/main/java/com/datadog/api/client/v2/api/ExperimentsApi.java index dc9094340b2..df3260c826d 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ExperimentsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ExperimentsApi.java @@ -18,6 +18,7 @@ import com.datadog.api.client.v2.model.ExperimentsCreateMetricV2Request; import com.datadog.api.client.v2.model.ExperimentsCreateSubjectTypeV2Request; import com.datadog.api.client.v2.model.ExperimentsExperimentDiagnosticsV2DTO; +import com.datadog.api.client.v2.model.ExperimentsExperimentHoldoutV2DTOArray; import com.datadog.api.client.v2.model.ExperimentsExperimentMetricGroupMutationV2; import com.datadog.api.client.v2.model.ExperimentsExperimentMetricGroupV2DTOArray; import com.datadog.api.client.v2.model.ExperimentsExperimentV2DTO; @@ -4947,6 +4948,156 @@ public ApiResponse getSubjectTypeWithHttpInfo( new GenericType() {}); } + /** + * List experiment holdouts. + * + *

See {@link #listExperimentHoldoutsWithHttpInfo}. + * + * @param experimentId The UUID of the experiment. (required) + * @return ExperimentsExperimentHoldoutV2DTOArray + * @throws ApiException if fails to make API call + */ + public ExperimentsExperimentHoldoutV2DTOArray listExperimentHoldouts(UUID experimentId) + throws ApiException { + return listExperimentHoldoutsWithHttpInfo(experimentId).getData(); + } + + /** + * List experiment holdouts. + * + *

See {@link #listExperimentHoldoutsWithHttpInfoAsync}. + * + * @param experimentId The UUID of the experiment. (required) + * @return CompletableFuture<ExperimentsExperimentHoldoutV2DTOArray> + */ + public CompletableFuture listExperimentHoldoutsAsync( + UUID experimentId) { + return listExperimentHoldoutsWithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the holdouts an experiment is attached to, in evaluation order: MANAGED holdouts first, + * starting with the GLOBAL holdout, followed by EXTERNAL holdouts. For a draft experiment, the + * response includes the GLOBAL holdout that the experiment would join if it started. The response + * excludes archived and deleted holdouts, and MANAGED holdouts past their analysis window. + * EXTERNAL holdouts are listed until they are archived. MANAGED holdouts are listed only for + * experiments that use a Datadog feature flag, because Datadog serves holdouts only through its + * flags. The order matches the experiment's holdout_ids attribute. + * + * @param experimentId The UUID of the experiment. (required) + * @return ApiResponse<ExperimentsExperimentHoldoutV2DTOArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Malformed experiment ID (not a valid UUID). -
401 Missing or invalid authentication. -
403 The caller lacks the `product_analytics_experiments_read` permission or lacks permission to view this experiment. -
404 No experiment with this ID exists for the organization. -
429 Too many requests -
+ */ + public ApiResponse listExperimentHoldoutsWithHttpInfo( + UUID experimentId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, "Missing the required parameter 'experimentId' when calling listExperimentHoldouts"); + } + // create path and map variables + String localVarPath = + "/api/v2/experiments/{experiment_id}/holdouts" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ExperimentsApi.listExperimentHoldouts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List experiment holdouts. + * + *

See {@link #listExperimentHoldoutsWithHttpInfo}. + * + * @param experimentId The UUID of the experiment. (required) + * @return CompletableFuture<ApiResponse<ExperimentsExperimentHoldoutV2DTOArray>> + */ + public CompletableFuture> + listExperimentHoldoutsWithHttpInfoAsync(UUID experimentId) { + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling listExperimentHoldouts")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/experiments/{experiment_id}/holdouts" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ExperimentsApi.listExperimentHoldouts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * List experiment metric groups. * diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTOArray.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTOArray.java new file mode 100644 index 00000000000..f7118ac33c3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTOArray.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing the holdouts an experiment is attached to. */ +@JsonPropertyOrder({ExperimentsExperimentHoldoutV2DTOArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ExperimentsExperimentHoldoutV2DTOArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public ExperimentsExperimentHoldoutV2DTOArray() {} + + @JsonCreator + public ExperimentsExperimentHoldoutV2DTOArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (ExperimentsExperimentHoldoutV2DTOData item : data) { + this.unparsed |= item.unparsed; + } + } + + public ExperimentsExperimentHoldoutV2DTOArray data( + List data) { + this.data = data; + for (ExperimentsExperimentHoldoutV2DTOData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ExperimentsExperimentHoldoutV2DTOArray addDataItem( + ExperimentsExperimentHoldoutV2DTOData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Holdouts the experiment is attached to, in evaluation order. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (ExperimentsExperimentHoldoutV2DTOData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ExperimentsExperimentHoldoutV2DTOArray + */ + @JsonAnySetter + public ExperimentsExperimentHoldoutV2DTOArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ExperimentsExperimentHoldoutV2DTOArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentsExperimentHoldoutV2DTOArray experimentsExperimentHoldoutV2DtoArray = + (ExperimentsExperimentHoldoutV2DTOArray) o; + return Objects.equals(this.data, experimentsExperimentHoldoutV2DtoArray.data) + && Objects.equals( + this.additionalProperties, experimentsExperimentHoldoutV2DtoArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentsExperimentHoldoutV2DTOArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTOData.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTOData.java new file mode 100644 index 00000000000..72694a35166 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTOData.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A holdout the experiment is attached to. */ +@JsonPropertyOrder({ + ExperimentsExperimentHoldoutV2DTOData.JSON_PROPERTY_ATTRIBUTES, + ExperimentsExperimentHoldoutV2DTOData.JSON_PROPERTY_ID, + ExperimentsExperimentHoldoutV2DTOData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ExperimentsExperimentHoldoutV2DTOData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ExperimentsExperimentHoldoutV2DTODataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ExperimentsExperimentHoldoutV2DTODataType type = + ExperimentsExperimentHoldoutV2DTODataType.EXPERIMENT_HOLDOUTS; + + public ExperimentsExperimentHoldoutV2DTOData() {} + + @JsonCreator + public ExperimentsExperimentHoldoutV2DTOData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ExperimentsExperimentHoldoutV2DTODataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ExperimentsExperimentHoldoutV2DTOData attributes( + ExperimentsExperimentHoldoutV2DTODataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a holdout that the experiment is attached to. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentsExperimentHoldoutV2DTODataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ExperimentsExperimentHoldoutV2DTODataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public ExperimentsExperimentHoldoutV2DTOData id(UUID id) { + this.id = id; + return this; + } + + /** + * Identifier of the holdout. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public ExperimentsExperimentHoldoutV2DTOData type( + ExperimentsExperimentHoldoutV2DTODataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Experiment holdout resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExperimentsExperimentHoldoutV2DTODataType getType() { + return type; + } + + public void setType(ExperimentsExperimentHoldoutV2DTODataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ExperimentsExperimentHoldoutV2DTOData + */ + @JsonAnySetter + public ExperimentsExperimentHoldoutV2DTOData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ExperimentsExperimentHoldoutV2DTOData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentsExperimentHoldoutV2DTOData experimentsExperimentHoldoutV2DtoData = + (ExperimentsExperimentHoldoutV2DTOData) o; + return Objects.equals(this.attributes, experimentsExperimentHoldoutV2DtoData.attributes) + && Objects.equals(this.id, experimentsExperimentHoldoutV2DtoData.id) + && Objects.equals(this.type, experimentsExperimentHoldoutV2DtoData.type) + && Objects.equals( + this.additionalProperties, experimentsExperimentHoldoutV2DtoData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentsExperimentHoldoutV2DTOData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributes.java new file mode 100644 index 00000000000..a6b64870ffd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributes.java @@ -0,0 +1,366 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a holdout that the experiment is attached to. */ +@JsonPropertyOrder({ + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_EVALUATION_ORDER, + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_HOLDOUT_TYPE, + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_KEY, + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_KIND, + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_NAME, + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_STATE, + ExperimentsExperimentHoldoutV2DTODataAttributes.JSON_PROPERTY_TRAFFIC_ALLOCATION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ExperimentsExperimentHoldoutV2DTODataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVALUATION_ORDER = "evaluation_order"; + private JsonNullable evaluationOrder = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_HOLDOUT_TYPE = "holdout_type"; + private JsonNullable holdoutType = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_KIND = "kind"; + private ExperimentsExperimentHoldoutV2DTODataAttributesKind kind; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STATE = "state"; + private ExperimentsExperimentHoldoutV2DTODataAttributesState state; + + public static final String JSON_PROPERTY_TRAFFIC_ALLOCATION = "traffic_allocation"; + private Double trafficAllocation; + + public ExperimentsExperimentHoldoutV2DTODataAttributes evaluationOrder(Long evaluationOrder) { + this.evaluationOrder = JsonNullable.of(evaluationOrder); + return this; + } + + /** + * Zero-based position of this MANAGED holdout in the experiment's evaluation order. The GLOBAL + * holdout is evaluated first. Null for EXTERNAL holdouts. + * + * @return evaluationOrder + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getEvaluationOrder() { + return evaluationOrder.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EVALUATION_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getEvaluationOrder_JsonNullable() { + return evaluationOrder; + } + + @JsonProperty(JSON_PROPERTY_EVALUATION_ORDER) + public void setEvaluationOrder_JsonNullable(JsonNullable evaluationOrder) { + this.evaluationOrder = evaluationOrder; + } + + public void setEvaluationOrder(Long evaluationOrder) { + this.evaluationOrder = JsonNullable.of(evaluationOrder); + } + + public ExperimentsExperimentHoldoutV2DTODataAttributes holdoutType( + ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType holdoutType) { + this.holdoutType = + JsonNullable.of(holdoutType); + return this; + } + + /** + * How Datadog serves a MANAGED holdout. GLOBAL holdouts apply to every eligible experiment of a + * subject type. SELECTIVE holdouts apply only to the experiments attached to them. Null for + * EXTERNAL holdouts. + * + * @return holdoutType + */ + @jakarta.annotation.Nullable + @JsonIgnore + public ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType getHoldoutType() { + return holdoutType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_HOLDOUT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getHoldoutType_JsonNullable() { + return holdoutType; + } + + @JsonProperty(JSON_PROPERTY_HOLDOUT_TYPE) + public void setHoldoutType_JsonNullable( + JsonNullable holdoutType) { + this.holdoutType = holdoutType; + } + + public void setHoldoutType( + ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType holdoutType) { + if (!holdoutType.isValid()) { + this.unparsed = true; + } + this.holdoutType = + JsonNullable.of(holdoutType); + } + + public ExperimentsExperimentHoldoutV2DTODataAttributes key(String key) { + this.key = key; + return this; + } + + /** + * Key of the holdout. + * + * @return key + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public ExperimentsExperimentHoldoutV2DTODataAttributes kind( + ExperimentsExperimentHoldoutV2DTODataAttributesKind kind) { + this.kind = kind; + this.unparsed |= !kind.isValid(); + return this; + } + + /** + * Whether Datadog serves the holdout. Datadog serves MANAGED holdouts. EXTERNAL holdouts record + * what your own feature flagging system holds back, and Datadog does not serve them. + * + * @return kind + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentsExperimentHoldoutV2DTODataAttributesKind getKind() { + return kind; + } + + public void setKind(ExperimentsExperimentHoldoutV2DTODataAttributesKind kind) { + if (!kind.isValid()) { + this.unparsed = true; + } + this.kind = kind; + } + + public ExperimentsExperimentHoldoutV2DTODataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the holdout. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ExperimentsExperimentHoldoutV2DTODataAttributes state( + ExperimentsExperimentHoldoutV2DTODataAttributesState state) { + this.state = state; + this.unparsed |= !state.isValid(); + return this; + } + + /** + * Lifecycle phase of the holdout. PENDING holdouts have not started including experiments. + * INCLUDING holdouts are adding experiments. WAITING_FOR_ANALYSIS holdouts have stopped including + * experiments but have not started analysis. ANALYSING holdouts are in their analysis window. + * COMPLETE applies only to EXTERNAL holdouts that have ended their analysis window but are not + * archived. + * + * @return state + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExperimentsExperimentHoldoutV2DTODataAttributesState getState() { + return state; + } + + public void setState(ExperimentsExperimentHoldoutV2DTODataAttributesState state) { + if (!state.isValid()) { + this.unparsed = true; + } + this.state = state; + } + + public ExperimentsExperimentHoldoutV2DTODataAttributes trafficAllocation( + Double trafficAllocation) { + this.trafficAllocation = trafficAllocation; + return this; + } + + /** + * Share of subjects the holdout holds back, from 0 to 1. + * + * @return trafficAllocation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRAFFIC_ALLOCATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getTrafficAllocation() { + return trafficAllocation; + } + + public void setTrafficAllocation(Double trafficAllocation) { + this.trafficAllocation = trafficAllocation; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ExperimentsExperimentHoldoutV2DTODataAttributes + */ + @JsonAnySetter + public ExperimentsExperimentHoldoutV2DTODataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ExperimentsExperimentHoldoutV2DTODataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExperimentsExperimentHoldoutV2DTODataAttributes + experimentsExperimentHoldoutV2DtoDataAttributes = + (ExperimentsExperimentHoldoutV2DTODataAttributes) o; + return Objects.equals( + this.evaluationOrder, experimentsExperimentHoldoutV2DtoDataAttributes.evaluationOrder) + && Objects.equals( + this.holdoutType, experimentsExperimentHoldoutV2DtoDataAttributes.holdoutType) + && Objects.equals(this.key, experimentsExperimentHoldoutV2DtoDataAttributes.key) + && Objects.equals(this.kind, experimentsExperimentHoldoutV2DtoDataAttributes.kind) + && Objects.equals(this.name, experimentsExperimentHoldoutV2DtoDataAttributes.name) + && Objects.equals(this.state, experimentsExperimentHoldoutV2DtoDataAttributes.state) + && Objects.equals( + this.trafficAllocation, + experimentsExperimentHoldoutV2DtoDataAttributes.trafficAllocation) + && Objects.equals( + this.additionalProperties, + experimentsExperimentHoldoutV2DtoDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + evaluationOrder, + holdoutType, + key, + kind, + name, + state, + trafficAllocation, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExperimentsExperimentHoldoutV2DTODataAttributes {\n"); + sb.append(" evaluationOrder: ").append(toIndentedString(evaluationOrder)).append("\n"); + sb.append(" holdoutType: ").append(toIndentedString(holdoutType)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" trafficAllocation: ").append(toIndentedString(trafficAllocation)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType.java new file mode 100644 index 00000000000..661d9e2667f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType.java @@ -0,0 +1,71 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * How Datadog serves a MANAGED holdout. GLOBAL holdouts apply to every eligible experiment of a + * subject type. SELECTIVE holdouts apply only to the experiments attached to them. Null for + * EXTERNAL holdouts. + */ +@JsonSerialize( + using = + ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType + .ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutTypeSerializer.class) +public class ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("GLOBAL", "SELECTIVE", "UNKNOWN")); + + public static final ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType GLOBAL = + new ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType("GLOBAL"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType SELECTIVE = + new ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType("SELECTIVE"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType UNKNOWN = + new ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType("UNKNOWN"); + + ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType(String value) { + super(value, allowedValues); + } + + public static class ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutTypeSerializer + extends StdSerializer { + public ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutTypeSerializer( + Class t) { + super(t); + } + + public ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType fromValue(String value) { + return new ExperimentsExperimentHoldoutV2DTODataAttributesHoldoutType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesKind.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesKind.java new file mode 100644 index 00000000000..1fafda2d443 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesKind.java @@ -0,0 +1,70 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Whether Datadog serves the holdout. Datadog serves MANAGED holdouts. EXTERNAL holdouts record + * what your own feature flagging system holds back, and Datadog does not serve them. + */ +@JsonSerialize( + using = + ExperimentsExperimentHoldoutV2DTODataAttributesKind + .ExperimentsExperimentHoldoutV2DTODataAttributesKindSerializer.class) +public class ExperimentsExperimentHoldoutV2DTODataAttributesKind extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("MANAGED", "EXTERNAL", "UNKNOWN")); + + public static final ExperimentsExperimentHoldoutV2DTODataAttributesKind MANAGED = + new ExperimentsExperimentHoldoutV2DTODataAttributesKind("MANAGED"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesKind EXTERNAL = + new ExperimentsExperimentHoldoutV2DTODataAttributesKind("EXTERNAL"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesKind UNKNOWN = + new ExperimentsExperimentHoldoutV2DTODataAttributesKind("UNKNOWN"); + + ExperimentsExperimentHoldoutV2DTODataAttributesKind(String value) { + super(value, allowedValues); + } + + public static class ExperimentsExperimentHoldoutV2DTODataAttributesKindSerializer + extends StdSerializer { + public ExperimentsExperimentHoldoutV2DTODataAttributesKindSerializer( + Class t) { + super(t); + } + + public ExperimentsExperimentHoldoutV2DTODataAttributesKindSerializer() { + this(null); + } + + @Override + public void serialize( + ExperimentsExperimentHoldoutV2DTODataAttributesKind value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ExperimentsExperimentHoldoutV2DTODataAttributesKind fromValue(String value) { + return new ExperimentsExperimentHoldoutV2DTODataAttributesKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesState.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesState.java new file mode 100644 index 00000000000..ca59f99e28d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataAttributesState.java @@ -0,0 +1,81 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Lifecycle phase of the holdout. PENDING holdouts have not started including experiments. + * INCLUDING holdouts are adding experiments. WAITING_FOR_ANALYSIS holdouts have stopped including + * experiments but have not started analysis. ANALYSING holdouts are in their analysis window. + * COMPLETE applies only to EXTERNAL holdouts that have ended their analysis window but are not + * archived. + */ +@JsonSerialize( + using = + ExperimentsExperimentHoldoutV2DTODataAttributesState + .ExperimentsExperimentHoldoutV2DTODataAttributesStateSerializer.class) +public class ExperimentsExperimentHoldoutV2DTODataAttributesState extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "PENDING", "INCLUDING", "WAITING_FOR_ANALYSIS", "ANALYSING", "COMPLETE", "UNKNOWN")); + + public static final ExperimentsExperimentHoldoutV2DTODataAttributesState PENDING = + new ExperimentsExperimentHoldoutV2DTODataAttributesState("PENDING"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesState INCLUDING = + new ExperimentsExperimentHoldoutV2DTODataAttributesState("INCLUDING"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesState WAITING_FOR_ANALYSIS = + new ExperimentsExperimentHoldoutV2DTODataAttributesState("WAITING_FOR_ANALYSIS"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesState ANALYSING = + new ExperimentsExperimentHoldoutV2DTODataAttributesState("ANALYSING"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesState COMPLETE = + new ExperimentsExperimentHoldoutV2DTODataAttributesState("COMPLETE"); + public static final ExperimentsExperimentHoldoutV2DTODataAttributesState UNKNOWN = + new ExperimentsExperimentHoldoutV2DTODataAttributesState("UNKNOWN"); + + ExperimentsExperimentHoldoutV2DTODataAttributesState(String value) { + super(value, allowedValues); + } + + public static class ExperimentsExperimentHoldoutV2DTODataAttributesStateSerializer + extends StdSerializer { + public ExperimentsExperimentHoldoutV2DTODataAttributesStateSerializer( + Class t) { + super(t); + } + + public ExperimentsExperimentHoldoutV2DTODataAttributesStateSerializer() { + this(null); + } + + @Override + public void serialize( + ExperimentsExperimentHoldoutV2DTODataAttributesState value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ExperimentsExperimentHoldoutV2DTODataAttributesState fromValue(String value) { + return new ExperimentsExperimentHoldoutV2DTODataAttributesState(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataType.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataType.java new file mode 100644 index 00000000000..9c4cb4b1f95 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentHoldoutV2DTODataType.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Experiment holdout resource type. */ +@JsonSerialize( + using = + ExperimentsExperimentHoldoutV2DTODataType + .ExperimentsExperimentHoldoutV2DTODataTypeSerializer.class) +public class ExperimentsExperimentHoldoutV2DTODataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("experiment-holdouts")); + + public static final ExperimentsExperimentHoldoutV2DTODataType EXPERIMENT_HOLDOUTS = + new ExperimentsExperimentHoldoutV2DTODataType("experiment-holdouts"); + + ExperimentsExperimentHoldoutV2DTODataType(String value) { + super(value, allowedValues); + } + + public static class ExperimentsExperimentHoldoutV2DTODataTypeSerializer + extends StdSerializer { + public ExperimentsExperimentHoldoutV2DTODataTypeSerializer( + Class t) { + super(t); + } + + public ExperimentsExperimentHoldoutV2DTODataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ExperimentsExperimentHoldoutV2DTODataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ExperimentsExperimentHoldoutV2DTODataType fromValue(String value) { + return new ExperimentsExperimentHoldoutV2DTODataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentV2ListDTODataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentV2ListDTODataAttributes.java index afb0d4333e1..b579b26e402 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentV2ListDTODataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsExperimentV2ListDTODataAttributes.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Summary fields for an experiment returned in a list. */ @@ -30,6 +31,7 @@ ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_EVENTS_END_DATE, ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_EVENTS_START_DATE, ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_EXPERIMENT_TYPE, + ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_HOLDOUT_IDS, ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_HYPOTHESIS, ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_MIGRATION_METADATA, ExperimentsExperimentV2ListDTODataAttributes.JSON_PROPERTY_NAME, @@ -75,6 +77,9 @@ public class ExperimentsExperimentV2ListDTODataAttributes { public static final String JSON_PROPERTY_EXPERIMENT_TYPE = "experiment_type"; private String experimentType; + public static final String JSON_PROPERTY_HOLDOUT_IDS = "holdout_ids"; + private List holdoutIds = null; + public static final String JSON_PROPERTY_HYPOTHESIS = "hypothesis"; private String hypothesis; @@ -349,6 +354,38 @@ public void setExperimentType(String experimentType) { this.experimentType = experimentType; } + public ExperimentsExperimentV2ListDTODataAttributes holdoutIds(List holdoutIds) { + this.holdoutIds = holdoutIds; + return this; + } + + public ExperimentsExperimentV2ListDTODataAttributes addHoldoutIdsItem(UUID holdoutIdsItem) { + if (this.holdoutIds == null) { + this.holdoutIds = new ArrayList<>(); + } + this.holdoutIds.add(holdoutIdsItem); + return this; + } + + /** + * IDs of the holdouts the experiment is attached to, in evaluation order: MANAGED holdouts first, + * starting with the GLOBAL holdout, followed by EXTERNAL holdouts. For a draft experiment, the + * list includes the GLOBAL holdout that the experiment would join if it started. + * GET /api/v2/experiments/{experiment_id}/holdouts returns their details. + * + * @return holdoutIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOLDOUT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getHoldoutIds() { + return holdoutIds; + } + + public void setHoldoutIds(List holdoutIds) { + this.holdoutIds = holdoutIds; + } + public ExperimentsExperimentV2ListDTODataAttributes hypothesis(String hypothesis) { this.hypothesis = hypothesis; return this; @@ -807,6 +844,7 @@ public boolean equals(Object o) { this.eventsStartDate, experimentsExperimentV2ListDtoDataAttributes.eventsStartDate) && Objects.equals( this.experimentType, experimentsExperimentV2ListDtoDataAttributes.experimentType) + && Objects.equals(this.holdoutIds, experimentsExperimentV2ListDtoDataAttributes.holdoutIds) && Objects.equals(this.hypothesis, experimentsExperimentV2ListDtoDataAttributes.hypothesis) && Objects.equals( this.migrationMetadata, experimentsExperimentV2ListDtoDataAttributes.migrationMetadata) @@ -846,6 +884,7 @@ public int hashCode() { eventsEndDate, eventsStartDate, experimentType, + holdoutIds, hypothesis, migrationMetadata, name, @@ -877,6 +916,7 @@ public String toString() { sb.append(" eventsEndDate: ").append(toIndentedString(eventsEndDate)).append("\n"); sb.append(" eventsStartDate: ").append(toIndentedString(eventsStartDate)).append("\n"); sb.append(" experimentType: ").append(toIndentedString(experimentType)).append("\n"); + sb.append(" holdoutIds: ").append(toIndentedString(holdoutIds)).append("\n"); sb.append(" hypothesis: ").append(toIndentedString(hypothesis)).append("\n"); sb.append(" migrationMetadata: ").append(toIndentedString(migrationMetadata)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ExperimentsPatchExperimentV2ResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ExperimentsPatchExperimentV2ResponseDataAttributes.java index b0150ab085e..2c2c522de4a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ExperimentsPatchExperimentV2ResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ExperimentsPatchExperimentV2ResponseDataAttributes.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Details of the experiment. */ @@ -33,6 +34,7 @@ ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_EVENTS_END_DATE, ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_EVENTS_START_DATE, ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_EXPERIMENT_TYPE, + ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_HOLDOUT_IDS, ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_HYPOTHESIS, ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_MIGRATION_METADATA, ExperimentsPatchExperimentV2ResponseDataAttributes.JSON_PROPERTY_NAME, @@ -97,6 +99,9 @@ public class ExperimentsPatchExperimentV2ResponseDataAttributes { public static final String JSON_PROPERTY_EXPERIMENT_TYPE = "experiment_type"; private String experimentType; + public static final String JSON_PROPERTY_HOLDOUT_IDS = "holdout_ids"; + private List holdoutIds = null; + public static final String JSON_PROPERTY_HYPOTHESIS = "hypothesis"; private String hypothesis; @@ -505,6 +510,38 @@ public void setExperimentType(String experimentType) { this.experimentType = experimentType; } + public ExperimentsPatchExperimentV2ResponseDataAttributes holdoutIds(List holdoutIds) { + this.holdoutIds = holdoutIds; + return this; + } + + public ExperimentsPatchExperimentV2ResponseDataAttributes addHoldoutIdsItem(UUID holdoutIdsItem) { + if (this.holdoutIds == null) { + this.holdoutIds = new ArrayList<>(); + } + this.holdoutIds.add(holdoutIdsItem); + return this; + } + + /** + * IDs of the holdouts the experiment is attached to, in evaluation order: MANAGED holdouts first, + * starting with the GLOBAL holdout, followed by EXTERNAL holdouts. For a draft experiment, the + * list includes the GLOBAL holdout that the experiment would join if it started. + * GET /api/v2/experiments/{experiment_id}/holdouts returns their details. + * + * @return holdoutIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOLDOUT_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getHoldoutIds() { + return holdoutIds; + } + + public void setHoldoutIds(List holdoutIds) { + this.holdoutIds = holdoutIds; + } + public ExperimentsPatchExperimentV2ResponseDataAttributes hypothesis(String hypothesis) { this.hypothesis = hypothesis; return this; @@ -1140,6 +1177,8 @@ public boolean equals(Object o) { experimentsPatchExperimentV2ResponseDataAttributes.eventsStartDate) && Objects.equals( this.experimentType, experimentsPatchExperimentV2ResponseDataAttributes.experimentType) + && Objects.equals( + this.holdoutIds, experimentsPatchExperimentV2ResponseDataAttributes.holdoutIds) && Objects.equals( this.hypothesis, experimentsPatchExperimentV2ResponseDataAttributes.hypothesis) && Objects.equals( @@ -1197,6 +1236,7 @@ public int hashCode() { eventsEndDate, eventsStartDate, experimentType, + holdoutIds, hypothesis, migrationMetadata, name, @@ -1237,6 +1277,7 @@ public String toString() { sb.append(" eventsEndDate: ").append(toIndentedString(eventsEndDate)).append("\n"); sb.append(" eventsStartDate: ").append(toIndentedString(eventsStartDate)).append("\n"); sb.append(" experimentType: ").append(toIndentedString(experimentType)).append("\n"); + sb.append(" holdoutIds: ").append(toIndentedString(holdoutIds)).append("\n"); sb.append(" hypothesis: ").append(toIndentedString(hypothesis)).append("\n"); sb.append(" migrationMetadata: ").append(toIndentedString(migrationMetadata)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); diff --git a/src/test/resources/com/datadog/api/client/v2/api/experiments.feature b/src/test/resources/com/datadog/api/client/v2/api/experiments.feature index 24f086abe36..d0741a1475d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/experiments.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/experiments.feature @@ -861,6 +861,29 @@ Feature: Experiments When the request is sent Then the response status is 200 OK + @generated @skip @team:ddoghq/experimentation + Scenario: List experiment holdouts returns "Malformed experiment ID (not a valid UUID)." response + Given new "ListExperimentHoldouts" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Malformed experiment ID (not a valid UUID). + + @generated @skip @team:ddoghq/experimentation + Scenario: List experiment holdouts returns "No experiment with this ID exists for the organization." response + Given new "ListExperimentHoldouts" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 No experiment with this ID exists for the organization. + + @team:ddoghq/experimentation + Scenario: List experiment holdouts returns "OK" response + Given new "ListExperimentHoldouts" request + And there is a valid "experiment" in the system + And request contains "experiment_id" parameter from "experiment.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + @generated @skip @team:ddoghq/experimentation Scenario: List experiment metric groups returns "Malformed experiment ID." response Given new "ListExperimentMetricGroups" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 2f7556080ed..993492a315c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -3142,6 +3142,12 @@ "type": "safe" } }, + "ListExperimentHoldouts": { + "tag": "Experiments", + "undo": { + "type": "safe" + } + }, "ListExperimentMetricGroups": { "tag": "Experiments", "undo": { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index caa6c8ef32d..0ef418e5582 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -6118,6 +6118,13 @@ "scenario": "Get subject type returns \"OK\" response", "version": "v2" }, + { + "feature": "Experiments", + "feature_file": "../../com/datadog/api/client/v2/api/experiments.feature", + "file": "v2/experiments/list-experiment-holdouts-returns-ok-response.json", + "scenario": "List experiment holdouts returns \"OK\" response", + "version": "v2" + }, { "feature": "Experiments", "feature_file": "../../com/datadog/api/client/v2/api/experiments.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/experiments/list-experiment-holdouts-returns-ok-response.json b/src/test/resources/generated-test/test-runner-data/v2/experiments/list-experiment-holdouts-returns-ok-response.json new file mode 100644 index 00000000000..8fe5d14bad8 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/experiments/list-experiment-holdouts-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "Experiments", + "expected_status": 200, + "feature": "Experiments", + "id": "v2/Experiments/List experiment holdouts returns \"OK\" response", + "operation_id": "ListExperimentHoldouts", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "experiment_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "experiment.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/experiments/{experiment_id}/holdouts" + }, + "scenario": "List experiment holdouts returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/experiments.json b/src/test/resources/generated-test/test-server-data/v2/experiments.json index f3f77b5130b..c70c16f1991 100644 --- a/src/test/resources/generated-test/test-server-data/v2/experiments.json +++ b/src/test/resources/generated-test/test-server-data/v2/experiments.json @@ -2235,6 +2235,88 @@ "scenario": "Get subject type returns \"OK\" response", "version": "v2" }, + { + "feature": "Experiments", + "frozen_at": "2026-11-11T15:51:16.342Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "name": "ex-b11fe042126dd95f" + }, + "type": "experiments" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/experiments", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"06af48ef-5322-7000-ba71-98a43ecc3fc0\",\"type\":\"experiments\",\"attributes\":{\"assignments_end_date\":null,\"assignments_start_date\":null,\"concluded_at\":null,\"created_at\":\"2026-11-11T15:51:17.802364Z\",\"events_end_date\":null,\"events_start_date\":null,\"experiment_type\":\"STANDARD\",\"holdout_ids\":[],\"name\":\"ex-b11fe042126dd95f\",\"pipeline_table_suffix\":\"yor8f7\",\"related_links\":[],\"results_last_updated\":null,\"split_by_properties\":[],\"status\":\"DRAFT\",\"structured_metadata\":[],\"subject_type_id\":\"06abb0e8-33b2-7001-ad2f-70568bfbf6e9\",\"tags\":[],\"teams\":[],\"updated_at\":\"2026-11-11T15:51:17.834103Z\"}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/experiments/06af48ef-5322-7000-ba71-98a43ecc3fc0/holdouts", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/experiments/06af48ef-5322-7000-ba71-98a43ecc3fc0", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "List experiment holdouts returns \"OK\" response", + "version": "v2" + }, { "feature": "Experiments", "frozen_at": "2026-09-29T01:19:20.780Z",